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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about a specific trigger.
 */
public class Trigger private constructor(builder: Builder) {
    /**
     * The actions initiated by this trigger.
     */
    public val actions: List? = builder.actions
    /**
     * A description of this trigger.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.
     */
    public val eventBatchingCondition: aws.sdk.kotlin.services.glue.model.EventBatchingCondition? = builder.eventBatchingCondition
    /**
     * Reserved for future use.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The name of the trigger.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The predicate of this trigger, which defines when it will fire.
     */
    public val predicate: aws.sdk.kotlin.services.glue.model.Predicate? = builder.predicate
    /**
     * A `cron` expression used to specify the schedule (see [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html). For example, to run something every day at 12:15 UTC, you would specify: `cron(15 12 * * ? *)`.
     */
    public val schedule: kotlin.String? = builder.schedule
    /**
     * The current state of the trigger.
     */
    public val state: aws.sdk.kotlin.services.glue.model.TriggerState? = builder.state
    /**
     * The type of trigger that this is.
     */
    public val type: aws.sdk.kotlin.services.glue.model.TriggerType? = builder.type
    /**
     * The name of the workflow associated with the trigger.
     */
    public val workflowName: kotlin.String? = builder.workflowName

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

    override fun toString(): kotlin.String = buildString {
        append("Trigger(")
        append("actions=$actions,")
        append("description=$description,")
        append("eventBatchingCondition=$eventBatchingCondition,")
        append("id=$id,")
        append("name=$name,")
        append("predicate=$predicate,")
        append("schedule=$schedule,")
        append("state=$state,")
        append("type=$type,")
        append("workflowName=$workflowName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actions?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (eventBatchingCondition?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (predicate?.hashCode() ?: 0)
        result = 31 * result + (schedule?.hashCode() ?: 0)
        result = 31 * result + (state?.hashCode() ?: 0)
        result = 31 * result + (type?.hashCode() ?: 0)
        result = 31 * result + (workflowName?.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 Trigger

        if (actions != other.actions) return false
        if (description != other.description) return false
        if (eventBatchingCondition != other.eventBatchingCondition) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (predicate != other.predicate) return false
        if (schedule != other.schedule) return false
        if (state != other.state) return false
        if (type != other.type) return false
        if (workflowName != other.workflowName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The actions initiated by this trigger.
         */
        public var actions: List? = null
        /**
         * A description of this trigger.
         */
        public var description: kotlin.String? = null
        /**
         * Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.
         */
        public var eventBatchingCondition: aws.sdk.kotlin.services.glue.model.EventBatchingCondition? = null
        /**
         * Reserved for future use.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the trigger.
         */
        public var name: kotlin.String? = null
        /**
         * The predicate of this trigger, which defines when it will fire.
         */
        public var predicate: aws.sdk.kotlin.services.glue.model.Predicate? = null
        /**
         * A `cron` expression used to specify the schedule (see [Time-Based Schedules for Jobs and Crawlers](https://docs.aws.amazon.com/glue/latest/dg/monitor-data-warehouse-schedule.html). For example, to run something every day at 12:15 UTC, you would specify: `cron(15 12 * * ? *)`.
         */
        public var schedule: kotlin.String? = null
        /**
         * The current state of the trigger.
         */
        public var state: aws.sdk.kotlin.services.glue.model.TriggerState? = null
        /**
         * The type of trigger that this is.
         */
        public var type: aws.sdk.kotlin.services.glue.model.TriggerType? = null
        /**
         * The name of the workflow associated with the trigger.
         */
        public var workflowName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.Trigger) : this() {
            this.actions = x.actions
            this.description = x.description
            this.eventBatchingCondition = x.eventBatchingCondition
            this.id = x.id
            this.name = x.name
            this.predicate = x.predicate
            this.schedule = x.schedule
            this.state = x.state
            this.type = x.type
            this.workflowName = x.workflowName
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy