
commonMain.aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteRewrite.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 the gateway route to rewrite.
*/
public class GrpcGatewayRouteRewrite private constructor(builder: Builder) {
/**
* The host name of the gateway route to rewrite.
*/
public val hostname: aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameRewrite? = builder.hostname
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteRewrite = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GrpcGatewayRouteRewrite(")
append("hostname=$hostname")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = hostname?.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 GrpcGatewayRouteRewrite
if (hostname != other.hostname) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteRewrite = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The host name of the gateway route to rewrite.
*/
public var hostname: aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameRewrite? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteRewrite) : this() {
this.hostname = x.hostname
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteRewrite = GrpcGatewayRouteRewrite(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameRewrite] inside the given [block]
*/
public fun hostname(block: aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameRewrite.Builder.() -> kotlin.Unit) {
this.hostname = aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameRewrite.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy