commonMain.aws.sdk.kotlin.services.translate.model.GetParallelDataResponse.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 GetParallelDataResponse private constructor(builder: Builder) {
/**
* The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration.
*/
public val auxiliaryDataLocation: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation? = builder.auxiliaryDataLocation
/**
* The Amazon S3 location of the most recent parallel data input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.
*
* Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.
*
* CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it.
*
* Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
*/
public val dataLocation: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation? = builder.dataLocation
/**
* The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to update a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration.
*/
public val latestUpdateAttemptAuxiliaryDataLocation: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation? = builder.latestUpdateAttemptAuxiliaryDataLocation
/**
* The properties of the parallel data resource that is being retrieved.
*/
public val parallelDataProperties: aws.sdk.kotlin.services.translate.model.ParallelDataProperties? = builder.parallelDataProperties
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.translate.model.GetParallelDataResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetParallelDataResponse(")
append("auxiliaryDataLocation=$auxiliaryDataLocation,")
append("dataLocation=$dataLocation,")
append("latestUpdateAttemptAuxiliaryDataLocation=$latestUpdateAttemptAuxiliaryDataLocation,")
append("parallelDataProperties=$parallelDataProperties")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = auxiliaryDataLocation?.hashCode() ?: 0
result = 31 * result + (dataLocation?.hashCode() ?: 0)
result = 31 * result + (latestUpdateAttemptAuxiliaryDataLocation?.hashCode() ?: 0)
result = 31 * result + (parallelDataProperties?.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 GetParallelDataResponse
if (auxiliaryDataLocation != other.auxiliaryDataLocation) return false
if (dataLocation != other.dataLocation) return false
if (latestUpdateAttemptAuxiliaryDataLocation != other.latestUpdateAttemptAuxiliaryDataLocation) return false
if (parallelDataProperties != other.parallelDataProperties) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.translate.model.GetParallelDataResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration.
*/
public var auxiliaryDataLocation: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation? = null
/**
* The Amazon S3 location of the most recent parallel data input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.
*
* Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.
*
* CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it.
*
* Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
*/
public var dataLocation: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation? = null
/**
* The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to update a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration.
*/
public var latestUpdateAttemptAuxiliaryDataLocation: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation? = null
/**
* The properties of the parallel data resource that is being retrieved.
*/
public var parallelDataProperties: aws.sdk.kotlin.services.translate.model.ParallelDataProperties? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.translate.model.GetParallelDataResponse) : this() {
this.auxiliaryDataLocation = x.auxiliaryDataLocation
this.dataLocation = x.dataLocation
this.latestUpdateAttemptAuxiliaryDataLocation = x.latestUpdateAttemptAuxiliaryDataLocation
this.parallelDataProperties = x.parallelDataProperties
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.translate.model.GetParallelDataResponse = GetParallelDataResponse(this)
/**
* construct an [aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation] inside the given [block]
*/
public fun auxiliaryDataLocation(block: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation.Builder.() -> kotlin.Unit) {
this.auxiliaryDataLocation = aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation] inside the given [block]
*/
public fun dataLocation(block: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation.Builder.() -> kotlin.Unit) {
this.dataLocation = aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation] inside the given [block]
*/
public fun latestUpdateAttemptAuxiliaryDataLocation(block: aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation.Builder.() -> kotlin.Unit) {
this.latestUpdateAttemptAuxiliaryDataLocation = aws.sdk.kotlin.services.translate.model.ParallelDataDataLocation.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.ParallelDataProperties] inside the given [block]
*/
public fun parallelDataProperties(block: aws.sdk.kotlin.services.translate.model.ParallelDataProperties.Builder.() -> kotlin.Unit) {
this.parallelDataProperties = aws.sdk.kotlin.services.translate.model.ParallelDataProperties.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}