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

export interface AppversionLifecycleArgs extends core.SchemaArgs {
  deleteSourceFromS3: boolean | core.BooleanOut;

  maxAgeInDays: number | core.NumberOut;

  maxCount: number | core.NumberOut;

  serviceRole: string | core.StringOut;
}

export class AppversionLifecycle extends core.Schema<AppversionLifecycleArgs> {
  @core.attr(Boolean, { computed: true })
  public deleteSourceFromS3!: boolean | core.BooleanOut;

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

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

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

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

export class DsApplication extends core.Data<DsApplicationArgs> {
  @core.attr(AppversionLifecycle, { computed: true, kind: "array" })
  public appversionLifecycle!:
    | core.Array<AppversionLifecycle>
    | core.ArrayOut<AppversionLifecycle>;

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

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

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

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

  constructor(name: string, args?: DsApplicationArgs) {
    super(name, "aws_elastic_beanstalk_application", args);
  }

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