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

commonMain.aws.sdk.kotlin.services.firehose.serde.HttpEndpointDestinationDescriptionDocumentDeserializer.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.HttpEndpointDestinationDescription
import aws.sdk.kotlin.services.firehose.model.HttpEndpointS3BackupMode
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 deserializeHttpEndpointDestinationDescriptionDocument(deserializer: Deserializer): HttpEndpointDestinationDescription {
    val builder = HttpEndpointDestinationDescription.Builder()
    val BUFFERINGHINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BufferingHints"))
    val CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchLoggingOptions"))
    val ENDPOINTCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("EndpointConfiguration"))
    val PROCESSINGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ProcessingConfiguration"))
    val REQUESTCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RequestConfiguration"))
    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 SECRETSMANAGERCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SecretsManagerConfiguration"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BUFFERINGHINTS_DESCRIPTOR)
        field(CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR)
        field(ENDPOINTCONFIGURATION_DESCRIPTOR)
        field(PROCESSINGCONFIGURATION_DESCRIPTOR)
        field(REQUESTCONFIGURATION_DESCRIPTOR)
        field(RETRYOPTIONS_DESCRIPTOR)
        field(ROLEARN_DESCRIPTOR)
        field(S3BACKUPMODE_DESCRIPTOR)
        field(S3DESTINATIONDESCRIPTION_DESCRIPTOR)
        field(SECRETSMANAGERCONFIGURATION_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                BUFFERINGHINTS_DESCRIPTOR.index -> builder.bufferingHints = deserializeHttpEndpointBufferingHintsDocument(deserializer)
                CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR.index -> builder.cloudWatchLoggingOptions = deserializeCloudWatchLoggingOptionsDocument(deserializer)
                ENDPOINTCONFIGURATION_DESCRIPTOR.index -> builder.endpointConfiguration = deserializeHttpEndpointDescriptionDocument(deserializer)
                PROCESSINGCONFIGURATION_DESCRIPTOR.index -> builder.processingConfiguration = deserializeProcessingConfigurationDocument(deserializer)
                REQUESTCONFIGURATION_DESCRIPTOR.index -> builder.requestConfiguration = deserializeHttpEndpointRequestConfigurationDocument(deserializer)
                RETRYOPTIONS_DESCRIPTOR.index -> builder.retryOptions = deserializeHttpEndpointRetryOptionsDocument(deserializer)
                ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
                S3BACKUPMODE_DESCRIPTOR.index -> builder.s3BackupMode = deserializeString().let { HttpEndpointS3BackupMode.fromValue(it) }
                S3DESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.s3DestinationDescription = deserializeS3DestinationDescriptionDocument(deserializer)
                SECRETSMANAGERCONFIGURATION_DESCRIPTOR.index -> builder.secretsManagerConfiguration = deserializeSecretsManagerConfigurationDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy