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

commonMain.aws.sdk.kotlin.services.voiceid.model.UpdateDomainRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.voiceid.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateDomainRequest private constructor(builder: Builder) {
    /**
     * A brief description about this domain.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The identifier of the domain to be updated.
     */
    public val domainId: kotlin.String = requireNotNull(builder.domainId) { "A non-null value must be provided for domainId" }
    /**
     * The name of the domain.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Changing the domain's associated KMS key immediately triggers an asynchronous process to remove dependency on the old KMS key, such that the domain's data can only be accessed using the new KMS key. The domain's `ServerSideEncryptionUpdateDetails` contains the details for this process.
     */
    public val serverSideEncryptionConfiguration: aws.sdk.kotlin.services.voiceid.model.ServerSideEncryptionConfiguration? = builder.serverSideEncryptionConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateDomainRequest(")
        append("description=*** Sensitive Data Redacted ***,")
        append("domainId=$domainId,")
        append("name=*** Sensitive Data Redacted ***,")
        append("serverSideEncryptionConfiguration=$serverSideEncryptionConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (domainId.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (serverSideEncryptionConfiguration?.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 UpdateDomainRequest

        if (description != other.description) return false
        if (domainId != other.domainId) return false
        if (name != other.name) return false
        if (serverSideEncryptionConfiguration != other.serverSideEncryptionConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A brief description about this domain.
         */
        public var description: kotlin.String? = null
        /**
         * The identifier of the domain to be updated.
         */
        public var domainId: kotlin.String? = null
        /**
         * The name of the domain.
         */
        public var name: kotlin.String? = null
        /**
         * The configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Changing the domain's associated KMS key immediately triggers an asynchronous process to remove dependency on the old KMS key, such that the domain's data can only be accessed using the new KMS key. The domain's `ServerSideEncryptionUpdateDetails` contains the details for this process.
         */
        public var serverSideEncryptionConfiguration: aws.sdk.kotlin.services.voiceid.model.ServerSideEncryptionConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.voiceid.model.UpdateDomainRequest) : this() {
            this.description = x.description
            this.domainId = x.domainId
            this.name = x.name
            this.serverSideEncryptionConfiguration = x.serverSideEncryptionConfiguration
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy