
commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.model.LoadBalancerState.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 the state of the load balancer.
*/
public class LoadBalancerState private constructor(builder: Builder) {
/**
* The state code. The initial state of the load balancer is `provisioning`. After the load balancer is fully set up and ready to route traffic, its state is `active`. If load balancer is routing traffic but does not have the resources it needs to scale, its state is`active_impaired`. If the load balancer could not be set up, its state is `failed`.
*/
public val code: aws.sdk.kotlin.services.elasticloadbalancingv2.model.LoadBalancerStateEnum? = builder.code
/**
* A description of the state.
*/
public val reason: kotlin.String? = builder.reason
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticloadbalancingv2.model.LoadBalancerState = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LoadBalancerState(")
append("code=$code,")
append("reason=$reason")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
result = 31 * result + (reason?.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 LoadBalancerState
if (code != other.code) return false
if (reason != other.reason) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticloadbalancingv2.model.LoadBalancerState = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The state code. The initial state of the load balancer is `provisioning`. After the load balancer is fully set up and ready to route traffic, its state is `active`. If load balancer is routing traffic but does not have the resources it needs to scale, its state is`active_impaired`. If the load balancer could not be set up, its state is `failed`.
*/
public var code: aws.sdk.kotlin.services.elasticloadbalancingv2.model.LoadBalancerStateEnum? = null
/**
* A description of the state.
*/
public var reason: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticloadbalancingv2.model.LoadBalancerState) : this() {
this.code = x.code
this.reason = x.reason
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticloadbalancingv2.model.LoadBalancerState = LoadBalancerState(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy