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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.S3SettingsDocumentDeserializer.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.databasemigrationservice.serde

import aws.sdk.kotlin.services.databasemigrationservice.model.CannedAclForObjectsValue
import aws.sdk.kotlin.services.databasemigrationservice.model.CompressionTypeValue
import aws.sdk.kotlin.services.databasemigrationservice.model.DataFormatValue
import aws.sdk.kotlin.services.databasemigrationservice.model.DatePartitionDelimiterValue
import aws.sdk.kotlin.services.databasemigrationservice.model.DatePartitionSequenceValue
import aws.sdk.kotlin.services.databasemigrationservice.model.EncodingTypeValue
import aws.sdk.kotlin.services.databasemigrationservice.model.EncryptionModeValue
import aws.sdk.kotlin.services.databasemigrationservice.model.ParquetVersionValue
import aws.sdk.kotlin.services.databasemigrationservice.model.S3Settings
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

internal fun deserializeS3SettingsDocument(deserializer: Deserializer): S3Settings {
    val builder = S3Settings.Builder()
    val ADDCOLUMNNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("AddColumnName"))
    val ADDTRAILINGPADDINGCHARACTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("AddTrailingPaddingCharacter"))
    val BUCKETFOLDER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("BucketFolder"))
    val BUCKETNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("BucketName"))
    val CANNEDACLFOROBJECTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("CannedAclForObjects"))
    val CDCINSERTSANDUPDATES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("CdcInsertsAndUpdates"))
    val CDCINSERTSONLY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("CdcInsertsOnly"))
    val CDCMAXBATCHINTERVAL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("CdcMaxBatchInterval"))
    val CDCMINFILESIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("CdcMinFileSize"))
    val CDCPATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CdcPath"))
    val COMPRESSIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("CompressionType"))
    val CSVDELIMITER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CsvDelimiter"))
    val CSVNOSUPVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CsvNoSupValue"))
    val CSVNULLVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CsvNullValue"))
    val CSVROWDELIMITER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CsvRowDelimiter"))
    val DATAFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DataFormat"))
    val DATAPAGESIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("DataPageSize"))
    val DATEPARTITIONDELIMITER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DatePartitionDelimiter"))
    val DATEPARTITIONENABLED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("DatePartitionEnabled"))
    val DATEPARTITIONSEQUENCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DatePartitionSequence"))
    val DATEPARTITIONTIMEZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatePartitionTimezone"))
    val DICTPAGESIZELIMIT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("DictPageSizeLimit"))
    val ENABLESTATISTICS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("EnableStatistics"))
    val ENCODINGTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("EncodingType"))
    val ENCRYPTIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("EncryptionMode"))
    val EXPECTEDBUCKETOWNER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExpectedBucketOwner"))
    val EXTERNALTABLEDEFINITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExternalTableDefinition"))
    val GLUECATALOGGENERATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("GlueCatalogGeneration"))
    val IGNOREHEADERROWS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("IgnoreHeaderRows"))
    val INCLUDEOPFORFULLLOAD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IncludeOpForFullLoad"))
    val MAXFILESIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxFileSize"))
    val PARQUETTIMESTAMPINMILLISECOND_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("ParquetTimestampInMillisecond"))
    val PARQUETVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ParquetVersion"))
    val PRESERVETRANSACTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("PreserveTransactions"))
    val RFC4180_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Rfc4180"))
    val ROWGROUPLENGTH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("RowGroupLength"))
    val SERVERSIDEENCRYPTIONKMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServerSideEncryptionKmsKeyId"))
    val SERVICEACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServiceAccessRoleArn"))
    val TIMESTAMPCOLUMNNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TimestampColumnName"))
    val USECSVNOSUPVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("UseCsvNoSupValue"))
    val USETASKSTARTTIMEFORFULLLOADTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("UseTaskStartTimeForFullLoadTimestamp"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ADDCOLUMNNAME_DESCRIPTOR)
        field(ADDTRAILINGPADDINGCHARACTER_DESCRIPTOR)
        field(BUCKETFOLDER_DESCRIPTOR)
        field(BUCKETNAME_DESCRIPTOR)
        field(CANNEDACLFOROBJECTS_DESCRIPTOR)
        field(CDCINSERTSANDUPDATES_DESCRIPTOR)
        field(CDCINSERTSONLY_DESCRIPTOR)
        field(CDCMAXBATCHINTERVAL_DESCRIPTOR)
        field(CDCMINFILESIZE_DESCRIPTOR)
        field(CDCPATH_DESCRIPTOR)
        field(COMPRESSIONTYPE_DESCRIPTOR)
        field(CSVDELIMITER_DESCRIPTOR)
        field(CSVNOSUPVALUE_DESCRIPTOR)
        field(CSVNULLVALUE_DESCRIPTOR)
        field(CSVROWDELIMITER_DESCRIPTOR)
        field(DATAFORMAT_DESCRIPTOR)
        field(DATAPAGESIZE_DESCRIPTOR)
        field(DATEPARTITIONDELIMITER_DESCRIPTOR)
        field(DATEPARTITIONENABLED_DESCRIPTOR)
        field(DATEPARTITIONSEQUENCE_DESCRIPTOR)
        field(DATEPARTITIONTIMEZONE_DESCRIPTOR)
        field(DICTPAGESIZELIMIT_DESCRIPTOR)
        field(ENABLESTATISTICS_DESCRIPTOR)
        field(ENCODINGTYPE_DESCRIPTOR)
        field(ENCRYPTIONMODE_DESCRIPTOR)
        field(EXPECTEDBUCKETOWNER_DESCRIPTOR)
        field(EXTERNALTABLEDEFINITION_DESCRIPTOR)
        field(GLUECATALOGGENERATION_DESCRIPTOR)
        field(IGNOREHEADERROWS_DESCRIPTOR)
        field(INCLUDEOPFORFULLLOAD_DESCRIPTOR)
        field(MAXFILESIZE_DESCRIPTOR)
        field(PARQUETTIMESTAMPINMILLISECOND_DESCRIPTOR)
        field(PARQUETVERSION_DESCRIPTOR)
        field(PRESERVETRANSACTIONS_DESCRIPTOR)
        field(RFC4180_DESCRIPTOR)
        field(ROWGROUPLENGTH_DESCRIPTOR)
        field(SERVERSIDEENCRYPTIONKMSKEYID_DESCRIPTOR)
        field(SERVICEACCESSROLEARN_DESCRIPTOR)
        field(TIMESTAMPCOLUMNNAME_DESCRIPTOR)
        field(USECSVNOSUPVALUE_DESCRIPTOR)
        field(USETASKSTARTTIMEFORFULLLOADTIMESTAMP_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ADDCOLUMNNAME_DESCRIPTOR.index -> builder.addColumnName = deserializeBoolean()
                ADDTRAILINGPADDINGCHARACTER_DESCRIPTOR.index -> builder.addTrailingPaddingCharacter = deserializeBoolean()
                BUCKETFOLDER_DESCRIPTOR.index -> builder.bucketFolder = deserializeString()
                BUCKETNAME_DESCRIPTOR.index -> builder.bucketName = deserializeString()
                CANNEDACLFOROBJECTS_DESCRIPTOR.index -> builder.cannedAclForObjects = deserializeString().let { CannedAclForObjectsValue.fromValue(it) }
                CDCINSERTSANDUPDATES_DESCRIPTOR.index -> builder.cdcInsertsAndUpdates = deserializeBoolean()
                CDCINSERTSONLY_DESCRIPTOR.index -> builder.cdcInsertsOnly = deserializeBoolean()
                CDCMAXBATCHINTERVAL_DESCRIPTOR.index -> builder.cdcMaxBatchInterval = deserializeInt()
                CDCMINFILESIZE_DESCRIPTOR.index -> builder.cdcMinFileSize = deserializeInt()
                CDCPATH_DESCRIPTOR.index -> builder.cdcPath = deserializeString()
                COMPRESSIONTYPE_DESCRIPTOR.index -> builder.compressionType = deserializeString().let { CompressionTypeValue.fromValue(it) }
                CSVDELIMITER_DESCRIPTOR.index -> builder.csvDelimiter = deserializeString()
                CSVNOSUPVALUE_DESCRIPTOR.index -> builder.csvNoSupValue = deserializeString()
                CSVNULLVALUE_DESCRIPTOR.index -> builder.csvNullValue = deserializeString()
                CSVROWDELIMITER_DESCRIPTOR.index -> builder.csvRowDelimiter = deserializeString()
                DATAFORMAT_DESCRIPTOR.index -> builder.dataFormat = deserializeString().let { DataFormatValue.fromValue(it) }
                DATAPAGESIZE_DESCRIPTOR.index -> builder.dataPageSize = deserializeInt()
                DATEPARTITIONDELIMITER_DESCRIPTOR.index -> builder.datePartitionDelimiter = deserializeString().let { DatePartitionDelimiterValue.fromValue(it) }
                DATEPARTITIONENABLED_DESCRIPTOR.index -> builder.datePartitionEnabled = deserializeBoolean()
                DATEPARTITIONSEQUENCE_DESCRIPTOR.index -> builder.datePartitionSequence = deserializeString().let { DatePartitionSequenceValue.fromValue(it) }
                DATEPARTITIONTIMEZONE_DESCRIPTOR.index -> builder.datePartitionTimezone = deserializeString()
                DICTPAGESIZELIMIT_DESCRIPTOR.index -> builder.dictPageSizeLimit = deserializeInt()
                ENABLESTATISTICS_DESCRIPTOR.index -> builder.enableStatistics = deserializeBoolean()
                ENCODINGTYPE_DESCRIPTOR.index -> builder.encodingType = deserializeString().let { EncodingTypeValue.fromValue(it) }
                ENCRYPTIONMODE_DESCRIPTOR.index -> builder.encryptionMode = deserializeString().let { EncryptionModeValue.fromValue(it) }
                EXPECTEDBUCKETOWNER_DESCRIPTOR.index -> builder.expectedBucketOwner = deserializeString()
                EXTERNALTABLEDEFINITION_DESCRIPTOR.index -> builder.externalTableDefinition = deserializeString()
                GLUECATALOGGENERATION_DESCRIPTOR.index -> builder.glueCatalogGeneration = deserializeBoolean()
                IGNOREHEADERROWS_DESCRIPTOR.index -> builder.ignoreHeaderRows = deserializeInt()
                INCLUDEOPFORFULLLOAD_DESCRIPTOR.index -> builder.includeOpForFullLoad = deserializeBoolean()
                MAXFILESIZE_DESCRIPTOR.index -> builder.maxFileSize = deserializeInt()
                PARQUETTIMESTAMPINMILLISECOND_DESCRIPTOR.index -> builder.parquetTimestampInMillisecond = deserializeBoolean()
                PARQUETVERSION_DESCRIPTOR.index -> builder.parquetVersion = deserializeString().let { ParquetVersionValue.fromValue(it) }
                PRESERVETRANSACTIONS_DESCRIPTOR.index -> builder.preserveTransactions = deserializeBoolean()
                RFC4180_DESCRIPTOR.index -> builder.rfc4180 = deserializeBoolean()
                ROWGROUPLENGTH_DESCRIPTOR.index -> builder.rowGroupLength = deserializeInt()
                SERVERSIDEENCRYPTIONKMSKEYID_DESCRIPTOR.index -> builder.serverSideEncryptionKmsKeyId = deserializeString()
                SERVICEACCESSROLEARN_DESCRIPTOR.index -> builder.serviceAccessRoleArn = deserializeString()
                TIMESTAMPCOLUMNNAME_DESCRIPTOR.index -> builder.timestampColumnName = deserializeString()
                USECSVNOSUPVALUE_DESCRIPTOR.index -> builder.useCsvNoSupValue = deserializeBoolean()
                USETASKSTARTTIMEFORFULLLOADTIMESTAMP_DESCRIPTOR.index -> builder.useTaskStartTimeForFullLoadTimestamp = deserializeBoolean()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy