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

commonMain.aws.sdk.kotlin.services.osis.model.BufferOptions.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.osis.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Options that specify the configuration of a persistent buffer. To configure how OpenSearch Ingestion encrypts this data, set the EncryptionAtRestOptions.
 */
public class BufferOptions private constructor(builder: Builder) {
    /**
     * Whether persistent buffering should be enabled.
     */
    public val persistentBufferEnabled: kotlin.Boolean = requireNotNull(builder.persistentBufferEnabled) { "A non-null value must be provided for persistentBufferEnabled" }

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

    override fun toString(): kotlin.String = buildString {
        append("BufferOptions(")
        append("persistentBufferEnabled=$persistentBufferEnabled")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = persistentBufferEnabled.hashCode()
        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 BufferOptions

        if (persistentBufferEnabled != other.persistentBufferEnabled) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Whether persistent buffering should be enabled.
         */
        public var persistentBufferEnabled: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.osis.model.BufferOptions) : this() {
            this.persistentBufferEnabled = x.persistentBufferEnabled
        }

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

        internal fun correctErrors(): Builder {
            if (persistentBufferEnabled == null) persistentBufferEnabled = false
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy