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

commonMain.aws.sdk.kotlin.services.firehose.model.OutputFormatConfiguration.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

/**
 * Specifies the serializer that you want Firehose to use to convert the format of your data before it writes it to Amazon S3. This parameter is required if `Enabled` is set to true.
 */
public class OutputFormatConfiguration private constructor(builder: Builder) {
    /**
     * Specifies which serializer to use. You can choose either the ORC SerDe or the Parquet SerDe. If both are non-null, the server rejects the request.
     */
    public val serializer: aws.sdk.kotlin.services.firehose.model.Serializer? = builder.serializer

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

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

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

        if (serializer != other.serializer) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies which serializer to use. You can choose either the ORC SerDe or the Parquet SerDe. If both are non-null, the server rejects the request.
         */
        public var serializer: aws.sdk.kotlin.services.firehose.model.Serializer? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.firehose.model.OutputFormatConfiguration) : this() {
            this.serializer = x.serializer
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy