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

export interface IntegrationResponseArgs extends core.ResourceArgs {
  contentHandling?: string | core.StringOut;

  httpMethod: string | core.StringOut;

  resourceId: string | core.StringOut;

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

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

  restApiId: string | core.StringOut;

  selectionPattern?: string | core.StringOut;

  statusCode: string | core.StringOut;
}

export class IntegrationResponse extends core.Resource<IntegrationResponseArgs> {
  @core.attr(String)
  public contentHandling?: string | core.StringOut;

  @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 responseParameters?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

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

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

  @core.attr(String)
  public selectionPattern?: string | core.StringOut;

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

  constructor(name: string, args?: IntegrationResponseArgs) {
    super(name, "aws_api_gateway_integration_response", args);
  }

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