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

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

  deviceIndex: number | core.NumberOut;

  instance: string | core.StringOut;
}

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

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

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

export interface NetworkInterfaceArgs extends core.ResourceArgs {
  /**
   * (Optional) Configuration block to define the attachment of the ENI. See [Attachment](#attachment) be
   * low for more details!
   */
  attachment?: core.Array<Attachment> | core.ArrayOut<Attachment>;

  /**
   * (Optional) Description for the network interface.
   */
  description?: string | core.StringOut;

  /**
   * (Optional) Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `i
   * nterface_type` will cause the resource to be destroyed and re-created.
   */
  interfaceType?: string | core.StringOut;

  /**
   * (Optional) Number of IPv4 prefixes that AWS automatically assigns to the network interface.
   */
  ipv4PrefixCount?: number | core.NumberOut;

  /**
   * (Optional) One or more IPv4 prefixes assigned to the network interface.
   */
  ipv4Prefixes?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Number of IPv6 addresses to assign to a network interface. You can't use this option if s
   * pecifying specific `ipv6_addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute se
   * t to `true`, you can specify `0` to override this setting.
   */
  ipv6AddressCount?: number | core.NumberOut;

  /**
   * (Optional) List of private IPs to assign to the ENI in sequential order.
   */
  ipv6AddressList?: core.Array<string> | core.ArrayOut<core.StringOut>;

  ipv6AddressListEnabled?: boolean | core.BooleanOut;

  /**
   * (Optional) One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addres
   * ses are assigned without regard to order. You can't use this option if you're specifying `ipv6_addre
   * ss_count`.
   */
  ipv6Addresses?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Number of IPv6 prefixes that AWS automatically assigns to the network interface.
   */
  ipv6PrefixCount?: number | core.NumberOut;

  /**
   * (Optional) One or more IPv6 prefixes assigned to the network interface.
   */
  ipv6Prefixes?: core.Array<string> | core.ArrayOut<core.StringOut>;

  privateIp?: string | core.StringOut;

  /**
   * (Optional) List of private IPs to assign to the ENI in sequential order. Requires setting `private_i
   * p_list_enabled` to `true`.
   */
  privateIpList?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Whether `private_ip_list` is allowed and controls the IPs to assign to the ENI and `priva
   * te_ips` and `private_ips_count` become read-only. Default false.
   */
  privateIpListEnabled?: boolean | core.BooleanOut;

  /**
   * (Optional) List of private IPs to assign to the ENI without regard to order.
   */
  privateIps?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Number of secondary private IPs to assign to the ENI. The total number of private IPs wil
   * l be 1 + `private_ips_count`, as a primary private IP will be assiged to an ENI by default.
   */
  privateIpsCount?: number | core.NumberOut;

  /**
   * (Optional) List of security group IDs to assign to the ENI.
   */
  securityGroups?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Whether to enable source destination checking for the ENI. Default true.
   */
  sourceDestCheck?: boolean | core.BooleanOut;

  /**
   * (Required) Subnet ID to create the ENI in.
   */
  subnetId: string | core.StringOut;

  /**
   * (Optional) Map of tags to assign to the resource. If configured with a provider [`default_tags` conf
   * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf
   * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level
   * .
   */
  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * Map of tags assigned to the resource, including those inherited from the provider [`default_tags` co
   * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co
   * nfiguration-block).
   */
  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;
}

export class NetworkInterface extends core.Resource<NetworkInterfaceArgs> {
  /**
   * ARN of the network interface.
   */
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  /**
   * (Optional) Configuration block to define the attachment of the ENI. See [Attachment](#attachment) be
   * low for more details!
   */
  @core.attr(Attachment, { computed: true, kind: "array" })
  public attachment?: core.Array<Attachment> | core.ArrayOut<Attachment>;

  /**
   * (Optional) Description for the network interface.
   */
  @core.attr(String)
  public description?: string | core.StringOut;

  /**
   * ID of the network interface.
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Optional) Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `i
   * nterface_type` will cause the resource to be destroyed and re-created.
   */
  @core.attr(String, { computed: true })
  public interfaceType?: string | core.StringOut;

  /**
   * (Optional) Number of IPv4 prefixes that AWS automatically assigns to the network interface.
   */
  @core.attr(Number, { computed: true })
  public ipv4PrefixCount?: number | core.NumberOut;

  /**
   * (Optional) One or more IPv4 prefixes assigned to the network interface.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public ipv4Prefixes?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Number of IPv6 addresses to assign to a network interface. You can't use this option if s
   * pecifying specific `ipv6_addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute se
   * t to `true`, you can specify `0` to override this setting.
   */
  @core.attr(Number, { computed: true })
  public ipv6AddressCount?: number | core.NumberOut;

  /**
   * (Optional) List of private IPs to assign to the ENI in sequential order.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public ipv6AddressList?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

  /**
   * (Optional) One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addres
   * ses are assigned without regard to order. You can't use this option if you're specifying `ipv6_addre
   * ss_count`.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public ipv6Addresses?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Number of IPv6 prefixes that AWS automatically assigns to the network interface.
   */
  @core.attr(Number, { computed: true })
  public ipv6PrefixCount?: number | core.NumberOut;

  /**
   * (Optional) One or more IPv6 prefixes assigned to the network interface.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public ipv6Prefixes?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * MAC address of the network interface.
   */
  @core.attr(String, { computed: true })
  public macAddress!: string | core.StringOut;

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

  /**
   * AWS account ID of the owner of the network interface.
   */
  @core.attr(String, { computed: true })
  public ownerId!: string | core.StringOut;

  /**
   * Private DNS name of the network interface (IPv4).
   */
  @core.attr(String, { computed: true })
  public privateDnsName!: string | core.StringOut;

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

  /**
   * (Optional) List of private IPs to assign to the ENI in sequential order. Requires setting `private_i
   * p_list_enabled` to `true`.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public privateIpList?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Whether `private_ip_list` is allowed and controls the IPs to assign to the ENI and `priva
   * te_ips` and `private_ips_count` become read-only. Default false.
   */
  @core.attr(Boolean)
  public privateIpListEnabled?: boolean | core.BooleanOut;

  /**
   * (Optional) List of private IPs to assign to the ENI without regard to order.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public privateIps?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Number of secondary private IPs to assign to the ENI. The total number of private IPs wil
   * l be 1 + `private_ips_count`, as a primary private IP will be assiged to an ENI by default.
   */
  @core.attr(Number, { computed: true })
  public privateIpsCount?: number | core.NumberOut;

  /**
   * (Optional) List of security group IDs to assign to the ENI.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public securityGroups?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Whether to enable source destination checking for the ENI. Default true.
   */
  @core.attr(Boolean)
  public sourceDestCheck?: boolean | core.BooleanOut;

  /**
   * (Required) Subnet ID to create the ENI in.
   */
  @core.attr(String)
  public subnetId!: string | core.StringOut;

  /**
   * (Optional) Map of tags to assign to the resource. If configured with a provider [`default_tags` conf
   * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf
   * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level
   * .
   */
  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * Map of tags assigned to the resource, including those inherited from the provider [`default_tags` co
   * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co
   * nfiguration-block).
   */
  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: NetworkInterfaceArgs) {
    super(name, "aws_network_interface", args);
  }

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