All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
commonMain.aws.sdk.kotlin.services.glue.serde.SnowflakeNodeDataDocumentSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.SnowflakeNodeData
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.Serializer
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 serializeSnowflakeNodeDataDocument(serializer: Serializer, input: SnowflakeNodeData) {
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)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.sourceType?.let { field(SOURCETYPE_DESCRIPTOR, it) }
input.connection?.let { field(CONNECTION_DESCRIPTOR, it, ::serializeOptionDocument) }
input.schema?.let { field(SCHEMA_DESCRIPTOR, it) }
input.table?.let { field(TABLE_DESCRIPTOR, it) }
input.database?.let { field(DATABASE_DESCRIPTOR, it) }
input.tempDir?.let { field(TEMPDIR_DESCRIPTOR, it) }
input.iamRole?.let { field(IAMROLE_DESCRIPTOR, it, ::serializeOptionDocument) }
if (input.additionalOptions != null) {
mapField(ADDITIONALOPTIONS_DESCRIPTOR) {
input.additionalOptions.forEach { (key, value) ->
entry(key, value)
}
}
}
input.sampleQuery?.let { field(SAMPLEQUERY_DESCRIPTOR, it) }
input.preAction?.let { field(PREACTION_DESCRIPTOR, it) }
input.postAction?.let { field(POSTACTION_DESCRIPTOR, it) }
input.action?.let { field(ACTION_DESCRIPTOR, it) }
if (input.upsert != false) field(UPSERT_DESCRIPTOR, input.upsert)
input.mergeAction?.let { field(MERGEACTION_DESCRIPTOR, it) }
input.mergeWhenMatched?.let { field(MERGEWHENMATCHED_DESCRIPTOR, it) }
input.mergeWhenNotMatched?.let { field(MERGEWHENNOTMATCHED_DESCRIPTOR, it) }
input.mergeClause?.let { field(MERGECLAUSE_DESCRIPTOR, it) }
input.stagingTable?.let { field(STAGINGTABLE_DESCRIPTOR, it) }
if (input.selectedColumns != null) {
listField(SELECTEDCOLUMNS_DESCRIPTOR) {
for (el0 in input.selectedColumns) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeOptionDocument))
}
}
}
if (input.autoPushdown != false) field(AUTOPUSHDOWN_DESCRIPTOR, input.autoPushdown)
if (input.tableSchema != null) {
listField(TABLESCHEMA_DESCRIPTOR) {
for (el0 in input.tableSchema) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeOptionDocument))
}
}
}
}
}