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

commonMain.aws.sdk.kotlin.services.translate.model.ImportTerminologyRequest.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.translate.model

import aws.smithy.kotlin.runtime.SdkDsl

public class ImportTerminologyRequest private constructor(builder: Builder) {
    /**
     * The description of the custom terminology being imported.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The encryption key for the custom terminology being imported.
     */
    public val encryptionKey: aws.sdk.kotlin.services.translate.model.EncryptionKey? = builder.encryptionKey
    /**
     * The merge strategy of the custom terminology being imported. Currently, only the OVERWRITE merge strategy is supported. In this case, the imported terminology will overwrite an existing terminology of the same name.
     */
    public val mergeStrategy: aws.sdk.kotlin.services.translate.model.MergeStrategy? = builder.mergeStrategy
    /**
     * The name of the custom terminology being imported.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
     */
    public val tags: List? = builder.tags
    /**
     * The terminology data for the custom terminology being imported.
     */
    public val terminologyData: aws.sdk.kotlin.services.translate.model.TerminologyData? = builder.terminologyData

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

    override fun toString(): kotlin.String = buildString {
        append("ImportTerminologyRequest(")
        append("description=$description,")
        append("encryptionKey=$encryptionKey,")
        append("mergeStrategy=$mergeStrategy,")
        append("name=$name,")
        append("tags=$tags,")
        append("terminologyData=$terminologyData")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (encryptionKey?.hashCode() ?: 0)
        result = 31 * result + (mergeStrategy?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (terminologyData?.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 ImportTerminologyRequest

        if (description != other.description) return false
        if (encryptionKey != other.encryptionKey) return false
        if (mergeStrategy != other.mergeStrategy) return false
        if (name != other.name) return false
        if (tags != other.tags) return false
        if (terminologyData != other.terminologyData) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The description of the custom terminology being imported.
         */
        public var description: kotlin.String? = null
        /**
         * The encryption key for the custom terminology being imported.
         */
        public var encryptionKey: aws.sdk.kotlin.services.translate.model.EncryptionKey? = null
        /**
         * The merge strategy of the custom terminology being imported. Currently, only the OVERWRITE merge strategy is supported. In this case, the imported terminology will overwrite an existing terminology of the same name.
         */
        public var mergeStrategy: aws.sdk.kotlin.services.translate.model.MergeStrategy? = null
        /**
         * The name of the custom terminology being imported.
         */
        public var name: kotlin.String? = null
        /**
         * Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
         */
        public var tags: List? = null
        /**
         * The terminology data for the custom terminology being imported.
         */
        public var terminologyData: aws.sdk.kotlin.services.translate.model.TerminologyData? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.translate.model.ImportTerminologyRequest) : this() {
            this.description = x.description
            this.encryptionKey = x.encryptionKey
            this.mergeStrategy = x.mergeStrategy
            this.name = x.name
            this.tags = x.tags
            this.terminologyData = x.terminologyData
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy