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

commonMain.aws.sdk.kotlin.services.lightsail.model.AttachInstancesToLoadBalancerRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lightsail.model



public class AttachInstancesToLoadBalancerRequest private constructor(builder: Builder) {
    /**
     * An array of strings representing the instance name(s) you want to attach to your load balancer.
     *
     * An instance must be `running` before you can attach it to your load balancer.
     *
     * There are no additional limits on the number of instances you can attach to your load balancer, aside from the limit of Lightsail instances you can create in your account (20).
     */
    public val instanceNames: List? = builder.instanceNames
    /**
     * The name of the load balancer.
     */
    public val loadBalancerName: kotlin.String? = builder.loadBalancerName

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

    override fun toString(): kotlin.String = buildString {
        append("AttachInstancesToLoadBalancerRequest(")
        append("instanceNames=$instanceNames,")
        append("loadBalancerName=$loadBalancerName)")
    }

    override fun hashCode(): kotlin.Int {
        var result = instanceNames?.hashCode() ?: 0
        result = 31 * result + (loadBalancerName?.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 AttachInstancesToLoadBalancerRequest

        if (instanceNames != other.instanceNames) return false
        if (loadBalancerName != other.loadBalancerName) return false

        return true
    }

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

    public class Builder {
        /**
         * An array of strings representing the instance name(s) you want to attach to your load balancer.
         *
         * An instance must be `running` before you can attach it to your load balancer.
         *
         * There are no additional limits on the number of instances you can attach to your load balancer, aside from the limit of Lightsail instances you can create in your account (20).
         */
        public var instanceNames: List? = null
        /**
         * The name of the load balancer.
         */
        public var loadBalancerName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.AttachInstancesToLoadBalancerRequest) : this() {
            this.instanceNames = x.instanceNames
            this.loadBalancerName = x.loadBalancerName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lightsail.model.AttachInstancesToLoadBalancerRequest = AttachInstancesToLoadBalancerRequest(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy