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

commonMain.aws.sdk.kotlin.services.transfer.model.CreateWorkflowRequest.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

public class CreateWorkflowRequest private constructor(builder: Builder) {
    /**
     * A textual description for the workflow.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Specifies the steps (actions) to take if errors are encountered during execution of the workflow.
     *
     * For custom steps, the Lambda function needs to send `FAILURE` to the call back API to kick off the exception steps. Additionally, if the Lambda does not send `SUCCESS` before it times out, the exception steps are executed.
     */
    public val onExceptionSteps: List? = builder.onExceptionSteps
    /**
     * Specifies the details for the steps that are in the specified workflow.
     *
     *  The `TYPE` specifies which of the following actions is being taken for this step.
     * + **`COPY`** - Copy the file to another location.
     * + **`CUSTOM`** - Perform a custom step with an Lambda function target.
     * + **`DECRYPT`** - Decrypt a file that was encrypted before it was uploaded.
     * + **`DELETE`** - Delete the file.
     * + **`TAG`** - Add a tag to the file.
     *
     *  Currently, copying and tagging are supported only on S3.
     *
     *  For file location, you specify either the Amazon S3 bucket and key, or the Amazon EFS file system ID and path.
     */
    public val steps: List? = builder.steps
    /**
     * Key-value pairs that can be used to group and search for workflows. Tags are metadata attached to workflows for any purpose.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateWorkflowRequest(")
        append("description=$description,")
        append("onExceptionSteps=$onExceptionSteps,")
        append("steps=$steps,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (onExceptionSteps?.hashCode() ?: 0)
        result = 31 * result + (steps?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateWorkflowRequest

        if (description != other.description) return false
        if (onExceptionSteps != other.onExceptionSteps) return false
        if (steps != other.steps) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A textual description for the workflow.
         */
        public var description: kotlin.String? = null
        /**
         * Specifies the steps (actions) to take if errors are encountered during execution of the workflow.
         *
         * For custom steps, the Lambda function needs to send `FAILURE` to the call back API to kick off the exception steps. Additionally, if the Lambda does not send `SUCCESS` before it times out, the exception steps are executed.
         */
        public var onExceptionSteps: List? = null
        /**
         * Specifies the details for the steps that are in the specified workflow.
         *
         *  The `TYPE` specifies which of the following actions is being taken for this step.
         * + **`COPY`** - Copy the file to another location.
         * + **`CUSTOM`** - Perform a custom step with an Lambda function target.
         * + **`DECRYPT`** - Decrypt a file that was encrypted before it was uploaded.
         * + **`DELETE`** - Delete the file.
         * + **`TAG`** - Add a tag to the file.
         *
         *  Currently, copying and tagging are supported only on S3.
         *
         *  For file location, you specify either the Amazon S3 bucket and key, or the Amazon EFS file system ID and path.
         */
        public var steps: List? = null
        /**
         * Key-value pairs that can be used to group and search for workflows. Tags are metadata attached to workflows for any purpose.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.CreateWorkflowRequest) : this() {
            this.description = x.description
            this.onExceptionSteps = x.onExceptionSteps
            this.steps = x.steps
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy