
commonMain.aws.sdk.kotlin.services.appmesh.model.HttpGatewayRoute.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 an HTTP gateway route.
*/
public class HttpGatewayRoute private constructor(builder: Builder) {
/**
* An object that represents the action to take if a match is determined.
*/
public val action: aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteAction? = builder.action
/**
* An object that represents the criteria for determining a request match.
*/
public val match: aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteMatch? = builder.match
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.HttpGatewayRoute = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HttpGatewayRoute(")
append("action=$action,")
append("match=$match")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (match?.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 HttpGatewayRoute
if (action != other.action) return false
if (match != other.match) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.HttpGatewayRoute = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An object that represents the action to take if a match is determined.
*/
public var action: aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteAction? = null
/**
* An object that represents the criteria for determining a request match.
*/
public var match: aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteMatch? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.HttpGatewayRoute) : this() {
this.action = x.action
this.match = x.match
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.HttpGatewayRoute = HttpGatewayRoute(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteAction] inside the given [block]
*/
public fun action(block: aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteAction.Builder.() -> kotlin.Unit) {
this.action = aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteAction.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteMatch] inside the given [block]
*/
public fun match(block: aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteMatch.Builder.() -> kotlin.Unit) {
this.match = aws.sdk.kotlin.services.appmesh.model.HttpGatewayRouteMatch.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy