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

commonMain.aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreWriteProperties.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.timestreamwrite.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The set of properties on a table for configuring magnetic store writes.
 */
public class MagneticStoreWriteProperties private constructor(builder: Builder) {
    /**
     * A flag to enable magnetic store writes.
     */
    public val enableMagneticStoreWrites: kotlin.Boolean = requireNotNull(builder.enableMagneticStoreWrites) { "A non-null value must be provided for enableMagneticStoreWrites" }
    /**
     * The location to write error reports for records rejected asynchronously during magnetic store writes.
     */
    public val magneticStoreRejectedDataLocation: aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreRejectedDataLocation? = builder.magneticStoreRejectedDataLocation

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

    override fun toString(): kotlin.String = buildString {
        append("MagneticStoreWriteProperties(")
        append("enableMagneticStoreWrites=$enableMagneticStoreWrites,")
        append("magneticStoreRejectedDataLocation=$magneticStoreRejectedDataLocation")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = enableMagneticStoreWrites.hashCode()
        result = 31 * result + (magneticStoreRejectedDataLocation?.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 MagneticStoreWriteProperties

        if (enableMagneticStoreWrites != other.enableMagneticStoreWrites) return false
        if (magneticStoreRejectedDataLocation != other.magneticStoreRejectedDataLocation) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A flag to enable magnetic store writes.
         */
        public var enableMagneticStoreWrites: kotlin.Boolean? = null
        /**
         * The location to write error reports for records rejected asynchronously during magnetic store writes.
         */
        public var magneticStoreRejectedDataLocation: aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreRejectedDataLocation? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.timestreamwrite.model.MagneticStoreWriteProperties) : this() {
            this.enableMagneticStoreWrites = x.enableMagneticStoreWrites
            this.magneticStoreRejectedDataLocation = x.magneticStoreRejectedDataLocation
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy