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

commonMain.aws.sdk.kotlin.services.swf.model.ExternalWorkflowExecutionCancelRequestedEventAttributes.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 `ExternalWorkflowExecutionCancelRequested` event.
 */
public class ExternalWorkflowExecutionCancelRequestedEventAttributes private constructor(builder: Builder) {
    /**
     * The ID of the `RequestCancelExternalWorkflowExecutionInitiated` event corresponding to the `RequestCancelExternalWorkflowExecution` decision to cancel this external workflow execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.
     */
    public val initiatedEventId: kotlin.Long = builder.initiatedEventId
    /**
     * The external workflow execution to which the cancellation request was delivered.
     */
    public val workflowExecution: aws.sdk.kotlin.services.swf.model.WorkflowExecution? = builder.workflowExecution

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

    override fun toString(): kotlin.String = buildString {
        append("ExternalWorkflowExecutionCancelRequestedEventAttributes(")
        append("initiatedEventId=$initiatedEventId,")
        append("workflowExecution=$workflowExecution")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = initiatedEventId.hashCode()
        result = 31 * result + (workflowExecution?.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 ExternalWorkflowExecutionCancelRequestedEventAttributes

        if (initiatedEventId != other.initiatedEventId) return false
        if (workflowExecution != other.workflowExecution) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the `RequestCancelExternalWorkflowExecutionInitiated` event corresponding to the `RequestCancelExternalWorkflowExecution` decision to cancel this external workflow execution. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.
         */
        public var initiatedEventId: kotlin.Long = 0L
        /**
         * The external workflow execution to which the cancellation request was delivered.
         */
        public var workflowExecution: aws.sdk.kotlin.services.swf.model.WorkflowExecution? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.ExternalWorkflowExecutionCancelRequestedEventAttributes) : this() {
            this.initiatedEventId = x.initiatedEventId
            this.workflowExecution = x.workflowExecution
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.swf.model.WorkflowExecution] inside the given [block]
         */
        public fun workflowExecution(block: aws.sdk.kotlin.services.swf.model.WorkflowExecution.Builder.() -> kotlin.Unit) {
            this.workflowExecution = aws.sdk.kotlin.services.swf.model.WorkflowExecution.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy