commonMain.aws.sdk.kotlin.services.translate.model.GetTerminologyResponse.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 GetTerminologyResponse 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 terminology 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.TerminologyDataLocation? = builder.auxiliaryDataLocation
/**
* The Amazon S3 location of the most recent custom terminology 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 terminologyDataLocation: aws.sdk.kotlin.services.translate.model.TerminologyDataLocation? = builder.terminologyDataLocation
/**
* The properties of the custom terminology being retrieved.
*/
public val terminologyProperties: aws.sdk.kotlin.services.translate.model.TerminologyProperties? = builder.terminologyProperties
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.translate.model.GetTerminologyResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetTerminologyResponse(")
append("auxiliaryDataLocation=$auxiliaryDataLocation,")
append("terminologyDataLocation=$terminologyDataLocation,")
append("terminologyProperties=$terminologyProperties")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = auxiliaryDataLocation?.hashCode() ?: 0
result = 31 * result + (terminologyDataLocation?.hashCode() ?: 0)
result = 31 * result + (terminologyProperties?.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 GetTerminologyResponse
if (auxiliaryDataLocation != other.auxiliaryDataLocation) return false
if (terminologyDataLocation != other.terminologyDataLocation) return false
if (terminologyProperties != other.terminologyProperties) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.translate.model.GetTerminologyResponse = 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 terminology 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.TerminologyDataLocation? = null
/**
* The Amazon S3 location of the most recent custom terminology 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 terminologyDataLocation: aws.sdk.kotlin.services.translate.model.TerminologyDataLocation? = null
/**
* The properties of the custom terminology being retrieved.
*/
public var terminologyProperties: aws.sdk.kotlin.services.translate.model.TerminologyProperties? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.translate.model.GetTerminologyResponse) : this() {
this.auxiliaryDataLocation = x.auxiliaryDataLocation
this.terminologyDataLocation = x.terminologyDataLocation
this.terminologyProperties = x.terminologyProperties
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.translate.model.GetTerminologyResponse = GetTerminologyResponse(this)
/**
* construct an [aws.sdk.kotlin.services.translate.model.TerminologyDataLocation] inside the given [block]
*/
public fun auxiliaryDataLocation(block: aws.sdk.kotlin.services.translate.model.TerminologyDataLocation.Builder.() -> kotlin.Unit) {
this.auxiliaryDataLocation = aws.sdk.kotlin.services.translate.model.TerminologyDataLocation.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.TerminologyDataLocation] inside the given [block]
*/
public fun terminologyDataLocation(block: aws.sdk.kotlin.services.translate.model.TerminologyDataLocation.Builder.() -> kotlin.Unit) {
this.terminologyDataLocation = aws.sdk.kotlin.services.translate.model.TerminologyDataLocation.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.translate.model.TerminologyProperties] inside the given [block]
*/
public fun terminologyProperties(block: aws.sdk.kotlin.services.translate.model.TerminologyProperties.Builder.() -> kotlin.Unit) {
this.terminologyProperties = aws.sdk.kotlin.services.translate.model.TerminologyProperties.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}