commonMain.aws.sdk.kotlin.services.translate.model.OutputDataConfig.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 output configuration properties for a batch translation job.
*/
public class OutputDataConfig private constructor(builder: Builder) {
/**
* The encryption key used to encrypt this object.
*/
public val encryptionKey: aws.sdk.kotlin.services.translate.model.EncryptionKey? = builder.encryptionKey
/**
* The URI of the S3 folder that contains a translation job's output file. The folder must be in the same Region as the API endpoint that you are calling.
*/
public val s3Uri: kotlin.String = requireNotNull(builder.s3Uri) { "A non-null value must be provided for s3Uri" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.translate.model.OutputDataConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OutputDataConfig(")
append("encryptionKey=$encryptionKey,")
append("s3Uri=$s3Uri")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = encryptionKey?.hashCode() ?: 0
result = 31 * result + (s3Uri.hashCode())
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 OutputDataConfig
if (encryptionKey != other.encryptionKey) return false
if (s3Uri != other.s3Uri) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.translate.model.OutputDataConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The encryption key used to encrypt this object.
*/
public var encryptionKey: aws.sdk.kotlin.services.translate.model.EncryptionKey? = null
/**
* The URI of the S3 folder that contains a translation job's output file. The folder must be in the same Region as the API endpoint that you are calling.
*/
public var s3Uri: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.translate.model.OutputDataConfig) : this() {
this.encryptionKey = x.encryptionKey
this.s3Uri = x.s3Uri
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.translate.model.OutputDataConfig = OutputDataConfig(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 {
if (s3Uri == null) s3Uri = ""
return this
}
}
}