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

commonMain.aws.sdk.kotlin.services.swf.model.WorkflowExecution.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.swf.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents a workflow execution.
 */
public class WorkflowExecution private constructor(builder: Builder) {
    /**
     * A system-generated unique identifier for the workflow execution.
     */
    public val runId: kotlin.String = requireNotNull(builder.runId) { "A non-null value must be provided for runId" }
    /**
     * The user defined identifier associated with the workflow execution.
     */
    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.swf.model.WorkflowExecution = Builder().apply(block).build()
    }

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

    override fun hashCode(): kotlin.Int {
        var result = runId.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 WorkflowExecution

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A system-generated unique identifier for the workflow execution.
         */
        public var runId: kotlin.String? = null
        /**
         * The user defined identifier associated with the workflow execution.
         */
        public var workflowId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.WorkflowExecution) : this() {
            this.runId = x.runId
            this.workflowId = x.workflowId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy