All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.translate.model.TerminologyDataLocation.kt Maven / Gradle / Ivy

There is a newer version: 1.3.78
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.translate.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The location of the custom terminology data.
 */
public class TerminologyDataLocation private constructor(builder: Builder) {
    /**
     * 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 location: kotlin.String = requireNotNull(builder.location) { "A non-null value must be provided for location" }
    /**
     * The repository type for the custom terminology data.
     */
    public val repositoryType: kotlin.String = requireNotNull(builder.repositoryType) { "A non-null value must be provided for repositoryType" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.translate.model.TerminologyDataLocation = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("TerminologyDataLocation(")
        append("location=$location,")
        append("repositoryType=$repositoryType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = location.hashCode()
        result = 31 * result + (repositoryType.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 TerminologyDataLocation

        if (location != other.location) return false
        if (repositoryType != other.repositoryType) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.translate.model.TerminologyDataLocation = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * 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 location: kotlin.String? = null
        /**
         * The repository type for the custom terminology data.
         */
        public var repositoryType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.translate.model.TerminologyDataLocation) : this() {
            this.location = x.location
            this.repositoryType = x.repositoryType
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.translate.model.TerminologyDataLocation = TerminologyDataLocation(this)

        internal fun correctErrors(): Builder {
            if (location == null) location = ""
            if (repositoryType == null) repositoryType = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy