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

export interface GatewayResponseArgs extends core.ResourceArgs {
  /**
   * (Optional) A map specifying the parameters (paths, query strings and headers) of the Gateway Respons
   * e.
   */
  responseParameters?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * (Optional) A map specifying the templates used to transform the response body.
   */
  responseTemplates?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * (Required) The response type of the associated GatewayResponse.
   */
  responseType: string | core.StringOut;

  /**
   * (Required) The string identifier of the associated REST API.
   */
  restApiId: string | core.StringOut;

  /**
   * (Optional) The HTTP status code of the Gateway Response.
   */
  statusCode?: string | core.StringOut;
}

export class GatewayResponse extends core.Resource<GatewayResponseArgs> {
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Optional) A map specifying the parameters (paths, query strings and headers) of the Gateway Respons
   * e.
   */
  @core.attr(String, { kind: "map" })
  public responseParameters?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

  /**
   * (Optional) A map specifying the templates used to transform the response body.
   */
  @core.attr(String, { kind: "map" })
  public responseTemplates?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

  /**
   * (Required) The response type of the associated GatewayResponse.
   */
  @core.attr(String)
  public responseType!: string | core.StringOut;

  /**
   * (Required) The string identifier of the associated REST API.
   */
  @core.attr(String)
  public restApiId!: string | core.StringOut;

  /**
   * (Optional) The HTTP status code of the Gateway Response.
   */
  @core.attr(String)
  public statusCode?: string | core.StringOut;

  constructor(name: string, args?: GatewayResponseArgs) {
    super(name, "aws_api_gateway_gateway_response", args);
  }

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