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

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

/**
 * Contains the counts of open tasks, child workflow executions and timers for a workflow execution.
 */
public class WorkflowExecutionOpenCounts private constructor(builder: Builder) {
    /**
     * The count of activity tasks whose status is `OPEN`.
     */
    public val openActivityTasks: kotlin.Int = builder.openActivityTasks
    /**
     * The count of child workflow executions whose status is `OPEN`.
     */
    public val openChildWorkflowExecutions: kotlin.Int = builder.openChildWorkflowExecutions
    /**
     * The count of decision tasks whose status is OPEN. A workflow execution can have at most one open decision task.
     */
    public val openDecisionTasks: kotlin.Int = builder.openDecisionTasks
    /**
     * The count of Lambda tasks whose status is `OPEN`.
     */
    public val openLambdaFunctions: kotlin.Int = builder.openLambdaFunctions
    /**
     * The count of timers started by this workflow execution that have not fired yet.
     */
    public val openTimers: kotlin.Int = builder.openTimers

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

    override fun toString(): kotlin.String = buildString {
        append("WorkflowExecutionOpenCounts(")
        append("openActivityTasks=$openActivityTasks,")
        append("openChildWorkflowExecutions=$openChildWorkflowExecutions,")
        append("openDecisionTasks=$openDecisionTasks,")
        append("openLambdaFunctions=$openLambdaFunctions,")
        append("openTimers=$openTimers")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = openActivityTasks
        result = 31 * result + (openChildWorkflowExecutions)
        result = 31 * result + (openDecisionTasks)
        result = 31 * result + (openLambdaFunctions)
        result = 31 * result + (openTimers)
        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 WorkflowExecutionOpenCounts

        if (openActivityTasks != other.openActivityTasks) return false
        if (openChildWorkflowExecutions != other.openChildWorkflowExecutions) return false
        if (openDecisionTasks != other.openDecisionTasks) return false
        if (openLambdaFunctions != other.openLambdaFunctions) return false
        if (openTimers != other.openTimers) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The count of activity tasks whose status is `OPEN`.
         */
        public var openActivityTasks: kotlin.Int = 0
        /**
         * The count of child workflow executions whose status is `OPEN`.
         */
        public var openChildWorkflowExecutions: kotlin.Int = 0
        /**
         * The count of decision tasks whose status is OPEN. A workflow execution can have at most one open decision task.
         */
        public var openDecisionTasks: kotlin.Int = 0
        /**
         * The count of Lambda tasks whose status is `OPEN`.
         */
        public var openLambdaFunctions: kotlin.Int = 0
        /**
         * The count of timers started by this workflow execution that have not fired yet.
         */
        public var openTimers: kotlin.Int = 0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.WorkflowExecutionOpenCounts) : this() {
            this.openActivityTasks = x.openActivityTasks
            this.openChildWorkflowExecutions = x.openChildWorkflowExecutions
            this.openDecisionTasks = x.openDecisionTasks
            this.openLambdaFunctions = x.openLambdaFunctions
            this.openTimers = x.openTimers
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy