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

commonMain.aws.sdk.kotlin.services.firehose.serde.DestinationDescriptionDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.firehose.serde

import aws.sdk.kotlin.services.firehose.model.DestinationDescription
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 deserializeDestinationDescriptionDocument(deserializer: Deserializer): DestinationDescription {
    val builder = DestinationDescription.Builder()
    val AMAZONOPENSEARCHSERVERLESSDESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AmazonOpenSearchServerlessDestinationDescription"))
    val AMAZONOPENSEARCHSERVICEDESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AmazonopensearchserviceDestinationDescription"))
    val DESTINATIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DestinationId"))
    val ELASTICSEARCHDESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ElasticsearchDestinationDescription"))
    val EXTENDEDS3DESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ExtendedS3DestinationDescription"))
    val HTTPENDPOINTDESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("HttpEndpointDestinationDescription"))
    val ICEBERGDESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("IcebergDestinationDescription"))
    val REDSHIFTDESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RedshiftDestinationDescription"))
    val S3DESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3DestinationDescription"))
    val SNOWFLAKEDESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SnowflakeDestinationDescription"))
    val SPLUNKDESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SplunkDestinationDescription"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AMAZONOPENSEARCHSERVERLESSDESTINATIONDESCRIPTION_DESCRIPTOR)
        field(AMAZONOPENSEARCHSERVICEDESTINATIONDESCRIPTION_DESCRIPTOR)
        field(DESTINATIONID_DESCRIPTOR)
        field(ELASTICSEARCHDESTINATIONDESCRIPTION_DESCRIPTOR)
        field(EXTENDEDS3DESTINATIONDESCRIPTION_DESCRIPTOR)
        field(HTTPENDPOINTDESTINATIONDESCRIPTION_DESCRIPTOR)
        field(ICEBERGDESTINATIONDESCRIPTION_DESCRIPTOR)
        field(REDSHIFTDESTINATIONDESCRIPTION_DESCRIPTOR)
        field(S3DESTINATIONDESCRIPTION_DESCRIPTOR)
        field(SNOWFLAKEDESTINATIONDESCRIPTION_DESCRIPTOR)
        field(SPLUNKDESTINATIONDESCRIPTION_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                AMAZONOPENSEARCHSERVERLESSDESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.amazonOpenSearchServerlessDestinationDescription = deserializeAmazonOpenSearchServerlessDestinationDescriptionDocument(deserializer)
                AMAZONOPENSEARCHSERVICEDESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.amazonopensearchserviceDestinationDescription = deserializeAmazonopensearchserviceDestinationDescriptionDocument(deserializer)
                DESTINATIONID_DESCRIPTOR.index -> builder.destinationId = deserializeString()
                ELASTICSEARCHDESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.elasticsearchDestinationDescription = deserializeElasticsearchDestinationDescriptionDocument(deserializer)
                EXTENDEDS3DESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.extendedS3DestinationDescription = deserializeExtendedS3DestinationDescriptionDocument(deserializer)
                HTTPENDPOINTDESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.httpEndpointDestinationDescription = deserializeHttpEndpointDestinationDescriptionDocument(deserializer)
                ICEBERGDESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.icebergDestinationDescription = deserializeIcebergDestinationDescriptionDocument(deserializer)
                REDSHIFTDESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.redshiftDestinationDescription = deserializeRedshiftDestinationDescriptionDocument(deserializer)
                S3DESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.s3DestinationDescription = deserializeS3DestinationDescriptionDocument(deserializer)
                SNOWFLAKEDESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.snowflakeDestinationDescription = deserializeSnowflakeDestinationDescriptionDocument(deserializer)
                SPLUNKDESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.splunkDestinationDescription = deserializeSplunkDestinationDescriptionDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy