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

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

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Defines an action to be initiated by a trigger.
 */
public class Action private constructor(builder: Builder) {
    /**
     * The job arguments used when this trigger fires. For this job run, they replace the default arguments set in the job definition itself.
     *
     * You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.
     *
     * For information about how to specify and consume your own Job arguments, see the [Calling Glue APIs in Python](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) topic in the developer guide.
     *
     * For information about the key-value pairs that Glue consumes to set up your job, see the [Special Parameters Used by Glue](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) topic in the developer guide.
     */
    public val arguments: Map? = builder.arguments
    /**
     * The name of the crawler to be used with this action.
     */
    public val crawlerName: kotlin.String? = builder.crawlerName
    /**
     * The name of a job to be run.
     */
    public val jobName: kotlin.String? = builder.jobName
    /**
     * Specifies configuration properties of a job run notification.
     */
    public val notificationProperty: aws.sdk.kotlin.services.glue.model.NotificationProperty? = builder.notificationProperty
    /**
     * The name of the `SecurityConfiguration` structure to be used with this action.
     */
    public val securityConfiguration: kotlin.String? = builder.securityConfiguration
    /**
     * The `JobRun` timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters `TIMEOUT` status. The default is 2,880 minutes (48 hours). This overrides the timeout value set in the parent job.
     */
    public val timeout: kotlin.Int? = builder.timeout

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

    override fun toString(): kotlin.String = buildString {
        append("Action(")
        append("arguments=$arguments,")
        append("crawlerName=$crawlerName,")
        append("jobName=$jobName,")
        append("notificationProperty=$notificationProperty,")
        append("securityConfiguration=$securityConfiguration,")
        append("timeout=$timeout")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arguments?.hashCode() ?: 0
        result = 31 * result + (crawlerName?.hashCode() ?: 0)
        result = 31 * result + (jobName?.hashCode() ?: 0)
        result = 31 * result + (notificationProperty?.hashCode() ?: 0)
        result = 31 * result + (securityConfiguration?.hashCode() ?: 0)
        result = 31 * result + (timeout ?: 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 Action

        if (arguments != other.arguments) return false
        if (crawlerName != other.crawlerName) return false
        if (jobName != other.jobName) return false
        if (notificationProperty != other.notificationProperty) return false
        if (securityConfiguration != other.securityConfiguration) return false
        if (timeout != other.timeout) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The job arguments used when this trigger fires. For this job run, they replace the default arguments set in the job definition itself.
         *
         * You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.
         *
         * For information about how to specify and consume your own Job arguments, see the [Calling Glue APIs in Python](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) topic in the developer guide.
         *
         * For information about the key-value pairs that Glue consumes to set up your job, see the [Special Parameters Used by Glue](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) topic in the developer guide.
         */
        public var arguments: Map? = null
        /**
         * The name of the crawler to be used with this action.
         */
        public var crawlerName: kotlin.String? = null
        /**
         * The name of a job to be run.
         */
        public var jobName: kotlin.String? = null
        /**
         * Specifies configuration properties of a job run notification.
         */
        public var notificationProperty: aws.sdk.kotlin.services.glue.model.NotificationProperty? = null
        /**
         * The name of the `SecurityConfiguration` structure to be used with this action.
         */
        public var securityConfiguration: kotlin.String? = null
        /**
         * The `JobRun` timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters `TIMEOUT` status. The default is 2,880 minutes (48 hours). This overrides the timeout value set in the parent job.
         */
        public var timeout: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.Action) : this() {
            this.arguments = x.arguments
            this.crawlerName = x.crawlerName
            this.jobName = x.jobName
            this.notificationProperty = x.notificationProperty
            this.securityConfiguration = x.securityConfiguration
            this.timeout = x.timeout
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy