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

commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.model.SubnetMapping.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

/**
 * Information about a subnet mapping.
 */
public class SubnetMapping private constructor(builder: Builder) {
    /**
     * [Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer.
     */
    public val allocationId: kotlin.String? = builder.allocationId
    /**
     * [Network Load Balancers] The IPv6 address.
     */
    public val ipv6Address: kotlin.String? = builder.ipv6Address
    /**
     * [Network Load Balancers] The private IPv4 address for an internal load balancer.
     */
    public val privateIpv4Address: kotlin.String? = builder.privateIpv4Address
    /**
     * The ID of the subnet.
     */
    public val subnetId: kotlin.String? = builder.subnetId

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

    override fun toString(): kotlin.String = buildString {
        append("SubnetMapping(")
        append("allocationId=$allocationId,")
        append("ipv6Address=$ipv6Address,")
        append("privateIpv4Address=$privateIpv4Address,")
        append("subnetId=$subnetId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = allocationId?.hashCode() ?: 0
        result = 31 * result + (ipv6Address?.hashCode() ?: 0)
        result = 31 * result + (privateIpv4Address?.hashCode() ?: 0)
        result = 31 * result + (subnetId?.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 SubnetMapping

        if (allocationId != other.allocationId) return false
        if (ipv6Address != other.ipv6Address) return false
        if (privateIpv4Address != other.privateIpv4Address) return false
        if (subnetId != other.subnetId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * [Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer.
         */
        public var allocationId: kotlin.String? = null
        /**
         * [Network Load Balancers] The IPv6 address.
         */
        public var ipv6Address: kotlin.String? = null
        /**
         * [Network Load Balancers] The private IPv4 address for an internal load balancer.
         */
        public var privateIpv4Address: kotlin.String? = null
        /**
         * The ID of the subnet.
         */
        public var subnetId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticloadbalancingv2.model.SubnetMapping) : this() {
            this.allocationId = x.allocationId
            this.ipv6Address = x.ipv6Address
            this.privateIpv4Address = x.privateIpv4Address
            this.subnetId = x.subnetId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy