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

commonMain.aws.sdk.kotlin.services.glue.model.Workflow.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 is a collection of multiple dependent Glue jobs and crawlers that are run to complete a complex ETL task. A workflow manages the execution and monitoring of all its jobs and crawlers.
 */
public class Workflow private constructor(builder: Builder) {
    /**
     * This structure indicates the details of the blueprint that this particular workflow is created from.
     */
    public val blueprintDetails: aws.sdk.kotlin.services.glue.model.BlueprintDetails? = builder.blueprintDetails
    /**
     * The date and time when the workflow was created.
     */
    public val createdOn: aws.smithy.kotlin.runtime.time.Instant? = builder.createdOn
    /**
     * A collection of properties to be used as part of each execution of the workflow. The run properties are made available to each job in the workflow. A job can modify the properties for the next jobs in the flow.
     */
    public val defaultRunProperties: Map? = builder.defaultRunProperties
    /**
     * A description of the workflow.
     */
    public val description: kotlin.String? = builder.description
    /**
     * 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
    /**
     * The date and time when the workflow was last modified.
     */
    public val lastModifiedOn: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedOn
    /**
     * The information about the last execution of the workflow.
     */
    public val lastRun: aws.sdk.kotlin.services.glue.model.WorkflowRun? = builder.lastRun
    /**
     * You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some cases, to prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
     */
    public val maxConcurrentRuns: kotlin.Int? = builder.maxConcurrentRuns
    /**
     * The name of the workflow.
     */
    public val name: kotlin.String? = builder.name

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

    override fun toString(): kotlin.String = buildString {
        append("Workflow(")
        append("blueprintDetails=$blueprintDetails,")
        append("createdOn=$createdOn,")
        append("defaultRunProperties=$defaultRunProperties,")
        append("description=$description,")
        append("graph=$graph,")
        append("lastModifiedOn=$lastModifiedOn,")
        append("lastRun=$lastRun,")
        append("maxConcurrentRuns=$maxConcurrentRuns,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = blueprintDetails?.hashCode() ?: 0
        result = 31 * result + (createdOn?.hashCode() ?: 0)
        result = 31 * result + (defaultRunProperties?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (graph?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedOn?.hashCode() ?: 0)
        result = 31 * result + (lastRun?.hashCode() ?: 0)
        result = 31 * result + (maxConcurrentRuns ?: 0)
        result = 31 * result + (name?.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 Workflow

        if (blueprintDetails != other.blueprintDetails) return false
        if (createdOn != other.createdOn) return false
        if (defaultRunProperties != other.defaultRunProperties) return false
        if (description != other.description) return false
        if (graph != other.graph) return false
        if (lastModifiedOn != other.lastModifiedOn) return false
        if (lastRun != other.lastRun) return false
        if (maxConcurrentRuns != other.maxConcurrentRuns) return false
        if (name != other.name) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * This structure indicates the details of the blueprint that this particular workflow is created from.
         */
        public var blueprintDetails: aws.sdk.kotlin.services.glue.model.BlueprintDetails? = null
        /**
         * The date and time when the workflow was created.
         */
        public var createdOn: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A collection of properties to be used as part of each execution of the workflow. The run properties are made available to each job in the workflow. A job can modify the properties for the next jobs in the flow.
         */
        public var defaultRunProperties: Map? = null
        /**
         * A description of the workflow.
         */
        public var description: 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
        /**
         * The date and time when the workflow was last modified.
         */
        public var lastModifiedOn: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The information about the last execution of the workflow.
         */
        public var lastRun: aws.sdk.kotlin.services.glue.model.WorkflowRun? = null
        /**
         * You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some cases, to prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
         */
        public var maxConcurrentRuns: kotlin.Int? = null
        /**
         * The name of the workflow.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.Workflow) : this() {
            this.blueprintDetails = x.blueprintDetails
            this.createdOn = x.createdOn
            this.defaultRunProperties = x.defaultRunProperties
            this.description = x.description
            this.graph = x.graph
            this.lastModifiedOn = x.lastModifiedOn
            this.lastRun = x.lastRun
            this.maxConcurrentRuns = x.maxConcurrentRuns
            this.name = x.name
        }

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

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

        /**
         * 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.WorkflowRun] inside the given [block]
         */
        public fun lastRun(block: aws.sdk.kotlin.services.glue.model.WorkflowRun.Builder.() -> kotlin.Unit) {
            this.lastRun = aws.sdk.kotlin.services.glue.model.WorkflowRun.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy