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

commonMain.aws.sdk.kotlin.services.swf.model.WorkflowExecutionTimedOutEventAttributes.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 `WorkflowExecutionTimedOut` event.
 */
public class WorkflowExecutionTimedOutEventAttributes private constructor(builder: Builder) {
    /**
     * The policy used for the child workflow executions of this workflow execution.
     *
     * The supported child policies are:
     * + `TERMINATE` – The child executions are terminated.
     * + `REQUEST_CANCEL` – A request to cancel is attempted for each child execution by recording a `WorkflowExecutionCancelRequested` event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
     * + `ABANDON` – No action is taken. The child executions continue to run.
     */
    public val childPolicy: aws.sdk.kotlin.services.swf.model.ChildPolicy = requireNotNull(builder.childPolicy) { "A non-null value must be provided for childPolicy" }
    /**
     * The type of timeout that caused this event.
     */
    public val timeoutType: aws.sdk.kotlin.services.swf.model.WorkflowExecutionTimeoutType = requireNotNull(builder.timeoutType) { "A non-null value must be provided for timeoutType" }

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

    override fun toString(): kotlin.String = buildString {
        append("WorkflowExecutionTimedOutEventAttributes(")
        append("childPolicy=$childPolicy,")
        append("timeoutType=$timeoutType")
        append(")")
    }

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

        if (childPolicy != other.childPolicy) return false
        if (timeoutType != other.timeoutType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The policy used for the child workflow executions of this workflow execution.
         *
         * The supported child policies are:
         * + `TERMINATE` – The child executions are terminated.
         * + `REQUEST_CANCEL` – A request to cancel is attempted for each child execution by recording a `WorkflowExecutionCancelRequested` event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.
         * + `ABANDON` – No action is taken. The child executions continue to run.
         */
        public var childPolicy: aws.sdk.kotlin.services.swf.model.ChildPolicy? = null
        /**
         * The type of timeout that caused this event.
         */
        public var timeoutType: aws.sdk.kotlin.services.swf.model.WorkflowExecutionTimeoutType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.WorkflowExecutionTimedOutEventAttributes) : this() {
            this.childPolicy = x.childPolicy
            this.timeoutType = x.timeoutType
        }

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

        internal fun correctErrors(): Builder {
            if (childPolicy == null) childPolicy = ChildPolicy.SdkUnknown("no value provided")
            if (timeoutType == null) timeoutType = WorkflowExecutionTimeoutType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy