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

commonMain.aws.sdk.kotlin.services.transfer.model.DecryptStepDetails.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.transfer.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Each step type has its own `StepDetails` structure.
 */
public class DecryptStepDetails private constructor(builder: Builder) {
    /**
     * Specifies the location for the file being decrypted. Use `${Transfer:UserName}` or `${Transfer:UploadDate}` in this field to parametrize the destination prefix by username or uploaded date.
     * + Set the value of `DestinationFileLocation` to `${Transfer:UserName}` to decrypt uploaded files to an Amazon S3 bucket that is prefixed with the name of the Transfer Family user that uploaded the file.
     * + Set the value of `DestinationFileLocation` to `${Transfer:UploadDate}` to decrypt uploaded files to an Amazon S3 bucket that is prefixed with the date of the upload.The system resolves `UploadDate` to a date format of *YYYY-MM-DD*, based on the date the file is uploaded in UTC.
     */
    public val destinationFileLocation: aws.sdk.kotlin.services.transfer.model.InputFileLocation? = builder.destinationFileLocation
    /**
     * The name of the step, used as an identifier.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A flag that indicates whether to overwrite an existing file of the same name. The default is `FALSE`.
     *
     * If the workflow is processing a file that has the same name as an existing file, the behavior is as follows:
     * + If `OverwriteExisting` is `TRUE`, the existing file is replaced with the file being processed.
     * + If `OverwriteExisting` is `FALSE`, nothing happens, and the workflow processing stops.
     */
    public val overwriteExisting: aws.sdk.kotlin.services.transfer.model.OverwriteExisting? = builder.overwriteExisting
    /**
     * Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow.
     * + To use the previous file as the input, enter `${previous.file}`. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value.
     * + To use the originally uploaded file location as input for this step, enter `${original.file}`.
     */
    public val sourceFileLocation: kotlin.String? = builder.sourceFileLocation
    /**
     * The type of encryption used. Currently, this value must be `PGP`.
     */
    public val type: aws.sdk.kotlin.services.transfer.model.EncryptionType = requireNotNull(builder.type) { "A non-null value must be provided for type" }

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

    override fun toString(): kotlin.String = buildString {
        append("DecryptStepDetails(")
        append("destinationFileLocation=$destinationFileLocation,")
        append("name=$name,")
        append("overwriteExisting=$overwriteExisting,")
        append("sourceFileLocation=$sourceFileLocation,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = destinationFileLocation?.hashCode() ?: 0
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (overwriteExisting?.hashCode() ?: 0)
        result = 31 * result + (sourceFileLocation?.hashCode() ?: 0)
        result = 31 * result + (type.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 DecryptStepDetails

        if (destinationFileLocation != other.destinationFileLocation) return false
        if (name != other.name) return false
        if (overwriteExisting != other.overwriteExisting) return false
        if (sourceFileLocation != other.sourceFileLocation) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the location for the file being decrypted. Use `${Transfer:UserName}` or `${Transfer:UploadDate}` in this field to parametrize the destination prefix by username or uploaded date.
         * + Set the value of `DestinationFileLocation` to `${Transfer:UserName}` to decrypt uploaded files to an Amazon S3 bucket that is prefixed with the name of the Transfer Family user that uploaded the file.
         * + Set the value of `DestinationFileLocation` to `${Transfer:UploadDate}` to decrypt uploaded files to an Amazon S3 bucket that is prefixed with the date of the upload.The system resolves `UploadDate` to a date format of *YYYY-MM-DD*, based on the date the file is uploaded in UTC.
         */
        public var destinationFileLocation: aws.sdk.kotlin.services.transfer.model.InputFileLocation? = null
        /**
         * The name of the step, used as an identifier.
         */
        public var name: kotlin.String? = null
        /**
         * A flag that indicates whether to overwrite an existing file of the same name. The default is `FALSE`.
         *
         * If the workflow is processing a file that has the same name as an existing file, the behavior is as follows:
         * + If `OverwriteExisting` is `TRUE`, the existing file is replaced with the file being processed.
         * + If `OverwriteExisting` is `FALSE`, nothing happens, and the workflow processing stops.
         */
        public var overwriteExisting: aws.sdk.kotlin.services.transfer.model.OverwriteExisting? = null
        /**
         * Specifies which file to use as input to the workflow step: either the output from the previous step, or the originally uploaded file for the workflow.
         * + To use the previous file as the input, enter `${previous.file}`. In this case, this workflow step uses the output file from the previous workflow step as input. This is the default value.
         * + To use the originally uploaded file location as input for this step, enter `${original.file}`.
         */
        public var sourceFileLocation: kotlin.String? = null
        /**
         * The type of encryption used. Currently, this value must be `PGP`.
         */
        public var type: aws.sdk.kotlin.services.transfer.model.EncryptionType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.DecryptStepDetails) : this() {
            this.destinationFileLocation = x.destinationFileLocation
            this.name = x.name
            this.overwriteExisting = x.overwriteExisting
            this.sourceFileLocation = x.sourceFileLocation
            this.type = x.type
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.transfer.model.InputFileLocation] inside the given [block]
         */
        public fun destinationFileLocation(block: aws.sdk.kotlin.services.transfer.model.InputFileLocation.Builder.() -> kotlin.Unit) {
            this.destinationFileLocation = aws.sdk.kotlin.services.transfer.model.InputFileLocation.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (type == null) type = EncryptionType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy