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

export interface SubnetMappingArgs extends core.SchemaArgs {
  allocationId: string | core.StringOut;

  ipv6Address: string | core.StringOut;

  outpostId: string | core.StringOut;

  privateIpv4Address: string | core.StringOut;

  subnetId: string | core.StringOut;
}

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

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

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

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

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

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

  enabled: boolean | core.BooleanOut;

  prefix: string | core.StringOut;
}

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

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

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

export interface DsLbArgs {
  arn?: string | core.StringOut;

  name?: string | core.StringOut;

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

export class DsLb extends core.Data<DsLbArgs> {
  @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 })
  public arnSuffix!: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @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 vpcId!: string | core.StringOut;

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

  constructor(name: string, args?: DsLbArgs) {
    super(name, "aws_lb", args);
  }

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