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

commonMain.aws.sdk.kotlin.services.glue.serde.TargetTableConfigDocumentSerializer.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.TargetTableConfig
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 serializeTargetTableConfigDocument(serializer: Serializer, input: TargetTableConfig) {
    val PARTITIONSPEC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("PartitionSpec"))
    val TARGETTABLENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TargetTableName"))
    val UNNESTSPEC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("UnnestSpec"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(PARTITIONSPEC_DESCRIPTOR)
        field(TARGETTABLENAME_DESCRIPTOR)
        field(UNNESTSPEC_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.unnestSpec?.let { field(UNNESTSPEC_DESCRIPTOR, it.value) }
        if (input.partitionSpec != null) {
            listField(PARTITIONSPEC_DESCRIPTOR) {
                for (el0 in input.partitionSpec) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeIntegrationPartitionDocument))
                }
            }
        }
        input.targetTableName?.let { field(TARGETTABLENAME_DESCRIPTOR, it) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy