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

commonMain.aws.sdk.kotlin.services.firehose.model.KmsEncryptionConfig.kt Maven / Gradle / Ivy

There is a newer version: 1.3.78
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.firehose.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes an encryption key for a destination in Amazon S3.
 */
public class KmsEncryptionConfig private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the encryption key. Must belong to the same Amazon Web Services Region as the destination Amazon S3 bucket. For more information, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
     */
    public val awskmsKeyArn: kotlin.String = requireNotNull(builder.awskmsKeyArn) { "A non-null value must be provided for awskmsKeyArn" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.firehose.model.KmsEncryptionConfig = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("KmsEncryptionConfig(")
        append("awskmsKeyArn=$awskmsKeyArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = awskmsKeyArn.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 KmsEncryptionConfig

        if (awskmsKeyArn != other.awskmsKeyArn) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.firehose.model.KmsEncryptionConfig = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the encryption key. Must belong to the same Amazon Web Services Region as the destination Amazon S3 bucket. For more information, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
         */
        public var awskmsKeyArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.firehose.model.KmsEncryptionConfig) : this() {
            this.awskmsKeyArn = x.awskmsKeyArn
        }

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

        internal fun correctErrors(): Builder {
            if (awskmsKeyArn == null) awskmsKeyArn = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy