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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.KinesisSettingsDocumentDeserializer.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.KinesisSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.MessageFormatValue
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 deserializeKinesisSettingsDocument(deserializer: Deserializer): KinesisSettings {
    val builder = KinesisSettings.Builder()
    val INCLUDECONTROLDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IncludeControlDetails"))
    val INCLUDENULLANDEMPTY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IncludeNullAndEmpty"))
    val INCLUDEPARTITIONVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IncludePartitionValue"))
    val INCLUDETABLEALTEROPERATIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IncludeTableAlterOperations"))
    val INCLUDETRANSACTIONDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IncludeTransactionDetails"))
    val MESSAGEFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("MessageFormat"))
    val NOHEXPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("NoHexPrefix"))
    val PARTITIONINCLUDESCHEMATABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("PartitionIncludeSchemaTable"))
    val SERVICEACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServiceAccessRoleArn"))
    val STREAMARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StreamArn"))
    val USELARGEINTEGERVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("UseLargeIntegerValue"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(INCLUDECONTROLDETAILS_DESCRIPTOR)
        field(INCLUDENULLANDEMPTY_DESCRIPTOR)
        field(INCLUDEPARTITIONVALUE_DESCRIPTOR)
        field(INCLUDETABLEALTEROPERATIONS_DESCRIPTOR)
        field(INCLUDETRANSACTIONDETAILS_DESCRIPTOR)
        field(MESSAGEFORMAT_DESCRIPTOR)
        field(NOHEXPREFIX_DESCRIPTOR)
        field(PARTITIONINCLUDESCHEMATABLE_DESCRIPTOR)
        field(SERVICEACCESSROLEARN_DESCRIPTOR)
        field(STREAMARN_DESCRIPTOR)
        field(USELARGEINTEGERVALUE_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                INCLUDECONTROLDETAILS_DESCRIPTOR.index -> builder.includeControlDetails = deserializeBoolean()
                INCLUDENULLANDEMPTY_DESCRIPTOR.index -> builder.includeNullAndEmpty = deserializeBoolean()
                INCLUDEPARTITIONVALUE_DESCRIPTOR.index -> builder.includePartitionValue = deserializeBoolean()
                INCLUDETABLEALTEROPERATIONS_DESCRIPTOR.index -> builder.includeTableAlterOperations = deserializeBoolean()
                INCLUDETRANSACTIONDETAILS_DESCRIPTOR.index -> builder.includeTransactionDetails = deserializeBoolean()
                MESSAGEFORMAT_DESCRIPTOR.index -> builder.messageFormat = deserializeString().let { MessageFormatValue.fromValue(it) }
                NOHEXPREFIX_DESCRIPTOR.index -> builder.noHexPrefix = deserializeBoolean()
                PARTITIONINCLUDESCHEMATABLE_DESCRIPTOR.index -> builder.partitionIncludeSchemaTable = deserializeBoolean()
                SERVICEACCESSROLEARN_DESCRIPTOR.index -> builder.serviceAccessRoleArn = deserializeString()
                STREAMARN_DESCRIPTOR.index -> builder.streamArn = deserializeString()
                USELARGEINTEGERVALUE_DESCRIPTOR.index -> builder.useLargeIntegerValue = deserializeBoolean()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy