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

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

/**
 * Provide details of the `ChildWorkflowExecutionCanceled` event.
 */
public class ChildWorkflowExecutionCanceledEventAttributes private constructor(builder: Builder) {
    /**
     * Details of the cancellation (if provided).
     */
    public val details: kotlin.String? = builder.details
    /**
     * The ID of the `StartChildWorkflowExecutionInitiated` event corresponding to the `StartChildWorkflowExecution`Decision to start this child 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 ID of the `ChildWorkflowExecutionStarted` event recorded when this child workflow execution was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.
     */
    public val startedEventId: kotlin.Long = builder.startedEventId
    /**
     * The child workflow execution that was canceled.
     */
    public val workflowExecution: aws.sdk.kotlin.services.swf.model.WorkflowExecution? = builder.workflowExecution
    /**
     * The type of the child workflow execution.
     */
    public val workflowType: aws.sdk.kotlin.services.swf.model.WorkflowType? = builder.workflowType

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

    override fun toString(): kotlin.String = buildString {
        append("ChildWorkflowExecutionCanceledEventAttributes(")
        append("details=$details,")
        append("initiatedEventId=$initiatedEventId,")
        append("startedEventId=$startedEventId,")
        append("workflowExecution=$workflowExecution,")
        append("workflowType=$workflowType")
        append(")")
    }

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

        if (details != other.details) return false
        if (initiatedEventId != other.initiatedEventId) return false
        if (startedEventId != other.startedEventId) return false
        if (workflowExecution != other.workflowExecution) return false
        if (workflowType != other.workflowType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Details of the cancellation (if provided).
         */
        public var details: kotlin.String? = null
        /**
         * The ID of the `StartChildWorkflowExecutionInitiated` event corresponding to the `StartChildWorkflowExecution`Decision to start this child 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 ID of the `ChildWorkflowExecutionStarted` event recorded when this child workflow execution was started. This information can be useful for diagnosing problems by tracing back the chain of events leading up to this event.
         */
        public var startedEventId: kotlin.Long = 0L
        /**
         * The child workflow execution that was canceled.
         */
        public var workflowExecution: aws.sdk.kotlin.services.swf.model.WorkflowExecution? = null
        /**
         * The type of the child workflow execution.
         */
        public var workflowType: aws.sdk.kotlin.services.swf.model.WorkflowType? = null

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.swf.model.ChildWorkflowExecutionCanceledEventAttributes = ChildWorkflowExecutionCanceledEventAttributes(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)
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy