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

commonMain.aws.sdk.kotlin.services.databrew.transform.InputDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.databrew.transform

import aws.sdk.kotlin.services.databrew.model.Input
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 deserializeInputDocument(deserializer: Deserializer): Input {
    val builder = Input.Builder()
    val DATACATALOGINPUTDEFINITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DataCatalogInputDefinition"))
    val DATABASEINPUTDEFINITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DatabaseInputDefinition"))
    val METADATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Metadata"))
    val S3INPUTDEFINITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3InputDefinition"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(DATACATALOGINPUTDEFINITION_DESCRIPTOR)
        field(DATABASEINPUTDEFINITION_DESCRIPTOR)
        field(METADATA_DESCRIPTOR)
        field(S3INPUTDEFINITION_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                DATACATALOGINPUTDEFINITION_DESCRIPTOR.index -> builder.dataCatalogInputDefinition = deserializeDataCatalogInputDefinitionDocument(deserializer)
                DATABASEINPUTDEFINITION_DESCRIPTOR.index -> builder.databaseInputDefinition = deserializeDatabaseInputDefinitionDocument(deserializer)
                METADATA_DESCRIPTOR.index -> builder.metadata = deserializeMetadataDocument(deserializer)
                S3INPUTDEFINITION_DESCRIPTOR.index -> builder.s3InputDefinition = deserializeS3LocationDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy