commonMain.aws.sdk.kotlin.services.nimble.model.StudioEncryptionConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nimble-jvm Show documentation
Show all versions of nimble-jvm Show documentation
The AWS SDK for Kotlin client for nimble
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.nimble.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Configuration of the encryption method that is used for the studio.
*/
public class StudioEncryptionConfiguration private constructor(builder: Builder) {
/**
* The ARN for a KMS key that is used to encrypt studio data.
*/
public val keyArn: kotlin.String? = builder.keyArn
/**
* The type of KMS key that is used to encrypt studio data.
*/
public val keyType: aws.sdk.kotlin.services.nimble.model.StudioEncryptionConfigurationKeyType = requireNotNull(builder.keyType) { "A non-null value must be provided for keyType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.nimble.model.StudioEncryptionConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StudioEncryptionConfiguration(")
append("keyArn=$keyArn,")
append("keyType=$keyType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = keyArn?.hashCode() ?: 0
result = 31 * result + (keyType.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 StudioEncryptionConfiguration
if (keyArn != other.keyArn) return false
if (keyType != other.keyType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.nimble.model.StudioEncryptionConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN for a KMS key that is used to encrypt studio data.
*/
public var keyArn: kotlin.String? = null
/**
* The type of KMS key that is used to encrypt studio data.
*/
public var keyType: aws.sdk.kotlin.services.nimble.model.StudioEncryptionConfigurationKeyType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.nimble.model.StudioEncryptionConfiguration) : this() {
this.keyArn = x.keyArn
this.keyType = x.keyType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.nimble.model.StudioEncryptionConfiguration = StudioEncryptionConfiguration(this)
internal fun correctErrors(): Builder {
if (keyType == null) keyType = StudioEncryptionConfigurationKeyType.SdkUnknown("no value provided")
return this
}
}
}