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

commonMain.aws.sdk.kotlin.services.eks.model.EncryptionConfig.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.eks.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The encryption configuration for the cluster.
 */
public class EncryptionConfig private constructor(builder: Builder) {
    /**
     * Key Management Service (KMS) key. Either the ARN or the alias can be used.
     */
    public val provider: aws.sdk.kotlin.services.eks.model.Provider? = builder.provider
    /**
     * Specifies the resources to be encrypted. The only supported value is `secrets`.
     */
    public val resources: List? = builder.resources

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

    override fun toString(): kotlin.String = buildString {
        append("EncryptionConfig(")
        append("provider=$provider,")
        append("resources=$resources")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = provider?.hashCode() ?: 0
        result = 31 * result + (resources?.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 EncryptionConfig

        if (provider != other.provider) return false
        if (resources != other.resources) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Key Management Service (KMS) key. Either the ARN or the alias can be used.
         */
        public var provider: aws.sdk.kotlin.services.eks.model.Provider? = null
        /**
         * Specifies the resources to be encrypted. The only supported value is `secrets`.
         */
        public var resources: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eks.model.EncryptionConfig) : this() {
            this.provider = x.provider
            this.resources = x.resources
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.eks.model.Provider] inside the given [block]
         */
        public fun provider(block: aws.sdk.kotlin.services.eks.model.Provider.Builder.() -> kotlin.Unit) {
            this.provider = aws.sdk.kotlin.services.eks.model.Provider.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy