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

commonMain.aws.sdk.kotlin.services.databrew.serde.OutputDocumentSerializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.databrew.serde

import aws.sdk.kotlin.services.databrew.model.Output
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 serializeOutputDocument(serializer: Serializer, input: Output) {
    val COMPRESSIONFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("CompressionFormat"))
    val FORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Format"))
    val FORMATOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("FormatOptions"))
    val LOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Location"))
    val MAXOUTPUTFILES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxOutputFiles"))
    val OVERWRITE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Overwrite"))
    val PARTITIONCOLUMNS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("PartitionColumns"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(COMPRESSIONFORMAT_DESCRIPTOR)
        field(FORMAT_DESCRIPTOR)
        field(FORMATOPTIONS_DESCRIPTOR)
        field(LOCATION_DESCRIPTOR)
        field(MAXOUTPUTFILES_DESCRIPTOR)
        field(OVERWRITE_DESCRIPTOR)
        field(PARTITIONCOLUMNS_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.compressionFormat?.let { field(COMPRESSIONFORMAT_DESCRIPTOR, it.value) }
        input.format?.let { field(FORMAT_DESCRIPTOR, it.value) }
        if (input.partitionColumns != null) {
            listField(PARTITIONCOLUMNS_DESCRIPTOR) {
                for (el0 in input.partitionColumns) {
                    serializeString(el0)
                }
            }
        }
        input.location?.let { field(LOCATION_DESCRIPTOR, it, ::serializeS3LocationDocument) }
        if (input.overwrite != false) field(OVERWRITE_DESCRIPTOR, input.overwrite)
        input.formatOptions?.let { field(FORMATOPTIONS_DESCRIPTOR, it, ::serializeOutputFormatOptionsDocument) }
        input.maxOutputFiles?.let { field(MAXOUTPUTFILES_DESCRIPTOR, it) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy