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

commonMain.aws.sdk.kotlin.services.firehose.model.DynamicPartitioningConfiguration.kt Maven / Gradle / Ivy

There is a newer version: 1.3.78
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.firehose.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The configuration of the dynamic partitioning mechanism that creates smaller data sets from the streaming data by partitioning it based on partition keys. Currently, dynamic partitioning is only supported for Amazon S3 destinations.
 */
public class DynamicPartitioningConfiguration private constructor(builder: Builder) {
    /**
     * Specifies that the dynamic partitioning is enabled for this Firehose delivery stream.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * The retry behavior in case Firehose is unable to deliver data to an Amazon S3 prefix.
     */
    public val retryOptions: aws.sdk.kotlin.services.firehose.model.RetryOptions? = builder.retryOptions

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

    override fun toString(): kotlin.String = buildString {
        append("DynamicPartitioningConfiguration(")
        append("enabled=$enabled,")
        append("retryOptions=$retryOptions")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = enabled?.hashCode() ?: 0
        result = 31 * result + (retryOptions?.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 DynamicPartitioningConfiguration

        if (enabled != other.enabled) return false
        if (retryOptions != other.retryOptions) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies that the dynamic partitioning is enabled for this Firehose delivery stream.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * The retry behavior in case Firehose is unable to deliver data to an Amazon S3 prefix.
         */
        public var retryOptions: aws.sdk.kotlin.services.firehose.model.RetryOptions? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.firehose.model.DynamicPartitioningConfiguration) : this() {
            this.enabled = x.enabled
            this.retryOptions = x.retryOptions
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy