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

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

There is a newer version: 1.3.76
Show 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.AmazonRedshiftNodeData
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 serializeAmazonRedshiftNodeDataDocument(serializer: Serializer, input: AmazonRedshiftNodeData) {
    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)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.accessType?.let { field(ACCESSTYPE_DESCRIPTOR, it) }
        input.sourceType?.let { field(SOURCETYPE_DESCRIPTOR, it) }
        input.connection?.let { field(CONNECTION_DESCRIPTOR, it, ::serializeOptionDocument) }
        input.schema?.let { field(SCHEMA_DESCRIPTOR, it, ::serializeOptionDocument) }
        input.table?.let { field(TABLE_DESCRIPTOR, it, ::serializeOptionDocument) }
        input.catalogDatabase?.let { field(CATALOGDATABASE_DESCRIPTOR, it, ::serializeOptionDocument) }
        input.catalogTable?.let { field(CATALOGTABLE_DESCRIPTOR, it, ::serializeOptionDocument) }
        input.catalogRedshiftSchema?.let { field(CATALOGREDSHIFTSCHEMA_DESCRIPTOR, it) }
        input.catalogRedshiftTable?.let { field(CATALOGREDSHIFTTABLE_DESCRIPTOR, it) }
        input.tempDir?.let { field(TEMPDIR_DESCRIPTOR, it) }
        input.iamRole?.let { field(IAMROLE_DESCRIPTOR, it, ::serializeOptionDocument) }
        if (input.advancedOptions != null) {
            listField(ADVANCEDOPTIONS_DESCRIPTOR) {
                for (el0 in input.advancedOptions) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeAmazonRedshiftAdvancedOptionDocument))
                }
            }
        }
        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) }
        input.tablePrefix?.let { field(TABLEPREFIX_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.crawlerConnection?.let { field(CRAWLERCONNECTION_DESCRIPTOR, it) }
        if (input.tableSchema != null) {
            listField(TABLESCHEMA_DESCRIPTOR) {
                for (el0 in input.tableSchema) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeOptionDocument))
                }
            }
        }
        input.stagingTable?.let { field(STAGINGTABLE_DESCRIPTOR, it) }
        if (input.selectedColumns != null) {
            listField(SELECTEDCOLUMNS_DESCRIPTOR) {
                for (el0 in input.selectedColumns) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeOptionDocument))
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy