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

commonMain.aws.sdk.kotlin.services.comprehend.model.DetectDominantLanguageResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.comprehend.model



public class DetectDominantLanguageResponse private constructor(builder: Builder) {
    /**
     * Array of languages that Amazon Comprehend detected in the input text. The array is sorted in descending order of the score (the dominant language is always the first element in the array).
     *
     * For each language, the response returns the RFC 5646 language code and the level of confidence that Amazon Comprehend has in the accuracy of its inference. For more information about RFC 5646, see [Tags for Identifying Languages](https://tools.ietf.org/html/rfc5646) on the *IETF Tools* web site.
     */
    public val languages: List? = builder.languages

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

    override fun toString(): kotlin.String = buildString {
        append("DetectDominantLanguageResponse(")
        append("*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = languages?.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 DetectDominantLanguageResponse

        if (languages != other.languages) return false

        return true
    }

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

    public class Builder {
        /**
         * Array of languages that Amazon Comprehend detected in the input text. The array is sorted in descending order of the score (the dominant language is always the first element in the array).
         *
         * For each language, the response returns the RFC 5646 language code and the level of confidence that Amazon Comprehend has in the accuracy of its inference. For more information about RFC 5646, see [Tags for Identifying Languages](https://tools.ietf.org/html/rfc5646) on the *IETF Tools* web site.
         */
        public var languages: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehend.model.DetectDominantLanguageResponse) : this() {
            this.languages = x.languages
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.comprehend.model.DetectDominantLanguageResponse = DetectDominantLanguageResponse(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy