
commonMain.aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteMatch.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 criteria for determining a request match.
*/
public class GrpcGatewayRouteMatch private constructor(builder: Builder) {
/**
* The gateway route host name to be matched on.
*/
public val hostname: aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameMatch? = builder.hostname
/**
* The gateway route metadata to be matched on.
*/
public val metadata: List? = builder.metadata
/**
* The gateway route port to be matched on.
*/
public val port: kotlin.Int? = builder.port
/**
* The fully qualified domain name for the service to match from the request.
*/
public val serviceName: kotlin.String? = builder.serviceName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteMatch = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GrpcGatewayRouteMatch(")
append("hostname=$hostname,")
append("metadata=$metadata,")
append("port=$port,")
append("serviceName=$serviceName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = hostname?.hashCode() ?: 0
result = 31 * result + (metadata?.hashCode() ?: 0)
result = 31 * result + (port ?: 0)
result = 31 * result + (serviceName?.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 GrpcGatewayRouteMatch
if (hostname != other.hostname) return false
if (metadata != other.metadata) return false
if (port != other.port) return false
if (serviceName != other.serviceName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteMatch = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The gateway route host name to be matched on.
*/
public var hostname: aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameMatch? = null
/**
* The gateway route metadata to be matched on.
*/
public var metadata: List? = null
/**
* The gateway route port to be matched on.
*/
public var port: kotlin.Int? = null
/**
* The fully qualified domain name for the service to match from the request.
*/
public var serviceName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteMatch) : this() {
this.hostname = x.hostname
this.metadata = x.metadata
this.port = x.port
this.serviceName = x.serviceName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.GrpcGatewayRouteMatch = GrpcGatewayRouteMatch(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameMatch] inside the given [block]
*/
public fun hostname(block: aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameMatch.Builder.() -> kotlin.Unit) {
this.hostname = aws.sdk.kotlin.services.appmesh.model.GatewayRouteHostnameMatch.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy