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

export interface AllSettingsArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  namespace: string | core.StringOut;

  resource?: string | core.StringOut;

  value: string | core.StringOut;
}

export class AllSettings extends core.Schema<AllSettingsArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

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

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

export interface SettingArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  namespace: string | core.StringOut;

  resource?: string | core.StringOut;

  value: string | core.StringOut;
}

export class Setting extends core.Schema<SettingArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

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

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

export interface EnvironmentArgs extends core.ResourceArgs {
  application: string | core.StringOut;

  cnamePrefix?: string | core.StringOut;

  description?: string | core.StringOut;

  name: string | core.StringOut;

  platformArn?: string | core.StringOut;

  pollInterval?: string | core.StringOut;

  setting?: core.Array<Setting> | core.ArrayOut<Setting>;

  solutionStackName?: string | core.StringOut;

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

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

  templateName?: string | core.StringOut;

  tier?: string | core.StringOut;

  versionLabel?: string | core.StringOut;

  waitForReadyTimeout?: string | core.StringOut;
}

export class Environment extends core.Resource<EnvironmentArgs> {
  @core.attr(AllSettings, { computed: true, kind: "array" })
  public allSettings!: core.Array<AllSettings> | core.ArrayOut<AllSettings>;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(Setting, { kind: "array" })
  public setting?: core.Array<Setting> | core.ArrayOut<Setting>;

  @core.attr(String, { computed: true })
  public solutionStackName?: 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>;

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

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

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

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

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

  constructor(name: string, args?: EnvironmentArgs) {
    super(name, "aws_elastic_beanstalk_environment", args);
  }

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