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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.KafkaSettingsDocumentDeserializer.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.KafkaSaslMechanism
import aws.sdk.kotlin.services.databasemigrationservice.model.KafkaSecurityProtocol
import aws.sdk.kotlin.services.databasemigrationservice.model.KafkaSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.KafkaSslEndpointIdentificationAlgorithm
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 deserializeKafkaSettingsDocument(deserializer: Deserializer): KafkaSettings {
    val builder = KafkaSettings.Builder()
    val BROKER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Broker"))
    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 MESSAGEMAXBYTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MessageMaxBytes"))
    val NOHEXPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("NoHexPrefix"))
    val PARTITIONINCLUDESCHEMATABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("PartitionIncludeSchemaTable"))
    val SASLMECHANISM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("SaslMechanism"))
    val SASLPASSWORD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SaslPassword"))
    val SASLUSERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SaslUsername"))
    val SECURITYPROTOCOL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("SecurityProtocol"))
    val SSLCACERTIFICATEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SslCaCertificateArn"))
    val SSLCLIENTCERTIFICATEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SslClientCertificateArn"))
    val SSLCLIENTKEYARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SslClientKeyArn"))
    val SSLCLIENTKEYPASSWORD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SslClientKeyPassword"))
    val SSLENDPOINTIDENTIFICATIONALGORITHM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("SslEndpointIdentificationAlgorithm"))
    val TOPIC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Topic"))
    val USELARGEINTEGERVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("UseLargeIntegerValue"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BROKER_DESCRIPTOR)
        field(INCLUDECONTROLDETAILS_DESCRIPTOR)
        field(INCLUDENULLANDEMPTY_DESCRIPTOR)
        field(INCLUDEPARTITIONVALUE_DESCRIPTOR)
        field(INCLUDETABLEALTEROPERATIONS_DESCRIPTOR)
        field(INCLUDETRANSACTIONDETAILS_DESCRIPTOR)
        field(MESSAGEFORMAT_DESCRIPTOR)
        field(MESSAGEMAXBYTES_DESCRIPTOR)
        field(NOHEXPREFIX_DESCRIPTOR)
        field(PARTITIONINCLUDESCHEMATABLE_DESCRIPTOR)
        field(SASLMECHANISM_DESCRIPTOR)
        field(SASLPASSWORD_DESCRIPTOR)
        field(SASLUSERNAME_DESCRIPTOR)
        field(SECURITYPROTOCOL_DESCRIPTOR)
        field(SSLCACERTIFICATEARN_DESCRIPTOR)
        field(SSLCLIENTCERTIFICATEARN_DESCRIPTOR)
        field(SSLCLIENTKEYARN_DESCRIPTOR)
        field(SSLCLIENTKEYPASSWORD_DESCRIPTOR)
        field(SSLENDPOINTIDENTIFICATIONALGORITHM_DESCRIPTOR)
        field(TOPIC_DESCRIPTOR)
        field(USELARGEINTEGERVALUE_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                BROKER_DESCRIPTOR.index -> builder.broker = deserializeString()
                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) }
                MESSAGEMAXBYTES_DESCRIPTOR.index -> builder.messageMaxBytes = deserializeInt()
                NOHEXPREFIX_DESCRIPTOR.index -> builder.noHexPrefix = deserializeBoolean()
                PARTITIONINCLUDESCHEMATABLE_DESCRIPTOR.index -> builder.partitionIncludeSchemaTable = deserializeBoolean()
                SASLMECHANISM_DESCRIPTOR.index -> builder.saslMechanism = deserializeString().let { KafkaSaslMechanism.fromValue(it) }
                SASLPASSWORD_DESCRIPTOR.index -> builder.saslPassword = deserializeString()
                SASLUSERNAME_DESCRIPTOR.index -> builder.saslUsername = deserializeString()
                SECURITYPROTOCOL_DESCRIPTOR.index -> builder.securityProtocol = deserializeString().let { KafkaSecurityProtocol.fromValue(it) }
                SSLCACERTIFICATEARN_DESCRIPTOR.index -> builder.sslCaCertificateArn = deserializeString()
                SSLCLIENTCERTIFICATEARN_DESCRIPTOR.index -> builder.sslClientCertificateArn = deserializeString()
                SSLCLIENTKEYARN_DESCRIPTOR.index -> builder.sslClientKeyArn = deserializeString()
                SSLCLIENTKEYPASSWORD_DESCRIPTOR.index -> builder.sslClientKeyPassword = deserializeString()
                SSLENDPOINTIDENTIFICATIONALGORITHM_DESCRIPTOR.index -> builder.sslEndpointIdentificationAlgorithm = deserializeString().let { KafkaSslEndpointIdentificationAlgorithm.fromValue(it) }
                TOPIC_DESCRIPTOR.index -> builder.topic = deserializeString()
                USELARGEINTEGERVALUE_DESCRIPTOR.index -> builder.useLargeIntegerValue = deserializeBoolean()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy