
commonMain.aws.sdk.kotlin.services.appmesh.model.VirtualNodeTcpConnectionPool.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appmesh.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object that represents a type of connection pool.
*/
public class VirtualNodeTcpConnectionPool private constructor(builder: Builder) {
/**
* Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream cluster.
*/
public val maxConnections: kotlin.Int = requireNotNull(builder.maxConnections) { "A non-null value must be provided for maxConnections" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.VirtualNodeTcpConnectionPool = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("VirtualNodeTcpConnectionPool(")
append("maxConnections=$maxConnections")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maxConnections
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 VirtualNodeTcpConnectionPool
if (maxConnections != other.maxConnections) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.VirtualNodeTcpConnectionPool = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Maximum number of outbound TCP connections Envoy can establish concurrently with all hosts in upstream cluster.
*/
public var maxConnections: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.VirtualNodeTcpConnectionPool) : this() {
this.maxConnections = x.maxConnections
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.VirtualNodeTcpConnectionPool = VirtualNodeTcpConnectionPool(this)
internal fun correctErrors(): Builder {
if (maxConnections == null) maxConnections = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy