commonMain.aws.sdk.kotlin.services.kms.model.CreateKeyResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kms-jvm Show documentation
Show all versions of kms-jvm Show documentation
The AWS SDK for Kotlin client for KMS
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kms.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateKeyResponse private constructor(builder: Builder) {
/**
* Metadata associated with the KMS key.
*/
public val keyMetadata: aws.sdk.kotlin.services.kms.model.KeyMetadata? = builder.keyMetadata
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kms.model.CreateKeyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateKeyResponse(")
append("keyMetadata=$keyMetadata")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = keyMetadata?.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 CreateKeyResponse
if (keyMetadata != other.keyMetadata) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kms.model.CreateKeyResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Metadata associated with the KMS key.
*/
public var keyMetadata: aws.sdk.kotlin.services.kms.model.KeyMetadata? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kms.model.CreateKeyResponse) : this() {
this.keyMetadata = x.keyMetadata
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kms.model.CreateKeyResponse = CreateKeyResponse(this)
/**
* construct an [aws.sdk.kotlin.services.kms.model.KeyMetadata] inside the given [block]
*/
public fun keyMetadata(block: aws.sdk.kotlin.services.kms.model.KeyMetadata.Builder.() -> kotlin.Unit) {
this.keyMetadata = aws.sdk.kotlin.services.kms.model.KeyMetadata.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}