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

commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.model.AvailabilityZone.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 an Availability Zone.
 */
public class AvailabilityZone private constructor(builder: Builder) {
    /**
     * [Network Load Balancers] If you need static IP addresses for your load balancer, you can specify one Elastic IP address per Availability Zone when you create an internal-facing load balancer. For internal load balancers, you can specify a private IP address from the IPv4 range of the subnet.
     */
    public val loadBalancerAddresses: List? = builder.loadBalancerAddresses
    /**
     * [Application Load Balancers on Outposts] The ID of the Outpost.
     */
    public val outpostId: kotlin.String? = builder.outpostId
    /**
     * The ID of the subnet. You can specify one subnet per Availability Zone.
     */
    public val subnetId: kotlin.String? = builder.subnetId
    /**
     * The name of the Availability Zone.
     */
    public val zoneName: kotlin.String? = builder.zoneName

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

    override fun toString(): kotlin.String = buildString {
        append("AvailabilityZone(")
        append("loadBalancerAddresses=$loadBalancerAddresses,")
        append("outpostId=$outpostId,")
        append("subnetId=$subnetId,")
        append("zoneName=$zoneName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = loadBalancerAddresses?.hashCode() ?: 0
        result = 31 * result + (outpostId?.hashCode() ?: 0)
        result = 31 * result + (subnetId?.hashCode() ?: 0)
        result = 31 * result + (zoneName?.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 AvailabilityZone

        if (loadBalancerAddresses != other.loadBalancerAddresses) return false
        if (outpostId != other.outpostId) return false
        if (subnetId != other.subnetId) return false
        if (zoneName != other.zoneName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * [Network Load Balancers] If you need static IP addresses for your load balancer, you can specify one Elastic IP address per Availability Zone when you create an internal-facing load balancer. For internal load balancers, you can specify a private IP address from the IPv4 range of the subnet.
         */
        public var loadBalancerAddresses: List? = null
        /**
         * [Application Load Balancers on Outposts] The ID of the Outpost.
         */
        public var outpostId: kotlin.String? = null
        /**
         * The ID of the subnet. You can specify one subnet per Availability Zone.
         */
        public var subnetId: kotlin.String? = null
        /**
         * The name of the Availability Zone.
         */
        public var zoneName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticloadbalancingv2.model.AvailabilityZone) : this() {
            this.loadBalancerAddresses = x.loadBalancerAddresses
            this.outpostId = x.outpostId
            this.subnetId = x.subnetId
            this.zoneName = x.zoneName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy