commonMain.aws.sdk.kotlin.services.translate.model.TranslatedDocument.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of translate-jvm Show documentation
Show all versions of translate-jvm Show documentation
The AWS SDK for Kotlin client for Translate
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.translate.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The translated content.
*/
public class TranslatedDocument private constructor(builder: Builder) {
/**
* The document containing the translated content.
*/
public val content: kotlin.ByteArray = requireNotNull(builder.content) { "A non-null value must be provided for content" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.translate.model.TranslatedDocument = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TranslatedDocument(")
append("content=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = content.contentHashCode()
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 TranslatedDocument
if (content != null) {
if (other.content == null) return false
if (!content.contentEquals(other.content)) return false
} else if (other.content != null) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.translate.model.TranslatedDocument = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The document containing the translated content.
*/
public var content: kotlin.ByteArray? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.translate.model.TranslatedDocument) : this() {
this.content = x.content
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.translate.model.TranslatedDocument = TranslatedDocument(this)
internal fun correctErrors(): Builder {
if (content == null) content = ByteArray(0)
return this
}
}
}