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

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

  contentHandlingStrategy?: string | core.StringOut;

  integrationId: string | core.StringOut;

  integrationResponseKey: string | core.StringOut;

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

  templateSelectionExpression?: string | core.StringOut;
}

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

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

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

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

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

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

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

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

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