
commonMain.aws.sdk.kotlin.services.appmesh.model.GrpcRouteMatch.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 GrpcRouteMatch private constructor(builder: Builder) {
/**
* An object that represents the data to match from the request.
*/
public val metadata: List? = builder.metadata
/**
* The method name to match from the request. If you specify a name, you must also specify a `serviceName`.
*/
public val methodName: kotlin.String? = builder.methodName
/**
* The port number to match 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.GrpcRouteMatch = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GrpcRouteMatch(")
append("metadata=$metadata,")
append("methodName=$methodName,")
append("port=$port,")
append("serviceName=$serviceName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metadata?.hashCode() ?: 0
result = 31 * result + (methodName?.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 GrpcRouteMatch
if (metadata != other.metadata) return false
if (methodName != other.methodName) 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.GrpcRouteMatch = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An object that represents the data to match from the request.
*/
public var metadata: List? = null
/**
* The method name to match from the request. If you specify a name, you must also specify a `serviceName`.
*/
public var methodName: kotlin.String? = null
/**
* The port number to match 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.GrpcRouteMatch) : this() {
this.metadata = x.metadata
this.methodName = x.methodName
this.port = x.port
this.serviceName = x.serviceName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.GrpcRouteMatch = GrpcRouteMatch(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy