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

commonMain.aws.sdk.kotlin.services.athena.serde.QueryRuntimeStatisticsRowsDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.athena.serde

import aws.sdk.kotlin.services.athena.model.QueryRuntimeStatisticsRows
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 deserializeQueryRuntimeStatisticsRowsDocument(deserializer: Deserializer): QueryRuntimeStatisticsRows {
    val builder = QueryRuntimeStatisticsRows.Builder()
    val INPUTBYTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("InputBytes"))
    val INPUTROWS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("InputRows"))
    val OUTPUTBYTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("OutputBytes"))
    val OUTPUTROWS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("OutputRows"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(INPUTBYTES_DESCRIPTOR)
        field(INPUTROWS_DESCRIPTOR)
        field(OUTPUTBYTES_DESCRIPTOR)
        field(OUTPUTROWS_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                INPUTBYTES_DESCRIPTOR.index -> builder.inputBytes = deserializeLong()
                INPUTROWS_DESCRIPTOR.index -> builder.inputRows = deserializeLong()
                OUTPUTBYTES_DESCRIPTOR.index -> builder.outputBytes = deserializeLong()
                OUTPUTROWS_DESCRIPTOR.index -> builder.outputRows = deserializeLong()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy