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

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

/**
 * Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.
 *
 * In addition to a workflow to execute when a file is uploaded completely, `WorkflowDetails` can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when the server session disconnects while the file is still being uploaded.
 */
public class WorkflowDetail private constructor(builder: Builder) {
    /**
     * Includes the necessary permissions for S3, EFS, and Lambda operations that Transfer can assume, so that all workflow steps can operate on the required resources
     */
    public val executionRole: kotlin.String = requireNotNull(builder.executionRole) { "A non-null value must be provided for executionRole" }
    /**
     * A unique identifier for the workflow.
     */
    public val workflowId: kotlin.String = requireNotNull(builder.workflowId) { "A non-null value must be provided for workflowId" }

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

    override fun toString(): kotlin.String = buildString {
        append("WorkflowDetail(")
        append("executionRole=$executionRole,")
        append("workflowId=$workflowId")
        append(")")
    }

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

        if (executionRole != other.executionRole) return false
        if (workflowId != other.workflowId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Includes the necessary permissions for S3, EFS, and Lambda operations that Transfer can assume, so that all workflow steps can operate on the required resources
         */
        public var executionRole: kotlin.String? = null
        /**
         * A unique identifier for the workflow.
         */
        public var workflowId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.transfer.model.WorkflowDetail) : this() {
            this.executionRole = x.executionRole
            this.workflowId = x.workflowId
        }

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

        internal fun correctErrors(): Builder {
            if (executionRole == null) executionRole = ""
            if (workflowId == null) workflowId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy