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

commonMain.aws.sdk.kotlin.services.kms.model.ReplicateKeyResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kms.model

import aws.smithy.kotlin.runtime.SdkDsl

public class ReplicateKeyResponse private constructor(builder: Builder) {
    /**
     * Displays details about the new replica key, including its Amazon Resource Name ([key ARN](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN)) and [Key states of KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). It also includes the ARN and Amazon Web Services Region of its primary key and other replica keys.
     */
    public val replicaKeyMetadata: aws.sdk.kotlin.services.kms.model.KeyMetadata? = builder.replicaKeyMetadata
    /**
     * The key policy of the new replica key. The value is a key policy document in JSON format.
     */
    public val replicaPolicy: kotlin.String? = builder.replicaPolicy
    /**
     * The tags on the new replica key. The value is a list of tag key and tag value pairs.
     */
    public val replicaTags: List? = builder.replicaTags

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

    override fun toString(): kotlin.String = buildString {
        append("ReplicateKeyResponse(")
        append("replicaKeyMetadata=$replicaKeyMetadata,")
        append("replicaPolicy=$replicaPolicy,")
        append("replicaTags=$replicaTags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = replicaKeyMetadata?.hashCode() ?: 0
        result = 31 * result + (replicaPolicy?.hashCode() ?: 0)
        result = 31 * result + (replicaTags?.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 ReplicateKeyResponse

        if (replicaKeyMetadata != other.replicaKeyMetadata) return false
        if (replicaPolicy != other.replicaPolicy) return false
        if (replicaTags != other.replicaTags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Displays details about the new replica key, including its Amazon Resource Name ([key ARN](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN)) and [Key states of KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). It also includes the ARN and Amazon Web Services Region of its primary key and other replica keys.
         */
        public var replicaKeyMetadata: aws.sdk.kotlin.services.kms.model.KeyMetadata? = null
        /**
         * The key policy of the new replica key. The value is a key policy document in JSON format.
         */
        public var replicaPolicy: kotlin.String? = null
        /**
         * The tags on the new replica key. The value is a list of tag key and tag value pairs.
         */
        public var replicaTags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kms.model.ReplicateKeyResponse) : this() {
            this.replicaKeyMetadata = x.replicaKeyMetadata
            this.replicaPolicy = x.replicaPolicy
            this.replicaTags = x.replicaTags
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy