All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.model.SetSubnetsRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.elasticloadbalancingv2.model

import aws.smithy.kotlin.runtime.SdkDsl

public class SetSubnetsRequest private constructor(builder: Builder) {
    /**
     * [Application Load Balancers] The IP address type. The possible values are `ipv4` (for only IPv4 addresses), `dualstack` (for IPv4 and IPv6 addresses), and `dualstack-without-public-ipv4` (for IPv6 only public addresses, with private IPv4 and IPv6 addresses).
     *
     * [Network Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` (for IPv4 addresses) and `dualstack` (for IPv4 and IPv6 addresses). You can’t specify `dualstack` for a load balancer with a UDP or TCP_UDP listener.
     *
     * [Gateway Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` (for IPv4 addresses) and `dualstack` (for IPv4 and IPv6 addresses).
     */
    public val ipAddressType: aws.sdk.kotlin.services.elasticloadbalancingv2.model.IpAddressType? = builder.ipAddressType
    /**
     * The Amazon Resource Name (ARN) of the load balancer.
     */
    public val loadBalancerArn: kotlin.String? = builder.loadBalancerArn
    /**
     * The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
     *
     * [Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets.
     *
     * [Application Load Balancers on Outposts] You must specify one Outpost subnet.
     *
     * [Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones.
     *
     * [Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet if you need static IP addresses for your internet-facing load balancer. For internal load balancers, you can specify one private IP address per subnet from the IPv4 range of the subnet. For internet-facing load balancer, you can specify one IPv6 address per subnet.
     *
     * [Gateway Load Balancers] You can specify subnets from one or more Availability Zones.
     */
    public val subnetMappings: List? = builder.subnetMappings
    /**
     * The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
     *
     * [Application Load Balancers] You must specify subnets from at least two Availability Zones.
     *
     * [Application Load Balancers on Outposts] You must specify one Outpost subnet.
     *
     * [Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones.
     *
     * [Network Load Balancers] You can specify subnets from one or more Availability Zones.
     *
     * [Gateway Load Balancers] You can specify subnets from one or more Availability Zones.
     */
    public val subnets: List? = builder.subnets

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticloadbalancingv2.model.SetSubnetsRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("SetSubnetsRequest(")
        append("ipAddressType=$ipAddressType,")
        append("loadBalancerArn=$loadBalancerArn,")
        append("subnetMappings=$subnetMappings,")
        append("subnets=$subnets")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ipAddressType?.hashCode() ?: 0
        result = 31 * result + (loadBalancerArn?.hashCode() ?: 0)
        result = 31 * result + (subnetMappings?.hashCode() ?: 0)
        result = 31 * result + (subnets?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as SetSubnetsRequest

        if (ipAddressType != other.ipAddressType) return false
        if (loadBalancerArn != other.loadBalancerArn) return false
        if (subnetMappings != other.subnetMappings) return false
        if (subnets != other.subnets) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticloadbalancingv2.model.SetSubnetsRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * [Application Load Balancers] The IP address type. The possible values are `ipv4` (for only IPv4 addresses), `dualstack` (for IPv4 and IPv6 addresses), and `dualstack-without-public-ipv4` (for IPv6 only public addresses, with private IPv4 and IPv6 addresses).
         *
         * [Network Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` (for IPv4 addresses) and `dualstack` (for IPv4 and IPv6 addresses). You can’t specify `dualstack` for a load balancer with a UDP or TCP_UDP listener.
         *
         * [Gateway Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` (for IPv4 addresses) and `dualstack` (for IPv4 and IPv6 addresses).
         */
        public var ipAddressType: aws.sdk.kotlin.services.elasticloadbalancingv2.model.IpAddressType? = null
        /**
         * The Amazon Resource Name (ARN) of the load balancer.
         */
        public var loadBalancerArn: kotlin.String? = null
        /**
         * The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
         *
         * [Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets.
         *
         * [Application Load Balancers on Outposts] You must specify one Outpost subnet.
         *
         * [Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones.
         *
         * [Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet if you need static IP addresses for your internet-facing load balancer. For internal load balancers, you can specify one private IP address per subnet from the IPv4 range of the subnet. For internet-facing load balancer, you can specify one IPv6 address per subnet.
         *
         * [Gateway Load Balancers] You can specify subnets from one or more Availability Zones.
         */
        public var subnetMappings: List? = null
        /**
         * The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
         *
         * [Application Load Balancers] You must specify subnets from at least two Availability Zones.
         *
         * [Application Load Balancers on Outposts] You must specify one Outpost subnet.
         *
         * [Application Load Balancers on Local Zones] You can specify subnets from one or more Local Zones.
         *
         * [Network Load Balancers] You can specify subnets from one or more Availability Zones.
         *
         * [Gateway Load Balancers] You can specify subnets from one or more Availability Zones.
         */
        public var subnets: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticloadbalancingv2.model.SetSubnetsRequest) : this() {
            this.ipAddressType = x.ipAddressType
            this.loadBalancerArn = x.loadBalancerArn
            this.subnetMappings = x.subnetMappings
            this.subnets = x.subnets
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.elasticloadbalancingv2.model.SetSubnetsRequest = SetSubnetsRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy