
commonMain.aws.sdk.kotlin.services.appmesh.model.GrpcTimeout.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 GrpcTimeout 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
/**
* An object that represents a per request timeout. The default value is 15 seconds. If you set a higher timeout, then make sure that the higher value is set for each App Mesh resource in a conversation. For example, if a virtual node backend uses a virtual router provider to route to another virtual node, then the timeout should be greater than 15 seconds for the source and destination virtual node and the route.
*/
public val perRequest: aws.sdk.kotlin.services.appmesh.model.Duration? = builder.perRequest
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.GrpcTimeout = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GrpcTimeout(")
append("idle=$idle,")
append("perRequest=$perRequest")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = idle?.hashCode() ?: 0
result = 31 * result + (perRequest?.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 GrpcTimeout
if (idle != other.idle) return false
if (perRequest != other.perRequest) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.GrpcTimeout = 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
/**
* An object that represents a per request timeout. The default value is 15 seconds. If you set a higher timeout, then make sure that the higher value is set for each App Mesh resource in a conversation. For example, if a virtual node backend uses a virtual router provider to route to another virtual node, then the timeout should be greater than 15 seconds for the source and destination virtual node and the route.
*/
public var perRequest: aws.sdk.kotlin.services.appmesh.model.Duration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.GrpcTimeout) : this() {
this.idle = x.idle
this.perRequest = x.perRequest
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.GrpcTimeout = GrpcTimeout(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)
}
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.Duration] inside the given [block]
*/
public fun perRequest(block: aws.sdk.kotlin.services.appmesh.model.Duration.Builder.() -> kotlin.Unit) {
this.perRequest = aws.sdk.kotlin.services.appmesh.model.Duration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy