
commonMain.aws.sdk.kotlin.services.translate.model.TranslateTextResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.translate.model
public class TranslateTextResponse private constructor(builder: Builder) {
/**
* Optional settings that modify the translation output.
*/
public val appliedSettings: aws.sdk.kotlin.services.translate.model.TranslationSettings? = builder.appliedSettings
/**
* The names of the custom terminologies applied to the input text by Amazon Translate for the translated text response.
*/
public val appliedTerminologies: List? = builder.appliedTerminologies
/**
* The language code for the language of the source text.
*/
public val sourceLanguageCode: kotlin.String? = builder.sourceLanguageCode
/**
* The language code for the language of the target text.
*/
public val targetLanguageCode: kotlin.String? = builder.targetLanguageCode
/**
* The translated text.
*/
public val translatedText: kotlin.String? = builder.translatedText
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.translate.model.TranslateTextResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TranslateTextResponse(")
append("appliedSettings=$appliedSettings,")
append("appliedTerminologies=$appliedTerminologies,")
append("sourceLanguageCode=$sourceLanguageCode,")
append("targetLanguageCode=$targetLanguageCode,")
append("translatedText=$translatedText")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = appliedSettings?.hashCode() ?: 0
result = 31 * result + (appliedTerminologies?.hashCode() ?: 0)
result = 31 * result + (sourceLanguageCode?.hashCode() ?: 0)
result = 31 * result + (targetLanguageCode?.hashCode() ?: 0)
result = 31 * result + (translatedText?.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 TranslateTextResponse
if (appliedSettings != other.appliedSettings) return false
if (appliedTerminologies != other.appliedTerminologies) return false
if (sourceLanguageCode != other.sourceLanguageCode) return false
if (targetLanguageCode != other.targetLanguageCode) return false
if (translatedText != other.translatedText) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.translate.model.TranslateTextResponse = Builder(this).apply(block).build()
public class Builder {
/**
* Optional settings that modify the translation output.
*/
public var appliedSettings: aws.sdk.kotlin.services.translate.model.TranslationSettings? = null
/**
* The names of the custom terminologies applied to the input text by Amazon Translate for the translated text response.
*/
public var appliedTerminologies: List? = null
/**
* The language code for the language of the source text.
*/
public var sourceLanguageCode: kotlin.String? = null
/**
* The language code for the language of the target text.
*/
public var targetLanguageCode: kotlin.String? = null
/**
* The translated text.
*/
public var translatedText: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.translate.model.TranslateTextResponse) : this() {
this.appliedSettings = x.appliedSettings
this.appliedTerminologies = x.appliedTerminologies
this.sourceLanguageCode = x.sourceLanguageCode
this.targetLanguageCode = x.targetLanguageCode
this.translatedText = x.translatedText
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.translate.model.TranslateTextResponse = TranslateTextResponse(this)
/**
* construct an [aws.sdk.kotlin.services.translate.model.TranslationSettings] inside the given [block]
*/
public fun appliedSettings(block: aws.sdk.kotlin.services.translate.model.TranslationSettings.Builder.() -> kotlin.Unit) {
this.appliedSettings = aws.sdk.kotlin.services.translate.model.TranslationSettings.invoke(block)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy