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

export interface EgressArgs extends core.SchemaArgs {
  action: string | core.StringOut;

  cidrBlock?: string | core.StringOut;

  fromPort: number | core.NumberOut;

  icmpCode?: number | core.NumberOut;

  icmpType?: number | core.NumberOut;

  ipv6CidrBlock?: string | core.StringOut;

  protocol: string | core.StringOut;

  ruleNo: number | core.NumberOut;

  toPort: number | core.NumberOut;
}

export class Egress extends core.Schema<EgressArgs> {
  @core.attr(String)
  public action!: string | core.StringOut;

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

  @core.attr(Number)
  public fromPort!: number | core.NumberOut;

  @core.attr(Number)
  public icmpCode?: number | core.NumberOut;

  @core.attr(Number)
  public icmpType?: number | core.NumberOut;

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

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

  @core.attr(Number)
  public ruleNo!: number | core.NumberOut;

  @core.attr(Number)
  public toPort!: number | core.NumberOut;
}

export interface IngressArgs extends core.SchemaArgs {
  action: string | core.StringOut;

  cidrBlock?: string | core.StringOut;

  fromPort: number | core.NumberOut;

  icmpCode?: number | core.NumberOut;

  icmpType?: number | core.NumberOut;

  ipv6CidrBlock?: string | core.StringOut;

  protocol: string | core.StringOut;

  ruleNo: number | core.NumberOut;

  toPort: number | core.NumberOut;
}

export class Ingress extends core.Schema<IngressArgs> {
  @core.attr(String)
  public action!: string | core.StringOut;

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

  @core.attr(Number)
  public fromPort!: number | core.NumberOut;

  @core.attr(Number)
  public icmpCode?: number | core.NumberOut;

  @core.attr(Number)
  public icmpType?: number | core.NumberOut;

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

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

  @core.attr(Number)
  public ruleNo!: number | core.NumberOut;

  @core.attr(Number)
  public toPort!: number | core.NumberOut;
}

export interface DefaultNetworkAclArgs extends core.ResourceArgs {
  defaultNetworkAclId: string | core.StringOut;

  egress?: core.Array<Egress> | core.ArrayOut<Egress>;

  ingress?: core.Array<Ingress> | core.ArrayOut<Ingress>;

  subnetIds?: 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 DefaultNetworkAcl extends core.Resource<DefaultNetworkAclArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

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

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

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

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

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

  @core.attr(String, { kind: "array" })
  public subnetIds?: 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;

  constructor(name: string, args?: DefaultNetworkAclArgs) {
    super(name, "aws_default_network_acl", args);
  }

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