commonMain.aws.sdk.kotlin.services.securityhub.model.AwsElbLoadBalancerConnectionDraining.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of securityhub-jvm Show documentation
Show all versions of securityhub-jvm Show documentation
The AWS SDK for Kotlin client for SecurityHub
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.securityhub.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains information about the connection draining configuration for the load balancer.
*/
public class AwsElbLoadBalancerConnectionDraining private constructor(builder: Builder) {
/**
* Indicates whether connection draining is enabled for the load balancer.
*/
public val enabled: kotlin.Boolean? = builder.enabled
/**
* The maximum time, in seconds, to keep the existing connections open before deregistering the instances.
*/
public val timeout: kotlin.Int? = builder.timeout
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.securityhub.model.AwsElbLoadBalancerConnectionDraining = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AwsElbLoadBalancerConnectionDraining(")
append("enabled=$enabled,")
append("timeout=$timeout")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enabled?.hashCode() ?: 0
result = 31 * result + (timeout ?: 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 AwsElbLoadBalancerConnectionDraining
if (enabled != other.enabled) return false
if (timeout != other.timeout) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.securityhub.model.AwsElbLoadBalancerConnectionDraining = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates whether connection draining is enabled for the load balancer.
*/
public var enabled: kotlin.Boolean? = null
/**
* The maximum time, in seconds, to keep the existing connections open before deregistering the instances.
*/
public var timeout: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.securityhub.model.AwsElbLoadBalancerConnectionDraining) : this() {
this.enabled = x.enabled
this.timeout = x.timeout
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.securityhub.model.AwsElbLoadBalancerConnectionDraining = AwsElbLoadBalancerConnectionDraining(this)
internal fun correctErrors(): Builder {
return this
}
}
}