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

commonMain.aws.sdk.kotlin.services.swf.model.SignalExternalWorkflowExecutionInitiatedEventAttributes.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 `SignalExternalWorkflowExecutionInitiated` event.
 */
public class SignalExternalWorkflowExecutionInitiatedEventAttributes private constructor(builder: Builder) {
    /**
     * Data attached to the event that can be used by the decider in subsequent decision tasks.
     */
    public val control: kotlin.String? = builder.control
    /**
     * The ID of the `DecisionTaskCompleted` event corresponding to the decision task that resulted in the `SignalExternalWorkflowExecution` decision for this signal. 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 input provided to the signal.
     */
    public val input: kotlin.String? = builder.input
    /**
     * The `runId` of the external workflow execution to send the signal to.
     */
    public val runId: kotlin.String? = builder.runId
    /**
     * The name of the signal.
     */
    public val signalName: kotlin.String = requireNotNull(builder.signalName) { "A non-null value must be provided for signalName" }
    /**
     * The `workflowId` of the external 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.SignalExternalWorkflowExecutionInitiatedEventAttributes = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("SignalExternalWorkflowExecutionInitiatedEventAttributes(")
        append("control=$control,")
        append("decisionTaskCompletedEventId=$decisionTaskCompletedEventId,")
        append("input=$input,")
        append("runId=$runId,")
        append("signalName=$signalName,")
        append("workflowId=$workflowId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = control?.hashCode() ?: 0
        result = 31 * result + (decisionTaskCompletedEventId.hashCode())
        result = 31 * result + (input?.hashCode() ?: 0)
        result = 31 * result + (runId?.hashCode() ?: 0)
        result = 31 * result + (signalName.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 SignalExternalWorkflowExecutionInitiatedEventAttributes

        if (control != other.control) return false
        if (decisionTaskCompletedEventId != other.decisionTaskCompletedEventId) return false
        if (input != other.input) return false
        if (runId != other.runId) return false
        if (signalName != other.signalName) return false
        if (workflowId != other.workflowId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Data attached to the event that can be used by the decider in subsequent decision tasks.
         */
        public var control: kotlin.String? = null
        /**
         * The ID of the `DecisionTaskCompleted` event corresponding to the decision task that resulted in the `SignalExternalWorkflowExecution` decision for this signal. 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 input provided to the signal.
         */
        public var input: kotlin.String? = null
        /**
         * The `runId` of the external workflow execution to send the signal to.
         */
        public var runId: kotlin.String? = null
        /**
         * The name of the signal.
         */
        public var signalName: kotlin.String? = null
        /**
         * The `workflowId` of the external workflow execution.
         */
        public var workflowId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.SignalExternalWorkflowExecutionInitiatedEventAttributes) : this() {
            this.control = x.control
            this.decisionTaskCompletedEventId = x.decisionTaskCompletedEventId
            this.input = x.input
            this.runId = x.runId
            this.signalName = x.signalName
            this.workflowId = x.workflowId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy