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

commonMain.aws.sdk.kotlin.services.swf.model.WorkflowExecutionFailedEventAttributes.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

/**
 * Provides the details of the `WorkflowExecutionFailed` event.
 */
public class WorkflowExecutionFailedEventAttributes private constructor(builder: Builder) {
    /**
     * The ID of the `DecisionTaskCompleted` event corresponding to the decision task that resulted in the `FailWorkflowExecution` decision to fail this execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.
     */
    public val decisionTaskCompletedEventId: kotlin.Long = builder.decisionTaskCompletedEventId
    /**
     * The details of the failure.
     */
    public val details: kotlin.String? = builder.details
    /**
     * The descriptive reason provided for the failure.
     */
    public val reason: kotlin.String? = builder.reason

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

    override fun toString(): kotlin.String = buildString {
        append("WorkflowExecutionFailedEventAttributes(")
        append("decisionTaskCompletedEventId=$decisionTaskCompletedEventId,")
        append("details=$details,")
        append("reason=$reason")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = decisionTaskCompletedEventId.hashCode()
        result = 31 * result + (details?.hashCode() ?: 0)
        result = 31 * result + (reason?.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 WorkflowExecutionFailedEventAttributes

        if (decisionTaskCompletedEventId != other.decisionTaskCompletedEventId) return false
        if (details != other.details) return false
        if (reason != other.reason) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the `DecisionTaskCompleted` event corresponding to the decision task that resulted in the `FailWorkflowExecution` decision to fail this execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.
         */
        public var decisionTaskCompletedEventId: kotlin.Long = 0L
        /**
         * The details of the failure.
         */
        public var details: kotlin.String? = null
        /**
         * The descriptive reason provided for the failure.
         */
        public var reason: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.WorkflowExecutionFailedEventAttributes) : this() {
            this.decisionTaskCompletedEventId = x.decisionTaskCompletedEventId
            this.details = x.details
            this.reason = x.reason
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy