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

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

The 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.AmazonRedshiftAdvancedOption
import aws.sdk.kotlin.services.glue.model.AmazonRedshiftNodeData
import aws.sdk.kotlin.services.glue.model.Option
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
import kotlin.collections.mutableListOf

internal fun deserializeAmazonRedshiftNodeDataDocument(deserializer: Deserializer): AmazonRedshiftNodeData {
    val builder = AmazonRedshiftNodeData.Builder()
    val ACCESSTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AccessType"))
    val ACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Action"))
    val ADVANCEDOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("AdvancedOptions"))
    val CATALOGDATABASE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CatalogDatabase"))
    val CATALOGREDSHIFTSCHEMA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CatalogRedshiftSchema"))
    val CATALOGREDSHIFTTABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CatalogRedshiftTable"))
    val CATALOGTABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CatalogTable"))
    val CONNECTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Connection"))
    val CRAWLERCONNECTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CrawlerConnection"))
    val IAMROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("IamRole"))
    val MERGEACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MergeAction"))
    val MERGECLAUSE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MergeClause"))
    val MERGEWHENMATCHED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MergeWhenMatched"))
    val MERGEWHENNOTMATCHED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MergeWhenNotMatched"))
    val POSTACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PostAction"))
    val PREACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PreAction"))
    val SAMPLEQUERY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SampleQuery"))
    val SCHEMA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Schema"))
    val SELECTEDCOLUMNS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("SelectedColumns"))
    val SOURCETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SourceType"))
    val STAGINGTABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StagingTable"))
    val TABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Table"))
    val TABLEPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TablePrefix"))
    val TABLESCHEMA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("TableSchema"))
    val TEMPDIR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TempDir"))
    val UPSERT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Upsert"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ACCESSTYPE_DESCRIPTOR)
        field(ACTION_DESCRIPTOR)
        field(ADVANCEDOPTIONS_DESCRIPTOR)
        field(CATALOGDATABASE_DESCRIPTOR)
        field(CATALOGREDSHIFTSCHEMA_DESCRIPTOR)
        field(CATALOGREDSHIFTTABLE_DESCRIPTOR)
        field(CATALOGTABLE_DESCRIPTOR)
        field(CONNECTION_DESCRIPTOR)
        field(CRAWLERCONNECTION_DESCRIPTOR)
        field(IAMROLE_DESCRIPTOR)
        field(MERGEACTION_DESCRIPTOR)
        field(MERGECLAUSE_DESCRIPTOR)
        field(MERGEWHENMATCHED_DESCRIPTOR)
        field(MERGEWHENNOTMATCHED_DESCRIPTOR)
        field(POSTACTION_DESCRIPTOR)
        field(PREACTION_DESCRIPTOR)
        field(SAMPLEQUERY_DESCRIPTOR)
        field(SCHEMA_DESCRIPTOR)
        field(SELECTEDCOLUMNS_DESCRIPTOR)
        field(SOURCETYPE_DESCRIPTOR)
        field(STAGINGTABLE_DESCRIPTOR)
        field(TABLE_DESCRIPTOR)
        field(TABLEPREFIX_DESCRIPTOR)
        field(TABLESCHEMA_DESCRIPTOR)
        field(TEMPDIR_DESCRIPTOR)
        field(UPSERT_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ACCESSTYPE_DESCRIPTOR.index -> builder.accessType = deserializeString()
                ACTION_DESCRIPTOR.index -> builder.action = deserializeString()
                ADVANCEDOPTIONS_DESCRIPTOR.index -> builder.advancedOptions =
                    deserializer.deserializeList(ADVANCEDOPTIONS_DESCRIPTOR) {
                        val col0 = mutableListOf()
                        while (hasNextElement()) {
                            val el0 = if (nextHasValue()) { deserializeAmazonRedshiftAdvancedOptionDocument(deserializer) } else { deserializeNull(); continue }
                            col0.add(el0)
                        }
                        col0
                    }
                CATALOGDATABASE_DESCRIPTOR.index -> builder.catalogDatabase = deserializeOptionDocument(deserializer)
                CATALOGREDSHIFTSCHEMA_DESCRIPTOR.index -> builder.catalogRedshiftSchema = deserializeString()
                CATALOGREDSHIFTTABLE_DESCRIPTOR.index -> builder.catalogRedshiftTable = deserializeString()
                CATALOGTABLE_DESCRIPTOR.index -> builder.catalogTable = deserializeOptionDocument(deserializer)
                CONNECTION_DESCRIPTOR.index -> builder.connection = deserializeOptionDocument(deserializer)
                CRAWLERCONNECTION_DESCRIPTOR.index -> builder.crawlerConnection = deserializeString()
                IAMROLE_DESCRIPTOR.index -> builder.iamRole = deserializeOptionDocument(deserializer)
                MERGEACTION_DESCRIPTOR.index -> builder.mergeAction = deserializeString()
                MERGECLAUSE_DESCRIPTOR.index -> builder.mergeClause = deserializeString()
                MERGEWHENMATCHED_DESCRIPTOR.index -> builder.mergeWhenMatched = deserializeString()
                MERGEWHENNOTMATCHED_DESCRIPTOR.index -> builder.mergeWhenNotMatched = deserializeString()
                POSTACTION_DESCRIPTOR.index -> builder.postAction = deserializeString()
                PREACTION_DESCRIPTOR.index -> builder.preAction = deserializeString()
                SAMPLEQUERY_DESCRIPTOR.index -> builder.sampleQuery = deserializeString()
                SCHEMA_DESCRIPTOR.index -> builder.schema = deserializeOptionDocument(deserializer)
                SELECTEDCOLUMNS_DESCRIPTOR.index -> builder.selectedColumns =
                    deserializer.deserializeList(SELECTEDCOLUMNS_DESCRIPTOR) {
                        val col0 = mutableListOf




© 2015 - 2024 Weber Informatics LLC | Privacy Policy