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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

public class DetachInstancesFromLoadBalancerRequest private constructor(builder: Builder) {
    /**
     * An array of strings containing the names of the instances you want to detach from the load balancer.
     */
    public val instanceNames: List? = builder.instanceNames
    /**
     * The name of the Lightsail 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.DetachInstancesFromLoadBalancerRequest = Builder().apply(block).build()
    }

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

    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 DetachInstancesFromLoadBalancerRequest

        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.DetachInstancesFromLoadBalancerRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An array of strings containing the names of the instances you want to detach from the load balancer.
         */
        public var instanceNames: List? = null
        /**
         * The name of the Lightsail load balancer.
         */
        public var loadBalancerName: kotlin.String? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy