
commonMain.aws.sdk.kotlin.services.appmesh.model.CreateGatewayRouteRequest.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
public class CreateGatewayRouteRequest private constructor(builder: Builder) {
/**
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* The name to use for the gateway route.
*/
public val gatewayRouteName: kotlin.String = requireNotNull(builder.gatewayRouteName) { "A non-null value must be provided for gatewayRouteName" }
/**
* The name of the service mesh to create the gateway route in.
*/
public val meshName: kotlin.String = requireNotNull(builder.meshName) { "A non-null value must be provided for meshName" }
/**
* The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see [Working with shared meshes](https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html).
*/
public val meshOwner: kotlin.String? = builder.meshOwner
/**
* The gateway route specification to apply.
*/
public val spec: aws.sdk.kotlin.services.appmesh.model.GatewayRouteSpec? = builder.spec
/**
* Optional metadata that you can apply to the gateway route to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
*/
public val tags: List? = builder.tags
/**
* The name of the virtual gateway to associate the gateway route with. If the virtual gateway is in a shared mesh, then you must be the owner of the virtual gateway resource.
*/
public val virtualGatewayName: kotlin.String = requireNotNull(builder.virtualGatewayName) { "A non-null value must be provided for virtualGatewayName" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.CreateGatewayRouteRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateGatewayRouteRequest(")
append("clientToken=$clientToken,")
append("gatewayRouteName=$gatewayRouteName,")
append("meshName=$meshName,")
append("meshOwner=$meshOwner,")
append("spec=$spec,")
append("tags=$tags,")
append("virtualGatewayName=$virtualGatewayName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (gatewayRouteName.hashCode())
result = 31 * result + (meshName.hashCode())
result = 31 * result + (meshOwner?.hashCode() ?: 0)
result = 31 * result + (spec?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (virtualGatewayName.hashCode())
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 CreateGatewayRouteRequest
if (clientToken != other.clientToken) return false
if (gatewayRouteName != other.gatewayRouteName) return false
if (meshName != other.meshName) return false
if (meshOwner != other.meshOwner) return false
if (spec != other.spec) return false
if (tags != other.tags) return false
if (virtualGatewayName != other.virtualGatewayName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.CreateGatewayRouteRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.
*/
public var clientToken: kotlin.String? = null
/**
* The name to use for the gateway route.
*/
public var gatewayRouteName: kotlin.String? = null
/**
* The name of the service mesh to create the gateway route in.
*/
public var meshName: kotlin.String? = null
/**
* The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see [Working with shared meshes](https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html).
*/
public var meshOwner: kotlin.String? = null
/**
* The gateway route specification to apply.
*/
public var spec: aws.sdk.kotlin.services.appmesh.model.GatewayRouteSpec? = null
/**
* Optional metadata that you can apply to the gateway route to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
*/
public var tags: List? = null
/**
* The name of the virtual gateway to associate the gateway route with. If the virtual gateway is in a shared mesh, then you must be the owner of the virtual gateway resource.
*/
public var virtualGatewayName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.CreateGatewayRouteRequest) : this() {
this.clientToken = x.clientToken
this.gatewayRouteName = x.gatewayRouteName
this.meshName = x.meshName
this.meshOwner = x.meshOwner
this.spec = x.spec
this.tags = x.tags
this.virtualGatewayName = x.virtualGatewayName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.CreateGatewayRouteRequest = CreateGatewayRouteRequest(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.GatewayRouteSpec] inside the given [block]
*/
public fun spec(block: aws.sdk.kotlin.services.appmesh.model.GatewayRouteSpec.Builder.() -> kotlin.Unit) {
this.spec = aws.sdk.kotlin.services.appmesh.model.GatewayRouteSpec.invoke(block)
}
internal fun correctErrors(): Builder {
if (gatewayRouteName == null) gatewayRouteName = ""
if (meshName == null) meshName = ""
if (virtualGatewayName == null) virtualGatewayName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy