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

export interface EndpointConfigurationArgs extends core.SchemaArgs {
  types: core.Array<string> | core.ArrayOut<core.StringOut>;

  vpcEndpointIds?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class EndpointConfiguration extends core.Schema<EndpointConfigurationArgs> {
  @core.attr(String, { kind: "array" })
  public types!: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String, { computed: true, kind: "array" })
  public vpcEndpointIds?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface RestApiArgs extends core.ResourceArgs {
  apiKeySource?: string | core.StringOut;

  binaryMediaTypes?: core.Array<string> | core.ArrayOut<core.StringOut>;

  body?: string | core.StringOut;

  description?: string | core.StringOut;

  disableExecuteApiEndpoint?: boolean | core.BooleanOut;

  endpointConfiguration?: EndpointConfiguration;

  minimumCompressionSize?: number | core.NumberOut;

  name: string | core.StringOut;

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

  policy?: string | core.StringOut;

  putRestApiMode?: string | core.StringOut;

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

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

export class RestApi extends core.Resource<RestApiArgs> {
  @core.attr(String, { computed: true })
  public apiKeySource?: string | core.StringOut;

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

  @core.attr(String, { computed: true, kind: "array" })
  public binaryMediaTypes?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

  @core.attr(Boolean, { computed: true })
  public disableExecuteApiEndpoint?: boolean | core.BooleanOut;

  @core.attr(EndpointConfiguration, { computed: true })
  public endpointConfiguration?: EndpointConfiguration;

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

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

  @core.attr(Number)
  public minimumCompressionSize?: number | core.NumberOut;

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

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

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

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

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

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

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

  constructor(name: string, args?: RestApiArgs) {
    super(name, "aws_api_gateway_rest_api", args);
  }

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