commonMain.aws.sdk.kotlin.services.firehose.model.DataFormatConversionConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of firehose-jvm Show documentation
Show all versions of firehose-jvm Show documentation
The AWS SDK for Kotlin client for Firehose
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.firehose.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies that you want Firehose to convert data from the JSON format to the Parquet or ORC format before writing it to Amazon S3. Firehose uses the serializer and deserializer that you specify, in addition to the column information from the Amazon Web Services Glue table, to deserialize your input data from JSON and then serialize it to the Parquet or ORC format. For more information, see [Firehose Record Format Conversion](https://docs.aws.amazon.com/firehose/latest/dev/record-format-conversion.html).
*/
public class DataFormatConversionConfiguration private constructor(builder: Builder) {
/**
* Defaults to `true`. Set it to `false` if you want to disable format conversion while preserving the configuration details.
*/
public val enabled: kotlin.Boolean? = builder.enabled
/**
* Specifies the deserializer that you want Firehose to use to convert the format of your data from JSON. This parameter is required if `Enabled` is set to true.
*/
public val inputFormatConfiguration: aws.sdk.kotlin.services.firehose.model.InputFormatConfiguration? = builder.inputFormatConfiguration
/**
* Specifies the serializer that you want Firehose to use to convert the format of your data to the Parquet or ORC format. This parameter is required if `Enabled` is set to true.
*/
public val outputFormatConfiguration: aws.sdk.kotlin.services.firehose.model.OutputFormatConfiguration? = builder.outputFormatConfiguration
/**
* Specifies the Amazon Web Services Glue Data Catalog table that contains the column information. This parameter is required if `Enabled` is set to true.
*/
public val schemaConfiguration: aws.sdk.kotlin.services.firehose.model.SchemaConfiguration? = builder.schemaConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.firehose.model.DataFormatConversionConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DataFormatConversionConfiguration(")
append("enabled=$enabled,")
append("inputFormatConfiguration=$inputFormatConfiguration,")
append("outputFormatConfiguration=$outputFormatConfiguration,")
append("schemaConfiguration=$schemaConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enabled?.hashCode() ?: 0
result = 31 * result + (inputFormatConfiguration?.hashCode() ?: 0)
result = 31 * result + (outputFormatConfiguration?.hashCode() ?: 0)
result = 31 * result + (schemaConfiguration?.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 DataFormatConversionConfiguration
if (enabled != other.enabled) return false
if (inputFormatConfiguration != other.inputFormatConfiguration) return false
if (outputFormatConfiguration != other.outputFormatConfiguration) return false
if (schemaConfiguration != other.schemaConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.firehose.model.DataFormatConversionConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Defaults to `true`. Set it to `false` if you want to disable format conversion while preserving the configuration details.
*/
public var enabled: kotlin.Boolean? = null
/**
* Specifies the deserializer that you want Firehose to use to convert the format of your data from JSON. This parameter is required if `Enabled` is set to true.
*/
public var inputFormatConfiguration: aws.sdk.kotlin.services.firehose.model.InputFormatConfiguration? = null
/**
* Specifies the serializer that you want Firehose to use to convert the format of your data to the Parquet or ORC format. This parameter is required if `Enabled` is set to true.
*/
public var outputFormatConfiguration: aws.sdk.kotlin.services.firehose.model.OutputFormatConfiguration? = null
/**
* Specifies the Amazon Web Services Glue Data Catalog table that contains the column information. This parameter is required if `Enabled` is set to true.
*/
public var schemaConfiguration: aws.sdk.kotlin.services.firehose.model.SchemaConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.firehose.model.DataFormatConversionConfiguration) : this() {
this.enabled = x.enabled
this.inputFormatConfiguration = x.inputFormatConfiguration
this.outputFormatConfiguration = x.outputFormatConfiguration
this.schemaConfiguration = x.schemaConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.firehose.model.DataFormatConversionConfiguration = DataFormatConversionConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.firehose.model.InputFormatConfiguration] inside the given [block]
*/
public fun inputFormatConfiguration(block: aws.sdk.kotlin.services.firehose.model.InputFormatConfiguration.Builder.() -> kotlin.Unit) {
this.inputFormatConfiguration = aws.sdk.kotlin.services.firehose.model.InputFormatConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.OutputFormatConfiguration] inside the given [block]
*/
public fun outputFormatConfiguration(block: aws.sdk.kotlin.services.firehose.model.OutputFormatConfiguration.Builder.() -> kotlin.Unit) {
this.outputFormatConfiguration = aws.sdk.kotlin.services.firehose.model.OutputFormatConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.SchemaConfiguration] inside the given [block]
*/
public fun schemaConfiguration(block: aws.sdk.kotlin.services.firehose.model.SchemaConfiguration.Builder.() -> kotlin.Unit) {
this.schemaConfiguration = aws.sdk.kotlin.services.firehose.model.SchemaConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}