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

commonMain.aws.sdk.kotlin.services.pipes.model.UpdatePipeSourceKinesisStreamParameters.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pipes.model



/**
 * The parameters for using a Kinesis stream as a source.
 */
public class UpdatePipeSourceKinesisStreamParameters private constructor(builder: Builder) {
    /**
     * The maximum number of records to include in each batch.
     */
    public val batchSize: kotlin.Int? = builder.batchSize
    /**
     * Define the target queue to send dead-letter queue events to.
     */
    public val deadLetterConfig: aws.sdk.kotlin.services.pipes.model.DeadLetterConfig? = builder.deadLetterConfig
    /**
     * The maximum length of a time to wait for events.
     */
    public val maximumBatchingWindowInSeconds: kotlin.Int? = builder.maximumBatchingWindowInSeconds
    /**
     * (Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, EventBridge never discards old records.
     */
    public val maximumRecordAgeInSeconds: kotlin.Int? = builder.maximumRecordAgeInSeconds
    /**
     * (Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, EventBridge retries failed records until the record expires in the event source.
     */
    public val maximumRetryAttempts: kotlin.Int? = builder.maximumRetryAttempts
    /**
     * (Streams only) Define how to handle item process failures. `AUTOMATIC_BISECT` halves each batch and retry each half until all the records are processed or there is one failed message left in the batch.
     */
    public val onPartialBatchItemFailure: aws.sdk.kotlin.services.pipes.model.OnPartialBatchItemFailureStreams? = builder.onPartialBatchItemFailure
    /**
     * (Streams only) The number of batches to process concurrently from each shard. The default value is 1.
     */
    public val parallelizationFactor: kotlin.Int? = builder.parallelizationFactor

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

    override fun toString(): kotlin.String = buildString {
        append("UpdatePipeSourceKinesisStreamParameters(")
        append("batchSize=$batchSize,")
        append("deadLetterConfig=$deadLetterConfig,")
        append("maximumBatchingWindowInSeconds=$maximumBatchingWindowInSeconds,")
        append("maximumRecordAgeInSeconds=$maximumRecordAgeInSeconds,")
        append("maximumRetryAttempts=$maximumRetryAttempts,")
        append("onPartialBatchItemFailure=$onPartialBatchItemFailure,")
        append("parallelizationFactor=$parallelizationFactor")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = batchSize ?: 0
        result = 31 * result + (deadLetterConfig?.hashCode() ?: 0)
        result = 31 * result + (maximumBatchingWindowInSeconds ?: 0)
        result = 31 * result + (maximumRecordAgeInSeconds ?: 0)
        result = 31 * result + (maximumRetryAttempts ?: 0)
        result = 31 * result + (onPartialBatchItemFailure?.hashCode() ?: 0)
        result = 31 * result + (parallelizationFactor ?: 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 UpdatePipeSourceKinesisStreamParameters

        if (batchSize != other.batchSize) return false
        if (deadLetterConfig != other.deadLetterConfig) return false
        if (maximumBatchingWindowInSeconds != other.maximumBatchingWindowInSeconds) return false
        if (maximumRecordAgeInSeconds != other.maximumRecordAgeInSeconds) return false
        if (maximumRetryAttempts != other.maximumRetryAttempts) return false
        if (onPartialBatchItemFailure != other.onPartialBatchItemFailure) return false
        if (parallelizationFactor != other.parallelizationFactor) return false

        return true
    }

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

    public class Builder {
        /**
         * The maximum number of records to include in each batch.
         */
        public var batchSize: kotlin.Int? = null
        /**
         * Define the target queue to send dead-letter queue events to.
         */
        public var deadLetterConfig: aws.sdk.kotlin.services.pipes.model.DeadLetterConfig? = null
        /**
         * The maximum length of a time to wait for events.
         */
        public var maximumBatchingWindowInSeconds: kotlin.Int? = null
        /**
         * (Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, EventBridge never discards old records.
         */
        public var maximumRecordAgeInSeconds: kotlin.Int? = null
        /**
         * (Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, EventBridge retries failed records until the record expires in the event source.
         */
        public var maximumRetryAttempts: kotlin.Int? = null
        /**
         * (Streams only) Define how to handle item process failures. `AUTOMATIC_BISECT` halves each batch and retry each half until all the records are processed or there is one failed message left in the batch.
         */
        public var onPartialBatchItemFailure: aws.sdk.kotlin.services.pipes.model.OnPartialBatchItemFailureStreams? = null
        /**
         * (Streams only) The number of batches to process concurrently from each shard. The default value is 1.
         */
        public var parallelizationFactor: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pipes.model.UpdatePipeSourceKinesisStreamParameters) : this() {
            this.batchSize = x.batchSize
            this.deadLetterConfig = x.deadLetterConfig
            this.maximumBatchingWindowInSeconds = x.maximumBatchingWindowInSeconds
            this.maximumRecordAgeInSeconds = x.maximumRecordAgeInSeconds
            this.maximumRetryAttempts = x.maximumRetryAttempts
            this.onPartialBatchItemFailure = x.onPartialBatchItemFailure
            this.parallelizationFactor = x.parallelizationFactor
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy