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

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

  description?: string | core.StringOut;

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

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

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

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

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

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

  constructor(name: string, args?: DeploymentArgs) {
    super(name, "aws_apigatewayv2_deployment", args);
  }

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