import * as core from "@terrascript/core";

export interface MethodResponseArgs extends core.ResourceArgs {
  httpMethod: string | core.StringOut;

  resourceId: string | core.StringOut;

  responseModels?: core.Map<string, string> | core.MapOut<core.StringOut>;

  responseParameters?: core.Map<string, boolean> | core.MapOut<core.BooleanOut>;

  restApiId: string | core.StringOut;

  statusCode: string | core.StringOut;
}

export class MethodResponse extends core.Resource<MethodResponseArgs> {
  @core.attr(String)
  public httpMethod!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(String)
  public resourceId!: string | core.StringOut;

  @core.attr(String, { kind: "map" })
  public responseModels?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

  @core.attr(Boolean, { kind: "map" })
  public responseParameters?:
    | core.Map<string, boolean>
    | core.MapOut<core.BooleanOut>;

  @core.attr(String)
  public restApiId!: string | core.StringOut;

  @core.attr(String)
  public statusCode!: string | core.StringOut;

  constructor(name: string, args?: MethodResponseArgs) {
    super(name, "aws_api_gateway_method_response", args);
  }

  public override getNamespace(): string {
    return "aws_api_gateway";
  }
}
