
commonMain.aws.sdk.kotlin.services.appmesh.model.TcpTimeout.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 types of timeouts.
*/
public class TcpTimeout private constructor(builder: Builder) {
/**
* An object that represents an idle timeout. An idle timeout bounds the amount of time that a connection may be idle. The default value is none.
*/
public val idle: aws.sdk.kotlin.services.appmesh.model.Duration? = builder.idle
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.TcpTimeout = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TcpTimeout(")
append("idle=$idle")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = idle?.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 TcpTimeout
if (idle != other.idle) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.TcpTimeout = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An object that represents an idle timeout. An idle timeout bounds the amount of time that a connection may be idle. The default value is none.
*/
public var idle: aws.sdk.kotlin.services.appmesh.model.Duration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.TcpTimeout) : this() {
this.idle = x.idle
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.TcpTimeout = TcpTimeout(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.Duration] inside the given [block]
*/
public fun idle(block: aws.sdk.kotlin.services.appmesh.model.Duration.Builder.() -> kotlin.Unit) {
this.idle = aws.sdk.kotlin.services.appmesh.model.Duration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy