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

export interface AccessLogsArgs extends core.SchemaArgs {
  bucket: string | core.StringOut;

  bucketPrefix: string | core.StringOut;

  enabled: boolean | core.BooleanOut;

  interval: number | core.NumberOut;
}

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

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

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

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

export interface ListenerArgs extends core.SchemaArgs {
  instancePort: number | core.NumberOut;

  instanceProtocol: string | core.StringOut;

  lbPort: number | core.NumberOut;

  lbProtocol: string | core.StringOut;

  sslCertificateId: string | core.StringOut;
}

export class Listener extends core.Schema<ListenerArgs> {
  @core.attr(Number, { computed: true })
  public instancePort!: number | core.NumberOut;

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

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

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

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

export interface HealthCheckArgs extends core.SchemaArgs {
  healthyThreshold: number | core.NumberOut;

  interval: number | core.NumberOut;

  target: string | core.StringOut;

  timeout: number | core.NumberOut;

  unhealthyThreshold: number | core.NumberOut;
}

export class HealthCheck extends core.Schema<HealthCheckArgs> {
  @core.attr(Number, { computed: true })
  public healthyThreshold!: number | core.NumberOut;

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

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

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

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

export interface DsMainArgs {
  name: string | core.StringOut;

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

export class DsMain extends core.Data<DsMainArgs> {
  @core.attr(AccessLogs, { computed: true, kind: "array" })
  public accessLogs!: core.Array<AccessLogs> | core.ArrayOut<AccessLogs>;

  @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(Boolean, { computed: true })
  public connectionDraining!: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsMainArgs) {
    super(name, "aws_elb", args);
  }

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