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

commonMain.aws.sdk.kotlin.services.appmesh.model.VirtualNodeHttpConnectionPool.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 VirtualNodeHttpConnectionPool 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" }
    /**
     * Number of overflowing requests after `max_connections` Envoy will queue to upstream cluster.
     */
    public val maxPendingRequests: kotlin.Int? = builder.maxPendingRequests

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

    override fun toString(): kotlin.String = buildString {
        append("VirtualNodeHttpConnectionPool(")
        append("maxConnections=$maxConnections,")
        append("maxPendingRequests=$maxPendingRequests")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = maxConnections
        result = 31 * result + (maxPendingRequests ?: 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 VirtualNodeHttpConnectionPool

        if (maxConnections != other.maxConnections) return false
        if (maxPendingRequests != other.maxPendingRequests) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.VirtualNodeHttpConnectionPool = 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
        /**
         * Number of overflowing requests after `max_connections` Envoy will queue to upstream cluster.
         */
        public var maxPendingRequests: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appmesh.model.VirtualNodeHttpConnectionPool) : this() {
            this.maxConnections = x.maxConnections
            this.maxPendingRequests = x.maxPendingRequests
        }

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

        internal fun correctErrors(): Builder {
            if (maxConnections == null) maxConnections = 0
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy