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

commonMain.aws.sdk.kotlin.services.firehose.serde.ElasticsearchDestinationDescriptionDocumentDeserializer.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.ElasticsearchDestinationDescription
import aws.sdk.kotlin.services.firehose.model.ElasticsearchIndexRotationPeriod
import aws.sdk.kotlin.services.firehose.model.ElasticsearchS3BackupMode
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 deserializeElasticsearchDestinationDescriptionDocument(deserializer: Deserializer): ElasticsearchDestinationDescription {
    val builder = ElasticsearchDestinationDescription.Builder()
    val BUFFERINGHINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BufferingHints"))
    val CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchLoggingOptions"))
    val CLUSTERENDPOINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ClusterEndpoint"))
    val DOCUMENTIDOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DocumentIdOptions"))
    val DOMAINARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DomainARN"))
    val INDEXNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IndexName"))
    val INDEXROTATIONPERIOD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("IndexRotationPeriod"))
    val PROCESSINGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ProcessingConfiguration"))
    val RETRYOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RetryOptions"))
    val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleARN"))
    val S3BACKUPMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("S3BackupMode"))
    val S3DESTINATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3DestinationDescription"))
    val TYPENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TypeName"))
    val VPCCONFIGURATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("VpcConfigurationDescription"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BUFFERINGHINTS_DESCRIPTOR)
        field(CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR)
        field(CLUSTERENDPOINT_DESCRIPTOR)
        field(DOCUMENTIDOPTIONS_DESCRIPTOR)
        field(DOMAINARN_DESCRIPTOR)
        field(INDEXNAME_DESCRIPTOR)
        field(INDEXROTATIONPERIOD_DESCRIPTOR)
        field(PROCESSINGCONFIGURATION_DESCRIPTOR)
        field(RETRYOPTIONS_DESCRIPTOR)
        field(ROLEARN_DESCRIPTOR)
        field(S3BACKUPMODE_DESCRIPTOR)
        field(S3DESTINATIONDESCRIPTION_DESCRIPTOR)
        field(TYPENAME_DESCRIPTOR)
        field(VPCCONFIGURATIONDESCRIPTION_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                BUFFERINGHINTS_DESCRIPTOR.index -> builder.bufferingHints = deserializeElasticsearchBufferingHintsDocument(deserializer)
                CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR.index -> builder.cloudWatchLoggingOptions = deserializeCloudWatchLoggingOptionsDocument(deserializer)
                CLUSTERENDPOINT_DESCRIPTOR.index -> builder.clusterEndpoint = deserializeString()
                DOCUMENTIDOPTIONS_DESCRIPTOR.index -> builder.documentIdOptions = deserializeDocumentIdOptionsDocument(deserializer)
                DOMAINARN_DESCRIPTOR.index -> builder.domainArn = deserializeString()
                INDEXNAME_DESCRIPTOR.index -> builder.indexName = deserializeString()
                INDEXROTATIONPERIOD_DESCRIPTOR.index -> builder.indexRotationPeriod = deserializeString().let { ElasticsearchIndexRotationPeriod.fromValue(it) }
                PROCESSINGCONFIGURATION_DESCRIPTOR.index -> builder.processingConfiguration = deserializeProcessingConfigurationDocument(deserializer)
                RETRYOPTIONS_DESCRIPTOR.index -> builder.retryOptions = deserializeElasticsearchRetryOptionsDocument(deserializer)
                ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
                S3BACKUPMODE_DESCRIPTOR.index -> builder.s3BackupMode = deserializeString().let { ElasticsearchS3BackupMode.fromValue(it) }
                S3DESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.s3DestinationDescription = deserializeS3DestinationDescriptionDocument(deserializer)
                TYPENAME_DESCRIPTOR.index -> builder.typeName = deserializeString()
                VPCCONFIGURATIONDESCRIPTION_DESCRIPTOR.index -> builder.vpcConfigurationDescription = deserializeVpcConfigurationDescriptionDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy