commonMain.aws.sdk.kotlin.services.glue.serde.SnowflakeNodeDataDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.Option
import aws.sdk.kotlin.services.glue.model.SnowflakeNodeData
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
import kotlin.collections.mutableMapOf
internal fun deserializeSnowflakeNodeDataDocument(deserializer: Deserializer): SnowflakeNodeData {
val builder = SnowflakeNodeData.Builder()
val ACTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Action"))
val ADDITIONALOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("AdditionalOptions"))
val AUTOPUSHDOWN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("AutoPushdown"))
val CONNECTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Connection"))
val DATABASE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Database"))
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.String, 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.String, JsonSerialName("Table"))
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(ACTION_DESCRIPTOR)
field(ADDITIONALOPTIONS_DESCRIPTOR)
field(AUTOPUSHDOWN_DESCRIPTOR)
field(CONNECTION_DESCRIPTOR)
field(DATABASE_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(TABLESCHEMA_DESCRIPTOR)
field(TEMPDIR_DESCRIPTOR)
field(UPSERT_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ACTION_DESCRIPTOR.index -> builder.action = deserializeString()
ADDITIONALOPTIONS_DESCRIPTOR.index -> builder.additionalOptions =
deserializer.deserializeMap(ADDITIONALOPTIONS_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
AUTOPUSHDOWN_DESCRIPTOR.index -> builder.autoPushdown = deserializeBoolean()
CONNECTION_DESCRIPTOR.index -> builder.connection = deserializeOptionDocument(deserializer)
DATABASE_DESCRIPTOR.index -> builder.database = 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 = deserializeString()
SELECTEDCOLUMNS_DESCRIPTOR.index -> builder.selectedColumns =
deserializer.deserializeList(SELECTEDCOLUMNS_DESCRIPTOR) {
val col0 = mutableListOf