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

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

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

export interface AttachmentArgs extends core.SchemaArgs {
  endpointId: string | core.StringOut;

  subnetId: string | core.StringOut;
}

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

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

export interface SyncStatesArgs extends core.SchemaArgs {
  attachment: core.Array<Attachment> | core.ArrayOut<Attachment>;

  availabilityZone: string | core.StringOut;
}

export class SyncStates extends core.Schema<SyncStatesArgs> {
  @core.attr(Attachment, { computed: true, kind: "array" })
  public attachment!: core.Array<Attachment> | core.ArrayOut<Attachment>;

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

export interface FirewallStatusArgs extends core.SchemaArgs {
  syncStates: core.Array<SyncStates> | core.ArrayOut<SyncStates>;
}

export class FirewallStatus extends core.Schema<FirewallStatusArgs> {
  @core.attr(SyncStates, { computed: true, kind: "array" })
  public syncStates!: core.Array<SyncStates> | core.ArrayOut<SyncStates>;
}

export interface FirewallArgs extends core.ResourceArgs {
  deleteProtection?: boolean | core.BooleanOut;

  description?: string | core.StringOut;

  firewallPolicyArn: string | core.StringOut;

  firewallPolicyChangeProtection?: boolean | core.BooleanOut;

  name: string | core.StringOut;

  subnetChangeProtection?: boolean | core.BooleanOut;

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

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

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

  vpcId: string | core.StringOut;
}

export class Firewall extends core.Resource<FirewallArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: FirewallArgs) {
    super(name, "aws_networkfirewall_firewall", args);
  }

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