
commonMain.aws.sdk.kotlin.services.appmesh.model.CreateMeshRequest.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 CreateMeshRequest 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 service mesh.
*/
public val meshName: kotlin.String = requireNotNull(builder.meshName) { "A non-null value must be provided for meshName" }
/**
* The service mesh specification to apply.
*/
public val spec: aws.sdk.kotlin.services.appmesh.model.MeshSpec? = builder.spec
/**
* Optional metadata that you can apply to the service mesh 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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.CreateMeshRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateMeshRequest(")
append("clientToken=$clientToken,")
append("meshName=$meshName,")
append("spec=$spec,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (meshName.hashCode())
result = 31 * result + (spec?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateMeshRequest
if (clientToken != other.clientToken) return false
if (meshName != other.meshName) return false
if (spec != other.spec) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.CreateMeshRequest = 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 service mesh.
*/
public var meshName: kotlin.String? = null
/**
* The service mesh specification to apply.
*/
public var spec: aws.sdk.kotlin.services.appmesh.model.MeshSpec? = null
/**
* Optional metadata that you can apply to the service mesh 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.CreateMeshRequest) : this() {
this.clientToken = x.clientToken
this.meshName = x.meshName
this.spec = x.spec
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.CreateMeshRequest = CreateMeshRequest(this)
/**
* construct an [aws.sdk.kotlin.services.appmesh.model.MeshSpec] inside the given [block]
*/
public fun spec(block: aws.sdk.kotlin.services.appmesh.model.MeshSpec.Builder.() -> kotlin.Unit) {
this.spec = aws.sdk.kotlin.services.appmesh.model.MeshSpec.invoke(block)
}
internal fun correctErrors(): Builder {
if (meshName == null) meshName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy