commonMain.aws.sdk.kotlin.services.glue.model.TriggerUpdate.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
/**
* A structure used to provide information used to update a trigger. This object updates the previous trigger definition by overwriting it completely.
*/
public class TriggerUpdate 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 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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.TriggerUpdate = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TriggerUpdate(")
append("actions=$actions,")
append("description=$description,")
append("eventBatchingCondition=$eventBatchingCondition,")
append("name=$name,")
append("predicate=$predicate,")
append("schedule=$schedule")
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)
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 TriggerUpdate
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
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.TriggerUpdate = 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 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.TriggerUpdate) : 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
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.TriggerUpdate = TriggerUpdate(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
}
}
}