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

commonMain.aws.sdk.kotlin.services.glue.serde.ColumnStatisticsDataDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glue.serde

import aws.sdk.kotlin.services.glue.model.ColumnStatisticsData
import aws.sdk.kotlin.services.glue.model.ColumnStatisticsType
import aws.smithy.kotlin.runtime.serde.Deserializer
import aws.smithy.kotlin.runtime.serde.SdkFieldDescriptor
import aws.smithy.kotlin.runtime.serde.SdkObjectDescriptor
import aws.smithy.kotlin.runtime.serde.SerialKind
import aws.smithy.kotlin.runtime.serde.asSdkSerializable
import aws.smithy.kotlin.runtime.serde.deserializeList
import aws.smithy.kotlin.runtime.serde.deserializeMap
import aws.smithy.kotlin.runtime.serde.deserializeStruct
import aws.smithy.kotlin.runtime.serde.field
import aws.smithy.kotlin.runtime.serde.json.JsonDeserializer
import aws.smithy.kotlin.runtime.serde.json.JsonSerialName
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct

internal fun deserializeColumnStatisticsDataDocument(deserializer: Deserializer): ColumnStatisticsData {
    val builder = ColumnStatisticsData.Builder()
    val BINARYCOLUMNSTATISTICSDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BinaryColumnStatisticsData"))
    val BOOLEANCOLUMNSTATISTICSDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BooleanColumnStatisticsData"))
    val DATECOLUMNSTATISTICSDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DateColumnStatisticsData"))
    val DECIMALCOLUMNSTATISTICSDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DecimalColumnStatisticsData"))
    val DOUBLECOLUMNSTATISTICSDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DoubleColumnStatisticsData"))
    val LONGCOLUMNSTATISTICSDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LongColumnStatisticsData"))
    val STRINGCOLUMNSTATISTICSDATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("StringColumnStatisticsData"))
    val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Type"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BINARYCOLUMNSTATISTICSDATA_DESCRIPTOR)
        field(BOOLEANCOLUMNSTATISTICSDATA_DESCRIPTOR)
        field(DATECOLUMNSTATISTICSDATA_DESCRIPTOR)
        field(DECIMALCOLUMNSTATISTICSDATA_DESCRIPTOR)
        field(DOUBLECOLUMNSTATISTICSDATA_DESCRIPTOR)
        field(LONGCOLUMNSTATISTICSDATA_DESCRIPTOR)
        field(STRINGCOLUMNSTATISTICSDATA_DESCRIPTOR)
        field(TYPE_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                BINARYCOLUMNSTATISTICSDATA_DESCRIPTOR.index -> builder.binaryColumnStatisticsData = deserializeBinaryColumnStatisticsDataDocument(deserializer)
                BOOLEANCOLUMNSTATISTICSDATA_DESCRIPTOR.index -> builder.booleanColumnStatisticsData = deserializeBooleanColumnStatisticsDataDocument(deserializer)
                DATECOLUMNSTATISTICSDATA_DESCRIPTOR.index -> builder.dateColumnStatisticsData = deserializeDateColumnStatisticsDataDocument(deserializer)
                DECIMALCOLUMNSTATISTICSDATA_DESCRIPTOR.index -> builder.decimalColumnStatisticsData = deserializeDecimalColumnStatisticsDataDocument(deserializer)
                DOUBLECOLUMNSTATISTICSDATA_DESCRIPTOR.index -> builder.doubleColumnStatisticsData = deserializeDoubleColumnStatisticsDataDocument(deserializer)
                LONGCOLUMNSTATISTICSDATA_DESCRIPTOR.index -> builder.longColumnStatisticsData = deserializeLongColumnStatisticsDataDocument(deserializer)
                STRINGCOLUMNSTATISTICSDATA_DESCRIPTOR.index -> builder.stringColumnStatisticsData = deserializeStringColumnStatisticsDataDocument(deserializer)
                TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { ColumnStatisticsType.fromValue(it) }
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy