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

export interface LaunchTemplateArgs extends core.SchemaArgs {
  id: string | core.StringOut;

  name: string | core.StringOut;

  version: string | core.StringOut;
}

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

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

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

export interface DsGroupArgs {
  name: string | core.StringOut;
}

export class DsGroup extends core.Data<DsGroupArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

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

  @core.attr(Number, { computed: true })
  public defaultCooldown!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public desiredCapacity!: number | core.NumberOut;

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

  @core.attr(Number, { computed: true })
  public healthCheckGracePeriod!: number | core.NumberOut;

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

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

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

  @core.attr(LaunchTemplate, { computed: true, kind: "array" })
  public launchTemplate!:
    | core.Array<LaunchTemplate>
    | core.ArrayOut<LaunchTemplate>;

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

  @core.attr(Number, { computed: true })
  public maxSize!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public minSize!: number | core.NumberOut;

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsGroupArgs) {
    super(name, "aws_autoscaling_group", args);
  }

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