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

commonMain.aws.sdk.kotlin.services.glue.model.CreateTriggerRequest.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

public class CreateTriggerRequest private constructor(builder: Builder) {
    /**
     * The actions initiated by this trigger when it fires.
     */
    public val actions: List? = builder.actions
    /**
     * A description of the new 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
    /**
     * The name of the trigger.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A predicate to specify when the new trigger should fire.
     *
     * This field is required when the trigger type is `CONDITIONAL`.
     */
    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 * * ? *)`.
     *
     * This field is required when the trigger type is SCHEDULED.
     */
    public val schedule: kotlin.String? = builder.schedule
    /**
     * Set to `true` to start `SCHEDULED` and `CONDITIONAL` triggers when created. True is not supported for `ON_DEMAND` triggers.
     */
    public val startOnCreation: kotlin.Boolean? = builder.startOnCreation
    /**
     * The tags to use with this trigger. You may use tags to limit access to the trigger. For more information about tags in Glue, see [Amazon Web Services Tags in Glue](https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) in the developer guide.
     */
    public val tags: Map? = builder.tags
    /**
     * The type of the new trigger.
     */
    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.CreateTriggerRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateTriggerRequest(")
        append("actions=$actions,")
        append("description=$description,")
        append("eventBatchingCondition=$eventBatchingCondition,")
        append("name=$name,")
        append("predicate=$predicate,")
        append("schedule=$schedule,")
        append("startOnCreation=$startOnCreation,")
        append("tags=$tags,")
        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 + (name?.hashCode() ?: 0)
        result = 31 * result + (predicate?.hashCode() ?: 0)
        result = 31 * result + (schedule?.hashCode() ?: 0)
        result = 31 * result + (startOnCreation?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateTriggerRequest

        if (actions != other.actions) return false
        if (description != other.description) return false
        if (eventBatchingCondition != other.eventBatchingCondition) return false
        if (name != other.name) return false
        if (predicate != other.predicate) return false
        if (schedule != other.schedule) return false
        if (startOnCreation != other.startOnCreation) return false
        if (tags != other.tags) 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.CreateTriggerRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The actions initiated by this trigger when it fires.
         */
        public var actions: List? = null
        /**
         * A description of the new 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
        /**
         * The name of the trigger.
         */
        public var name: kotlin.String? = null
        /**
         * A predicate to specify when the new trigger should fire.
         *
         * This field is required when the trigger type is `CONDITIONAL`.
         */
        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 * * ? *)`.
         *
         * This field is required when the trigger type is SCHEDULED.
         */
        public var schedule: kotlin.String? = null
        /**
         * Set to `true` to start `SCHEDULED` and `CONDITIONAL` triggers when created. True is not supported for `ON_DEMAND` triggers.
         */
        public var startOnCreation: kotlin.Boolean? = null
        /**
         * The tags to use with this trigger. You may use tags to limit access to the trigger. For more information about tags in Glue, see [Amazon Web Services Tags in Glue](https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) in the developer guide.
         */
        public var tags: Map? = null
        /**
         * The type of the new trigger.
         */
        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.CreateTriggerRequest) : this() {
            this.actions = x.actions
            this.description = x.description
            this.eventBatchingCondition = x.eventBatchingCondition
            this.name = x.name
            this.predicate = x.predicate
            this.schedule = x.schedule
            this.startOnCreation = x.startOnCreation
            this.tags = x.tags
            this.type = x.type
            this.workflowName = x.workflowName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.CreateTriggerRequest = CreateTriggerRequest(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