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

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

/**
 * Container for the `WorkflowDetail` data type. It is used by actions that trigger a workflow to begin execution.
 */
public class WorkflowDetails private constructor(builder: Builder) {
    /**
     * A trigger that starts a workflow if a file is only partially uploaded. You can attach a workflow to a server that executes whenever there is a partial upload.
     *
     * A *partial upload* occurs when a file is open when the session disconnects.
     */
    public val onPartialUpload: List? = builder.onPartialUpload
    /**
     * A trigger that starts a workflow: the workflow begins to execute after a file is uploaded.
     *
     * To remove an associated workflow from a server, you can provide an empty `OnUpload` object, as in the following example.
     *
     * `aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'`
     */
    public val onUpload: List? = builder.onUpload

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

    override fun toString(): kotlin.String = buildString {
        append("WorkflowDetails(")
        append("onPartialUpload=$onPartialUpload,")
        append("onUpload=$onUpload")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = onPartialUpload?.hashCode() ?: 0
        result = 31 * result + (onUpload?.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 WorkflowDetails

        if (onPartialUpload != other.onPartialUpload) return false
        if (onUpload != other.onUpload) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A trigger that starts a workflow if a file is only partially uploaded. You can attach a workflow to a server that executes whenever there is a partial upload.
         *
         * A *partial upload* occurs when a file is open when the session disconnects.
         */
        public var onPartialUpload: List? = null
        /**
         * A trigger that starts a workflow: the workflow begins to execute after a file is uploaded.
         *
         * To remove an associated workflow from a server, you can provide an empty `OnUpload` object, as in the following example.
         *
         * `aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'`
         */
        public var onUpload: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.WorkflowDetails) : this() {
            this.onPartialUpload = x.onPartialUpload
            this.onUpload = x.onUpload
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy