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

commonMain.aws.sdk.kotlin.services.translate.model.TerminologyProperties.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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * The properties of the custom terminology.
 */
public class TerminologyProperties private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the custom terminology.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The time at which the custom terminology was created, based on the timestamp.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The description of the custom terminology properties.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The directionality of your terminology resource indicates whether it has one source language (uni-directional) or multiple (multi-directional).
     *
     * ## UNI
     * The terminology resource has one source language (the first column in a CSV file), and all of its other languages are target languages.
     *
     * ## MULTI
     * Any language in the terminology resource can be the source language.
     */
    public val directionality: aws.sdk.kotlin.services.translate.model.Directionality? = builder.directionality
    /**
     * The encryption key for the custom terminology.
     */
    public val encryptionKey: aws.sdk.kotlin.services.translate.model.EncryptionKey? = builder.encryptionKey
    /**
     * The format of the custom terminology input file.
     */
    public val format: aws.sdk.kotlin.services.translate.model.TerminologyDataFormat? = builder.format
    /**
     * The time at which the custom terminology was last update, based on the timestamp.
     */
    public val lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedAt
    /**
     * Additional information from Amazon Translate about the terminology resource.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The name of the custom terminology.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The size of the file used when importing a custom terminology.
     */
    public val sizeBytes: kotlin.Int? = builder.sizeBytes
    /**
     * The number of terms in the input file that Amazon Translate skipped when you created or updated the terminology resource.
     */
    public val skippedTermCount: kotlin.Int? = builder.skippedTermCount
    /**
     * The language code for the source text of the translation request for which the custom terminology is being used.
     */
    public val sourceLanguageCode: kotlin.String? = builder.sourceLanguageCode
    /**
     * The language codes for the target languages available with the custom terminology resource. All possible target languages are returned in array.
     */
    public val targetLanguageCodes: List? = builder.targetLanguageCodes
    /**
     * The number of terms included in the custom terminology.
     */
    public val termCount: kotlin.Int? = builder.termCount

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

    override fun toString(): kotlin.String = buildString {
        append("TerminologyProperties(")
        append("arn=$arn,")
        append("createdAt=$createdAt,")
        append("description=$description,")
        append("directionality=$directionality,")
        append("encryptionKey=$encryptionKey,")
        append("format=$format,")
        append("lastUpdatedAt=$lastUpdatedAt,")
        append("message=$message,")
        append("name=$name,")
        append("sizeBytes=$sizeBytes,")
        append("skippedTermCount=$skippedTermCount,")
        append("sourceLanguageCode=$sourceLanguageCode,")
        append("targetLanguageCodes=$targetLanguageCodes,")
        append("termCount=$termCount")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (createdAt?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (directionality?.hashCode() ?: 0)
        result = 31 * result + (encryptionKey?.hashCode() ?: 0)
        result = 31 * result + (format?.hashCode() ?: 0)
        result = 31 * result + (lastUpdatedAt?.hashCode() ?: 0)
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (sizeBytes ?: 0)
        result = 31 * result + (skippedTermCount ?: 0)
        result = 31 * result + (sourceLanguageCode?.hashCode() ?: 0)
        result = 31 * result + (targetLanguageCodes?.hashCode() ?: 0)
        result = 31 * result + (termCount ?: 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 TerminologyProperties

        if (arn != other.arn) return false
        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (directionality != other.directionality) return false
        if (encryptionKey != other.encryptionKey) return false
        if (format != other.format) return false
        if (lastUpdatedAt != other.lastUpdatedAt) return false
        if (message != other.message) return false
        if (name != other.name) return false
        if (sizeBytes != other.sizeBytes) return false
        if (skippedTermCount != other.skippedTermCount) return false
        if (sourceLanguageCode != other.sourceLanguageCode) return false
        if (targetLanguageCodes != other.targetLanguageCodes) return false
        if (termCount != other.termCount) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the custom terminology.
         */
        public var arn: kotlin.String? = null
        /**
         * The time at which the custom terminology was created, based on the timestamp.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The description of the custom terminology properties.
         */
        public var description: kotlin.String? = null
        /**
         * The directionality of your terminology resource indicates whether it has one source language (uni-directional) or multiple (multi-directional).
         *
         * ## UNI
         * The terminology resource has one source language (the first column in a CSV file), and all of its other languages are target languages.
         *
         * ## MULTI
         * Any language in the terminology resource can be the source language.
         */
        public var directionality: aws.sdk.kotlin.services.translate.model.Directionality? = null
        /**
         * The encryption key for the custom terminology.
         */
        public var encryptionKey: aws.sdk.kotlin.services.translate.model.EncryptionKey? = null
        /**
         * The format of the custom terminology input file.
         */
        public var format: aws.sdk.kotlin.services.translate.model.TerminologyDataFormat? = null
        /**
         * The time at which the custom terminology was last update, based on the timestamp.
         */
        public var lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Additional information from Amazon Translate about the terminology resource.
         */
        public var message: kotlin.String? = null
        /**
         * The name of the custom terminology.
         */
        public var name: kotlin.String? = null
        /**
         * The size of the file used when importing a custom terminology.
         */
        public var sizeBytes: kotlin.Int? = null
        /**
         * The number of terms in the input file that Amazon Translate skipped when you created or updated the terminology resource.
         */
        public var skippedTermCount: kotlin.Int? = null
        /**
         * The language code for the source text of the translation request for which the custom terminology is being used.
         */
        public var sourceLanguageCode: kotlin.String? = null
        /**
         * The language codes for the target languages available with the custom terminology resource. All possible target languages are returned in array.
         */
        public var targetLanguageCodes: List? = null
        /**
         * The number of terms included in the custom terminology.
         */
        public var termCount: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.translate.model.TerminologyProperties) : this() {
            this.arn = x.arn
            this.createdAt = x.createdAt
            this.description = x.description
            this.directionality = x.directionality
            this.encryptionKey = x.encryptionKey
            this.format = x.format
            this.lastUpdatedAt = x.lastUpdatedAt
            this.message = x.message
            this.name = x.name
            this.sizeBytes = x.sizeBytes
            this.skippedTermCount = x.skippedTermCount
            this.sourceLanguageCode = x.sourceLanguageCode
            this.targetLanguageCodes = x.targetLanguageCodes
            this.termCount = x.termCount
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.translate.model.TerminologyProperties = TerminologyProperties(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)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy