All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.nimble.model.StreamingImageEncryptionConfiguration.kt Maven / Gradle / Ivy

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

/**
 * Specifies how a streaming image is encrypted.
 */
public class StreamingImageEncryptionConfiguration 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.StreamingImageEncryptionConfigurationKeyType = 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.StreamingImageEncryptionConfiguration = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("StreamingImageEncryptionConfiguration(")
        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 StreamingImageEncryptionConfiguration

        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.StreamingImageEncryptionConfiguration = 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.StreamingImageEncryptionConfigurationKeyType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.nimble.model.StreamingImageEncryptionConfiguration) : this() {
            this.keyArn = x.keyArn
            this.keyType = x.keyType
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.nimble.model.StreamingImageEncryptionConfiguration = StreamingImageEncryptionConfiguration(this)

        internal fun correctErrors(): Builder {
            if (keyType == null) keyType = StreamingImageEncryptionConfigurationKeyType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy