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

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)
  public bucket!: string | core.StringOut;

  @core.attr(Boolean)
  public enabled?: boolean | core.BooleanOut;

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

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)
  public allocationId?: string | core.StringOut;

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

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

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

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

export interface LbArgs extends core.ResourceArgs {
  accessLogs?: AccessLogs;

  customerOwnedIpv4Pool?: string | core.StringOut;

  desyncMitigationMode?: string | core.StringOut;

  dropInvalidHeaderFields?: boolean | core.BooleanOut;

  enableCrossZoneLoadBalancing?: boolean | core.BooleanOut;

  enableDeletionProtection?: boolean | core.BooleanOut;

  enableHttp2?: boolean | core.BooleanOut;

  enableWafFailOpen?: boolean | core.BooleanOut;

  idleTimeout?: number | core.NumberOut;

  internal?: boolean | core.BooleanOut;

  ipAddressType?: string | core.StringOut;

  loadBalancerType?: string | core.StringOut;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  preserveHostHeader?: boolean | core.BooleanOut;

  securityGroups?: core.Array<string> | core.ArrayOut<core.StringOut>;

  subnetMapping?: core.Array<SubnetMapping> | core.ArrayOut<SubnetMapping>;

  subnets?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

export class Lb extends core.Resource<LbArgs> {
  @core.attr(AccessLogs)
  public accessLogs?: AccessLogs;

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

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

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

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

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

  @core.attr(Boolean)
  public dropInvalidHeaderFields?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public enableCrossZoneLoadBalancing?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public enableDeletionProtection?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public enableHttp2?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public enableWafFailOpen?: boolean | core.BooleanOut;

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

  @core.attr(Number)
  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)
  public loadBalancerType?: string | core.StringOut;

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

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

  @core.attr(Boolean)
  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, { 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, { computed: true })
  public vpcId!: string | core.StringOut;

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

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

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