commonMain.aws.sdk.kotlin.services.glue.model.EventBatchingCondition.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.
*/
public class EventBatchingCondition private constructor(builder: Builder) {
/**
* Number of events that must be received from Amazon EventBridge before EventBridge event trigger fires.
*/
public val batchSize: kotlin.Int = requireNotNull(builder.batchSize) { "A non-null value must be provided for batchSize" }
/**
* Window of time in seconds after which EventBridge event trigger fires. Window starts when first event is received.
*/
public val batchWindow: kotlin.Int? = builder.batchWindow
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.EventBatchingCondition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EventBatchingCondition(")
append("batchSize=$batchSize,")
append("batchWindow=$batchWindow")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = batchSize
result = 31 * result + (batchWindow ?: 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 EventBatchingCondition
if (batchSize != other.batchSize) return false
if (batchWindow != other.batchWindow) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.EventBatchingCondition = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Number of events that must be received from Amazon EventBridge before EventBridge event trigger fires.
*/
public var batchSize: kotlin.Int? = null
/**
* Window of time in seconds after which EventBridge event trigger fires. Window starts when first event is received.
*/
public var batchWindow: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.EventBatchingCondition) : this() {
this.batchSize = x.batchSize
this.batchWindow = x.batchWindow
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.EventBatchingCondition = EventBatchingCondition(this)
internal fun correctErrors(): Builder {
if (batchSize == null) batchSize = 0
return this
}
}
}