// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.ec2.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class LaunchTemplateNetworkInterface {
    /**
     * @return Associate a Carrier IP address with `eth0` for a new network interface.
     * Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface.
     * Boolean value, can be left unset.
     * 
     */
    private @Nullable String associateCarrierIpAddress;
    /**
     * @return Associate a public ip address with the network interface.
     * Boolean value, can be left unset.
     * 
     */
    private @Nullable String associatePublicIpAddress;
    /**
     * @return Whether the network interface should be destroyed on instance termination.
     * 
     */
    private @Nullable String deleteOnTermination;
    /**
     * @return Description of the network interface.
     * 
     */
    private @Nullable String description;
    /**
     * @return The integer index of the network interface attachment.
     * 
     */
    private @Nullable Integer deviceIndex;
    /**
     * @return The type of network interface. To create an Elastic Fabric Adapter (EFA), specify `efa`.
     * 
     */
    private @Nullable String interfaceType;
    /**
     * @return The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with `ipv4_addresses`
     * 
     */
    private @Nullable Integer ipv4AddressCount;
    /**
     * @return One or more private IPv4 addresses to associate. Conflicts with `ipv4_address_count`
     * 
     */
    private @Nullable List<String> ipv4Addresses;
    /**
     * @return The number of IPv4 prefixes to be automatically assigned to the network interface. Conflicts with `ipv4_prefixes`
     * 
     */
    private @Nullable Integer ipv4PrefixCount;
    /**
     * @return One or more IPv4 prefixes to be assigned to the network interface. Conflicts with `ipv4_prefix_count`
     * 
     */
    private @Nullable List<String> ipv4Prefixes;
    /**
     * @return The number of IPv6 addresses to assign to a network interface. Conflicts with `ipv6_addresses`
     * 
     */
    private @Nullable Integer ipv6AddressCount;
    /**
     * @return One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with `ipv6_address_count`
     * 
     */
    private @Nullable List<String> ipv6Addresses;
    /**
     * @return The number of IPv6 prefixes to be automatically assigned to the network interface. Conflicts with `ipv6_prefixes`
     * 
     */
    private @Nullable Integer ipv6PrefixCount;
    /**
     * @return One or more IPv6 prefixes to be assigned to the network interface. Conflicts with `ipv6_prefix_count`
     * 
     */
    private @Nullable List<String> ipv6Prefixes;
    /**
     * @return The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
     * 
     */
    private @Nullable Integer networkCardIndex;
    /**
     * @return The ID of the network interface to attach.
     * 
     */
    private @Nullable String networkInterfaceId;
    /**
     * @return The primary private IPv4 address.
     * 
     */
    private @Nullable String privateIpAddress;
    /**
     * @return A list of security group IDs to associate.
     * 
     */
    private @Nullable List<String> securityGroups;
    /**
     * @return The VPC Subnet ID to associate.
     * 
     */
    private @Nullable String subnetId;

    private LaunchTemplateNetworkInterface() {}
    /**
     * @return Associate a Carrier IP address with `eth0` for a new network interface.
     * Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface.
     * Boolean value, can be left unset.
     * 
     */
    public Optional<String> associateCarrierIpAddress() {
        return Optional.ofNullable(this.associateCarrierIpAddress);
    }
    /**
     * @return Associate a public ip address with the network interface.
     * Boolean value, can be left unset.
     * 
     */
    public Optional<String> associatePublicIpAddress() {
        return Optional.ofNullable(this.associatePublicIpAddress);
    }
    /**
     * @return Whether the network interface should be destroyed on instance termination.
     * 
     */
    public Optional<String> deleteOnTermination() {
        return Optional.ofNullable(this.deleteOnTermination);
    }
    /**
     * @return Description of the network interface.
     * 
     */
    public Optional<String> description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return The integer index of the network interface attachment.
     * 
     */
    public Optional<Integer> deviceIndex() {
        return Optional.ofNullable(this.deviceIndex);
    }
    /**
     * @return The type of network interface. To create an Elastic Fabric Adapter (EFA), specify `efa`.
     * 
     */
    public Optional<String> interfaceType() {
        return Optional.ofNullable(this.interfaceType);
    }
    /**
     * @return The number of secondary private IPv4 addresses to assign to a network interface. Conflicts with `ipv4_addresses`
     * 
     */
    public Optional<Integer> ipv4AddressCount() {
        return Optional.ofNullable(this.ipv4AddressCount);
    }
    /**
     * @return One or more private IPv4 addresses to associate. Conflicts with `ipv4_address_count`
     * 
     */
    public List<String> ipv4Addresses() {
        return this.ipv4Addresses == null ? List.of() : this.ipv4Addresses;
    }
    /**
     * @return The number of IPv4 prefixes to be automatically assigned to the network interface. Conflicts with `ipv4_prefixes`
     * 
     */
    public Optional<Integer> ipv4PrefixCount() {
        return Optional.ofNullable(this.ipv4PrefixCount);
    }
    /**
     * @return One or more IPv4 prefixes to be assigned to the network interface. Conflicts with `ipv4_prefix_count`
     * 
     */
    public List<String> ipv4Prefixes() {
        return this.ipv4Prefixes == null ? List.of() : this.ipv4Prefixes;
    }
    /**
     * @return The number of IPv6 addresses to assign to a network interface. Conflicts with `ipv6_addresses`
     * 
     */
    public Optional<Integer> ipv6AddressCount() {
        return Optional.ofNullable(this.ipv6AddressCount);
    }
    /**
     * @return One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Conflicts with `ipv6_address_count`
     * 
     */
    public List<String> ipv6Addresses() {
        return this.ipv6Addresses == null ? List.of() : this.ipv6Addresses;
    }
    /**
     * @return The number of IPv6 prefixes to be automatically assigned to the network interface. Conflicts with `ipv6_prefixes`
     * 
     */
    public Optional<Integer> ipv6PrefixCount() {
        return Optional.ofNullable(this.ipv6PrefixCount);
    }
    /**
     * @return One or more IPv6 prefixes to be assigned to the network interface. Conflicts with `ipv6_prefix_count`
     * 
     */
    public List<String> ipv6Prefixes() {
        return this.ipv6Prefixes == null ? List.of() : this.ipv6Prefixes;
    }
    /**
     * @return The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
     * 
     */
    public Optional<Integer> networkCardIndex() {
        return Optional.ofNullable(this.networkCardIndex);
    }
    /**
     * @return The ID of the network interface to attach.
     * 
     */
    public Optional<String> networkInterfaceId() {
        return Optional.ofNullable(this.networkInterfaceId);
    }
    /**
     * @return The primary private IPv4 address.
     * 
     */
    public Optional<String> privateIpAddress() {
        return Optional.ofNullable(this.privateIpAddress);
    }
    /**
     * @return A list of security group IDs to associate.
     * 
     */
    public List<String> securityGroups() {
        return this.securityGroups == null ? List.of() : this.securityGroups;
    }
    /**
     * @return The VPC Subnet ID to associate.
     * 
     */
    public Optional<String> subnetId() {
        return Optional.ofNullable(this.subnetId);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(LaunchTemplateNetworkInterface defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String associateCarrierIpAddress;
        private @Nullable String associatePublicIpAddress;
        private @Nullable String deleteOnTermination;
        private @Nullable String description;
        private @Nullable Integer deviceIndex;
        private @Nullable String interfaceType;
        private @Nullable Integer ipv4AddressCount;
        private @Nullable List<String> ipv4Addresses;
        private @Nullable Integer ipv4PrefixCount;
        private @Nullable List<String> ipv4Prefixes;
        private @Nullable Integer ipv6AddressCount;
        private @Nullable List<String> ipv6Addresses;
        private @Nullable Integer ipv6PrefixCount;
        private @Nullable List<String> ipv6Prefixes;
        private @Nullable Integer networkCardIndex;
        private @Nullable String networkInterfaceId;
        private @Nullable String privateIpAddress;
        private @Nullable List<String> securityGroups;
        private @Nullable String subnetId;
        public Builder() {}
        public Builder(LaunchTemplateNetworkInterface defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.associateCarrierIpAddress = defaults.associateCarrierIpAddress;
    	      this.associatePublicIpAddress = defaults.associatePublicIpAddress;
    	      this.deleteOnTermination = defaults.deleteOnTermination;
    	      this.description = defaults.description;
    	      this.deviceIndex = defaults.deviceIndex;
    	      this.interfaceType = defaults.interfaceType;
    	      this.ipv4AddressCount = defaults.ipv4AddressCount;
    	      this.ipv4Addresses = defaults.ipv4Addresses;
    	      this.ipv4PrefixCount = defaults.ipv4PrefixCount;
    	      this.ipv4Prefixes = defaults.ipv4Prefixes;
    	      this.ipv6AddressCount = defaults.ipv6AddressCount;
    	      this.ipv6Addresses = defaults.ipv6Addresses;
    	      this.ipv6PrefixCount = defaults.ipv6PrefixCount;
    	      this.ipv6Prefixes = defaults.ipv6Prefixes;
    	      this.networkCardIndex = defaults.networkCardIndex;
    	      this.networkInterfaceId = defaults.networkInterfaceId;
    	      this.privateIpAddress = defaults.privateIpAddress;
    	      this.securityGroups = defaults.securityGroups;
    	      this.subnetId = defaults.subnetId;
        }

        @CustomType.Setter
        public Builder associateCarrierIpAddress(@Nullable String associateCarrierIpAddress) {
            this.associateCarrierIpAddress = associateCarrierIpAddress;
            return this;
        }
        @CustomType.Setter
        public Builder associatePublicIpAddress(@Nullable String associatePublicIpAddress) {
            this.associatePublicIpAddress = associatePublicIpAddress;
            return this;
        }
        @CustomType.Setter
        public Builder deleteOnTermination(@Nullable String deleteOnTermination) {
            this.deleteOnTermination = deleteOnTermination;
            return this;
        }
        @CustomType.Setter
        public Builder description(@Nullable String description) {
            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder deviceIndex(@Nullable Integer deviceIndex) {
            this.deviceIndex = deviceIndex;
            return this;
        }
        @CustomType.Setter
        public Builder interfaceType(@Nullable String interfaceType) {
            this.interfaceType = interfaceType;
            return this;
        }
        @CustomType.Setter
        public Builder ipv4AddressCount(@Nullable Integer ipv4AddressCount) {
            this.ipv4AddressCount = ipv4AddressCount;
            return this;
        }
        @CustomType.Setter
        public Builder ipv4Addresses(@Nullable List<String> ipv4Addresses) {
            this.ipv4Addresses = ipv4Addresses;
            return this;
        }
        public Builder ipv4Addresses(String... ipv4Addresses) {
            return ipv4Addresses(List.of(ipv4Addresses));
        }
        @CustomType.Setter
        public Builder ipv4PrefixCount(@Nullable Integer ipv4PrefixCount) {
            this.ipv4PrefixCount = ipv4PrefixCount;
            return this;
        }
        @CustomType.Setter
        public Builder ipv4Prefixes(@Nullable List<String> ipv4Prefixes) {
            this.ipv4Prefixes = ipv4Prefixes;
            return this;
        }
        public Builder ipv4Prefixes(String... ipv4Prefixes) {
            return ipv4Prefixes(List.of(ipv4Prefixes));
        }
        @CustomType.Setter
        public Builder ipv6AddressCount(@Nullable Integer ipv6AddressCount) {
            this.ipv6AddressCount = ipv6AddressCount;
            return this;
        }
        @CustomType.Setter
        public Builder ipv6Addresses(@Nullable List<String> ipv6Addresses) {
            this.ipv6Addresses = ipv6Addresses;
            return this;
        }
        public Builder ipv6Addresses(String... ipv6Addresses) {
            return ipv6Addresses(List.of(ipv6Addresses));
        }
        @CustomType.Setter
        public Builder ipv6PrefixCount(@Nullable Integer ipv6PrefixCount) {
            this.ipv6PrefixCount = ipv6PrefixCount;
            return this;
        }
        @CustomType.Setter
        public Builder ipv6Prefixes(@Nullable List<String> ipv6Prefixes) {
            this.ipv6Prefixes = ipv6Prefixes;
            return this;
        }
        public Builder ipv6Prefixes(String... ipv6Prefixes) {
            return ipv6Prefixes(List.of(ipv6Prefixes));
        }
        @CustomType.Setter
        public Builder networkCardIndex(@Nullable Integer networkCardIndex) {
            this.networkCardIndex = networkCardIndex;
            return this;
        }
        @CustomType.Setter
        public Builder networkInterfaceId(@Nullable String networkInterfaceId) {
            this.networkInterfaceId = networkInterfaceId;
            return this;
        }
        @CustomType.Setter
        public Builder privateIpAddress(@Nullable String privateIpAddress) {
            this.privateIpAddress = privateIpAddress;
            return this;
        }
        @CustomType.Setter
        public Builder securityGroups(@Nullable List<String> securityGroups) {
            this.securityGroups = securityGroups;
            return this;
        }
        public Builder securityGroups(String... securityGroups) {
            return securityGroups(List.of(securityGroups));
        }
        @CustomType.Setter
        public Builder subnetId(@Nullable String subnetId) {
            this.subnetId = subnetId;
            return this;
        }
        public LaunchTemplateNetworkInterface build() {
            final var o = new LaunchTemplateNetworkInterface();
            o.associateCarrierIpAddress = associateCarrierIpAddress;
            o.associatePublicIpAddress = associatePublicIpAddress;
            o.deleteOnTermination = deleteOnTermination;
            o.description = description;
            o.deviceIndex = deviceIndex;
            o.interfaceType = interfaceType;
            o.ipv4AddressCount = ipv4AddressCount;
            o.ipv4Addresses = ipv4Addresses;
            o.ipv4PrefixCount = ipv4PrefixCount;
            o.ipv4Prefixes = ipv4Prefixes;
            o.ipv6AddressCount = ipv6AddressCount;
            o.ipv6Addresses = ipv6Addresses;
            o.ipv6PrefixCount = ipv6PrefixCount;
            o.ipv6Prefixes = ipv6Prefixes;
            o.networkCardIndex = networkCardIndex;
            o.networkInterfaceId = networkInterfaceId;
            o.privateIpAddress = privateIpAddress;
            o.securityGroups = securityGroups;
            o.subnetId = subnetId;
            return o;
        }
    }
}
