
commonMain.aws.sdk.kotlin.services.bedrockdataautomationruntime.model.EncryptionConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockdataautomationruntime.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Encryption configuration.
*/
public class EncryptionConfiguration private constructor(builder: Builder) {
/**
* KMS encryption context.
*/
public val kmsEncryptionContext: Map? = builder.kmsEncryptionContext
/**
* KMS key id.
*/
public val kmsKeyId: kotlin.String = requireNotNull(builder.kmsKeyId) { "A non-null value must be provided for kmsKeyId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockdataautomationruntime.model.EncryptionConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EncryptionConfiguration(")
append("kmsEncryptionContext=$kmsEncryptionContext,")
append("kmsKeyId=$kmsKeyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = kmsEncryptionContext?.hashCode() ?: 0
result = 31 * result + (kmsKeyId.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 EncryptionConfiguration
if (kmsEncryptionContext != other.kmsEncryptionContext) return false
if (kmsKeyId != other.kmsKeyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockdataautomationruntime.model.EncryptionConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* KMS encryption context.
*/
public var kmsEncryptionContext: Map? = null
/**
* KMS key id.
*/
public var kmsKeyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockdataautomationruntime.model.EncryptionConfiguration) : this() {
this.kmsEncryptionContext = x.kmsEncryptionContext
this.kmsKeyId = x.kmsKeyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockdataautomationruntime.model.EncryptionConfiguration = EncryptionConfiguration(this)
internal fun correctErrors(): Builder {
if (kmsKeyId == null) kmsKeyId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy