commonMain.aws.sdk.kotlin.services.translate.model.TextTranslationJobProperties.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Provides information about a translation job.
*/
public class TextTranslationJobProperties private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that granted Amazon Translate read access to the job's input data.
*/
public val dataAccessRoleArn: kotlin.String? = builder.dataAccessRoleArn
/**
* The time at which the translation job ended.
*/
public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
/**
* The input configuration properties that were specified when the job was requested.
*/
public val inputDataConfig: aws.sdk.kotlin.services.translate.model.InputDataConfig? = builder.inputDataConfig
/**
* The number of documents successfully and unsuccessfully processed during the translation job.
*/
public val jobDetails: aws.sdk.kotlin.services.translate.model.JobDetails? = builder.jobDetails
/**
* The ID of the translation job.
*/
public val jobId: kotlin.String? = builder.jobId
/**
* The user-defined name of the translation job.
*/
public val jobName: kotlin.String? = builder.jobName
/**
* The status of the translation job.
*/
public val jobStatus: aws.sdk.kotlin.services.translate.model.JobStatus? = builder.jobStatus
/**
* An explanation of any errors that may have occurred during the translation job.
*/
public val message: kotlin.String? = builder.message
/**
* The output configuration properties that were specified when the job was requested.
*/
public val outputDataConfig: aws.sdk.kotlin.services.translate.model.OutputDataConfig? = builder.outputDataConfig
/**
* A list containing the names of the parallel data resources applied to the translation job.
*/
public val parallelDataNames: List? = builder.parallelDataNames
/**
* Settings that modify the translation output.
*/
public val settings: aws.sdk.kotlin.services.translate.model.TranslationSettings? = builder.settings
/**
* The language code of the language of the source text. The language must be a language supported by Amazon Translate.
*/
public val sourceLanguageCode: kotlin.String? = builder.sourceLanguageCode
/**
* The time at which the translation job was submitted.
*/
public val submittedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.submittedTime
/**
* The language code of the language of the target text. The language must be a language supported by Amazon Translate.
*/
public val targetLanguageCodes: List? = builder.targetLanguageCodes
/**
* A list containing the names of the terminologies applied to a translation job. Only one terminology can be applied per StartTextTranslationJob request at this time.
*/
public val terminologyNames: List? = builder.terminologyNames
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.translate.model.TextTranslationJobProperties = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TextTranslationJobProperties(")
append("dataAccessRoleArn=$dataAccessRoleArn,")
append("endTime=$endTime,")
append("inputDataConfig=$inputDataConfig,")
append("jobDetails=$jobDetails,")
append("jobId=$jobId,")
append("jobName=$jobName,")
append("jobStatus=$jobStatus,")
append("message=$message,")
append("outputDataConfig=$outputDataConfig,")
append("parallelDataNames=$parallelDataNames,")
append("settings=$settings,")
append("sourceLanguageCode=$sourceLanguageCode,")
append("submittedTime=$submittedTime,")
append("targetLanguageCodes=$targetLanguageCodes,")
append("terminologyNames=$terminologyNames")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dataAccessRoleArn?.hashCode() ?: 0
result = 31 * result + (endTime?.hashCode() ?: 0)
result = 31 * result + (inputDataConfig?.hashCode() ?: 0)
result = 31 * result + (jobDetails?.hashCode() ?: 0)
result = 31 * result + (jobId?.hashCode() ?: 0)
result = 31 * result + (jobName?.hashCode() ?: 0)
result = 31 * result + (jobStatus?.hashCode() ?: 0)
result = 31 * result + (message?.hashCode() ?: 0)
result = 31 * result + (outputDataConfig?.hashCode() ?: 0)
result = 31 * result + (parallelDataNames?.hashCode() ?: 0)
result = 31 * result + (settings?.hashCode() ?: 0)
result = 31 * result + (sourceLanguageCode?.hashCode() ?: 0)
result = 31 * result + (submittedTime?.hashCode() ?: 0)
result = 31 * result + (targetLanguageCodes?.hashCode() ?: 0)
result = 31 * result + (terminologyNames?.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 TextTranslationJobProperties
if (dataAccessRoleArn != other.dataAccessRoleArn) return false
if (endTime != other.endTime) return false
if (inputDataConfig != other.inputDataConfig) return false
if (jobDetails != other.jobDetails) return false
if (jobId != other.jobId) return false
if (jobName != other.jobName) return false
if (jobStatus != other.jobStatus) return false
if (message != other.message) return false
if (outputDataConfig != other.outputDataConfig) return false
if (parallelDataNames != other.parallelDataNames) return false
if (settings != other.settings) return false
if (sourceLanguageCode != other.sourceLanguageCode) return false
if (submittedTime != other.submittedTime) return false
if (targetLanguageCodes != other.targetLanguageCodes) return false
if (terminologyNames != other.terminologyNames) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.translate.model.TextTranslationJobProperties = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that granted Amazon Translate read access to the job's input data.
*/
public var dataAccessRoleArn: kotlin.String? = null
/**
* The time at which the translation job ended.
*/
public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The input configuration properties that were specified when the job was requested.
*/
public var inputDataConfig: aws.sdk.kotlin.services.translate.model.InputDataConfig? = null
/**
* The number of documents successfully and unsuccessfully processed during the translation job.
*/
public var jobDetails: aws.sdk.kotlin.services.translate.model.JobDetails? = null
/**
* The ID of the translation job.
*/
public var jobId: kotlin.String? = null
/**
* The user-defined name of the translation job.
*/
public var jobName: kotlin.String? = null
/**
* The status of the translation job.
*/
public var jobStatus: aws.sdk.kotlin.services.translate.model.JobStatus? = null
/**
* An explanation of any errors that may have occurred during the translation job.
*/
public var message: kotlin.String? = null
/**
* The output configuration properties that were specified when the job was requested.
*/
public var outputDataConfig: aws.sdk.kotlin.services.translate.model.OutputDataConfig? = null
/**
* A list containing the names of the parallel data resources applied to the translation job.
*/
public var parallelDataNames: List? = null
/**
* Settings that modify the translation output.
*/
public var settings: aws.sdk.kotlin.services.translate.model.TranslationSettings? = null
/**
* The language code of the language of the source text. The language must be a language supported by Amazon Translate.
*/
public var sourceLanguageCode: kotlin.String? = null
/**
* The time at which the translation job was submitted.
*/
public var submittedTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The language code of the language of the target text. The language must be a language supported by Amazon Translate.
*/
public var targetLanguageCodes: List? = null
/**
* A list containing the names of the terminologies applied to a translation job. Only one terminology can be applied per StartTextTranslationJob request at this time.
*/
public var terminologyNames: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.translate.model.TextTranslationJobProperties) : this() {
this.dataAccessRoleArn = x.dataAccessRoleArn
this.endTime = x.endTime
this.inputDataConfig = x.inputDataConfig
this.jobDetails = x.jobDetails
this.jobId = x.jobId
this.jobName = x.jobName
this.jobStatus = x.jobStatus
this.message = x.message
this.outputDataConfig = x.outputDataConfig
this.parallelDataNames = x.parallelDataNames
this.settings = x.settings
this.sourceLanguageCode = x.sourceLanguageCode
this.submittedTime = x.submittedTime
this.targetLanguageCodes = x.targetLanguageCodes
this.terminologyNames = x.terminologyNames
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.translate.model.TextTranslationJobProperties = TextTranslationJobProperties(this)
/**
* construct an [aws.sdk.kotlin.services.translate.model.InputDataConfig] inside the given [block]
*/
public fun inputDataConfig(block: aws.sdk.kotlin.services.translate.model.InputDataConfig.Builder.() -> kotlin.Unit) {
this.inputDataConfig = aws.sdk.kotlin.services.translate.model.InputDataConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.JobDetails] inside the given [block]
*/
public fun jobDetails(block: aws.sdk.kotlin.services.translate.model.JobDetails.Builder.() -> kotlin.Unit) {
this.jobDetails = aws.sdk.kotlin.services.translate.model.JobDetails.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.OutputDataConfig] inside the given [block]
*/
public fun outputDataConfig(block: aws.sdk.kotlin.services.translate.model.OutputDataConfig.Builder.() -> kotlin.Unit) {
this.outputDataConfig = aws.sdk.kotlin.services.translate.model.OutputDataConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.TranslationSettings] inside the given [block]
*/
public fun settings(block: aws.sdk.kotlin.services.translate.model.TranslationSettings.Builder.() -> kotlin.Unit) {
this.settings = aws.sdk.kotlin.services.translate.model.TranslationSettings.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}