commonMain.aws.sdk.kotlin.services.translate.model.CreateParallelDataRequest.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
public class CreateParallelDataRequest private constructor(builder: Builder) {
/**
* A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* A custom description for the parallel data resource in Amazon Translate.
*/
public val description: kotlin.String? = builder.description
/**
* The encryption key used to encrypt this object.
*/
public val encryptionKey: aws.sdk.kotlin.services.translate.model.EncryptionKey? = builder.encryptionKey
/**
* A custom name for the parallel data resource in Amazon Translate. You must assign a name that is unique in the account and region.
*/
public val name: kotlin.String? = builder.name
/**
* Specifies the format and S3 location of the parallel data input file.
*/
public val parallelDataConfig: aws.sdk.kotlin.services.translate.model.ParallelDataConfig? = builder.parallelDataConfig
/**
* Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.translate.model.CreateParallelDataRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateParallelDataRequest(")
append("clientToken=$clientToken,")
append("description=$description,")
append("encryptionKey=$encryptionKey,")
append("name=$name,")
append("parallelDataConfig=$parallelDataConfig,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (encryptionKey?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (parallelDataConfig?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateParallelDataRequest
if (clientToken != other.clientToken) return false
if (description != other.description) return false
if (encryptionKey != other.encryptionKey) return false
if (name != other.name) return false
if (parallelDataConfig != other.parallelDataConfig) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.translate.model.CreateParallelDataRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique identifier for the request. This token is automatically generated when you use Amazon Translate through an AWS SDK.
*/
public var clientToken: kotlin.String? = null
/**
* A custom description for the parallel data resource in Amazon Translate.
*/
public var description: kotlin.String? = null
/**
* The encryption key used to encrypt this object.
*/
public var encryptionKey: aws.sdk.kotlin.services.translate.model.EncryptionKey? = null
/**
* A custom name for the parallel data resource in Amazon Translate. You must assign a name that is unique in the account and region.
*/
public var name: kotlin.String? = null
/**
* Specifies the format and S3 location of the parallel data input file.
*/
public var parallelDataConfig: aws.sdk.kotlin.services.translate.model.ParallelDataConfig? = null
/**
* Tags to be associated with this resource. A tag is a key-value pair that adds metadata to a resource. Each tag key for the resource must be unique. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.translate.model.CreateParallelDataRequest) : this() {
this.clientToken = x.clientToken
this.description = x.description
this.encryptionKey = x.encryptionKey
this.name = x.name
this.parallelDataConfig = x.parallelDataConfig
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.translate.model.CreateParallelDataRequest = CreateParallelDataRequest(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)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.ParallelDataConfig] inside the given [block]
*/
public fun parallelDataConfig(block: aws.sdk.kotlin.services.translate.model.ParallelDataConfig.Builder.() -> kotlin.Unit) {
this.parallelDataConfig = aws.sdk.kotlin.services.translate.model.ParallelDataConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}