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

commonMain.aws.sdk.kotlin.services.glue.model.WorkflowRun.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * A workflow run is an execution of a workflow providing all the runtime information.
 */
public class WorkflowRun private constructor(builder: Builder) {
    /**
     * The date and time when the workflow run completed.
     */
    public val completedOn: aws.smithy.kotlin.runtime.time.Instant? = builder.completedOn
    /**
     * This error message describes any error that may have occurred in starting the workflow run. Currently the only error message is "Concurrent runs exceeded for workflow: `foo`."
     */
    public val errorMessage: kotlin.String? = builder.errorMessage
    /**
     * The graph representing all the Glue components that belong to the workflow as nodes and directed connections between them as edges.
     */
    public val graph: aws.sdk.kotlin.services.glue.model.WorkflowGraph? = builder.graph
    /**
     * Name of the workflow that was run.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The ID of the previous workflow run.
     */
    public val previousRunId: kotlin.String? = builder.previousRunId
    /**
     * The date and time when the workflow run was started.
     */
    public val startedOn: aws.smithy.kotlin.runtime.time.Instant? = builder.startedOn
    /**
     * The batch condition that started the workflow run.
     */
    public val startingEventBatchCondition: aws.sdk.kotlin.services.glue.model.StartingEventBatchCondition? = builder.startingEventBatchCondition
    /**
     * The statistics of the run.
     */
    public val statistics: aws.sdk.kotlin.services.glue.model.WorkflowRunStatistics? = builder.statistics
    /**
     * The status of the workflow run.
     */
    public val status: aws.sdk.kotlin.services.glue.model.WorkflowRunStatus? = builder.status
    /**
     * The ID of this workflow run.
     */
    public val workflowRunId: kotlin.String? = builder.workflowRunId
    /**
     * The workflow run properties which were set during the run.
     */
    public val workflowRunProperties: Map? = builder.workflowRunProperties

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

    override fun toString(): kotlin.String = buildString {
        append("WorkflowRun(")
        append("completedOn=$completedOn,")
        append("errorMessage=$errorMessage,")
        append("graph=$graph,")
        append("name=$name,")
        append("previousRunId=$previousRunId,")
        append("startedOn=$startedOn,")
        append("startingEventBatchCondition=$startingEventBatchCondition,")
        append("statistics=$statistics,")
        append("status=$status,")
        append("workflowRunId=$workflowRunId,")
        append("workflowRunProperties=$workflowRunProperties")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = completedOn?.hashCode() ?: 0
        result = 31 * result + (errorMessage?.hashCode() ?: 0)
        result = 31 * result + (graph?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (previousRunId?.hashCode() ?: 0)
        result = 31 * result + (startedOn?.hashCode() ?: 0)
        result = 31 * result + (startingEventBatchCondition?.hashCode() ?: 0)
        result = 31 * result + (statistics?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (workflowRunId?.hashCode() ?: 0)
        result = 31 * result + (workflowRunProperties?.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 WorkflowRun

        if (completedOn != other.completedOn) return false
        if (errorMessage != other.errorMessage) return false
        if (graph != other.graph) return false
        if (name != other.name) return false
        if (previousRunId != other.previousRunId) return false
        if (startedOn != other.startedOn) return false
        if (startingEventBatchCondition != other.startingEventBatchCondition) return false
        if (statistics != other.statistics) return false
        if (status != other.status) return false
        if (workflowRunId != other.workflowRunId) return false
        if (workflowRunProperties != other.workflowRunProperties) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The date and time when the workflow run completed.
         */
        public var completedOn: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * This error message describes any error that may have occurred in starting the workflow run. Currently the only error message is "Concurrent runs exceeded for workflow: `foo`."
         */
        public var errorMessage: kotlin.String? = null
        /**
         * The graph representing all the Glue components that belong to the workflow as nodes and directed connections between them as edges.
         */
        public var graph: aws.sdk.kotlin.services.glue.model.WorkflowGraph? = null
        /**
         * Name of the workflow that was run.
         */
        public var name: kotlin.String? = null
        /**
         * The ID of the previous workflow run.
         */
        public var previousRunId: kotlin.String? = null
        /**
         * The date and time when the workflow run was started.
         */
        public var startedOn: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The batch condition that started the workflow run.
         */
        public var startingEventBatchCondition: aws.sdk.kotlin.services.glue.model.StartingEventBatchCondition? = null
        /**
         * The statistics of the run.
         */
        public var statistics: aws.sdk.kotlin.services.glue.model.WorkflowRunStatistics? = null
        /**
         * The status of the workflow run.
         */
        public var status: aws.sdk.kotlin.services.glue.model.WorkflowRunStatus? = null
        /**
         * The ID of this workflow run.
         */
        public var workflowRunId: kotlin.String? = null
        /**
         * The workflow run properties which were set during the run.
         */
        public var workflowRunProperties: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.WorkflowRun) : this() {
            this.completedOn = x.completedOn
            this.errorMessage = x.errorMessage
            this.graph = x.graph
            this.name = x.name
            this.previousRunId = x.previousRunId
            this.startedOn = x.startedOn
            this.startingEventBatchCondition = x.startingEventBatchCondition
            this.statistics = x.statistics
            this.status = x.status
            this.workflowRunId = x.workflowRunId
            this.workflowRunProperties = x.workflowRunProperties
        }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy