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

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

/**
 * The batch condition that started the workflow run. Either the number of events in the batch size arrived, in which case the BatchSize member is non-zero, or the batch window expired, in which case the BatchWindow member is non-zero.
 */
public class StartingEventBatchCondition private constructor(builder: Builder) {
    /**
     * Number of events in the batch.
     */
    public val batchSize: kotlin.Int? = builder.batchSize
    /**
     * Duration of the batch window in seconds.
     */
    public val batchWindow: kotlin.Int? = builder.batchWindow

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

    override fun toString(): kotlin.String = buildString {
        append("StartingEventBatchCondition(")
        append("batchSize=$batchSize,")
        append("batchWindow=$batchWindow")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = batchSize ?: 0
        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 StartingEventBatchCondition

        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.StartingEventBatchCondition = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Number of events in the batch.
         */
        public var batchSize: kotlin.Int? = null
        /**
         * Duration of the batch window in seconds.
         */
        public var batchWindow: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.StartingEventBatchCondition) : this() {
            this.batchSize = x.batchSize
            this.batchWindow = x.batchWindow
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy