commonMain.aws.sdk.kotlin.services.firehose.serde.ExtendedS3DestinationDescriptionDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of firehose-jvm Show documentation
Show all versions of firehose-jvm Show documentation
The AWS SDK for Kotlin client for Firehose
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.firehose.serde
import aws.sdk.kotlin.services.firehose.model.CompressionFormat
import aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationDescription
import aws.sdk.kotlin.services.firehose.model.S3BackupMode
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 deserializeExtendedS3DestinationDescriptionDocument(deserializer: Deserializer): ExtendedS3DestinationDescription {
val builder = ExtendedS3DestinationDescription.Builder()
val BUCKETARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("BucketARN"))
val BUFFERINGHINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BufferingHints"))
val CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchLoggingOptions"))
val COMPRESSIONFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("CompressionFormat"))
val CUSTOMTIMEZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CustomTimeZone"))
val DATAFORMATCONVERSIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DataFormatConversionConfiguration"))
val DYNAMICPARTITIONINGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DynamicPartitioningConfiguration"))
val ENCRYPTIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("EncryptionConfiguration"))
val ERROROUTPUTPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ErrorOutputPrefix"))
val FILEEXTENSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FileExtension"))
val PREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Prefix"))
val PROCESSINGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ProcessingConfiguration"))
val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleARN"))
val S3BACKUPDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3BackupDescription"))
val S3BACKUPMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("S3BackupMode"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(BUCKETARN_DESCRIPTOR)
field(BUFFERINGHINTS_DESCRIPTOR)
field(CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR)
field(COMPRESSIONFORMAT_DESCRIPTOR)
field(CUSTOMTIMEZONE_DESCRIPTOR)
field(DATAFORMATCONVERSIONCONFIGURATION_DESCRIPTOR)
field(DYNAMICPARTITIONINGCONFIGURATION_DESCRIPTOR)
field(ENCRYPTIONCONFIGURATION_DESCRIPTOR)
field(ERROROUTPUTPREFIX_DESCRIPTOR)
field(FILEEXTENSION_DESCRIPTOR)
field(PREFIX_DESCRIPTOR)
field(PROCESSINGCONFIGURATION_DESCRIPTOR)
field(ROLEARN_DESCRIPTOR)
field(S3BACKUPDESCRIPTION_DESCRIPTOR)
field(S3BACKUPMODE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
BUCKETARN_DESCRIPTOR.index -> builder.bucketArn = deserializeString()
BUFFERINGHINTS_DESCRIPTOR.index -> builder.bufferingHints = deserializeBufferingHintsDocument(deserializer)
CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR.index -> builder.cloudWatchLoggingOptions = deserializeCloudWatchLoggingOptionsDocument(deserializer)
COMPRESSIONFORMAT_DESCRIPTOR.index -> builder.compressionFormat = deserializeString().let { CompressionFormat.fromValue(it) }
CUSTOMTIMEZONE_DESCRIPTOR.index -> builder.customTimeZone = deserializeString()
DATAFORMATCONVERSIONCONFIGURATION_DESCRIPTOR.index -> builder.dataFormatConversionConfiguration = deserializeDataFormatConversionConfigurationDocument(deserializer)
DYNAMICPARTITIONINGCONFIGURATION_DESCRIPTOR.index -> builder.dynamicPartitioningConfiguration = deserializeDynamicPartitioningConfigurationDocument(deserializer)
ENCRYPTIONCONFIGURATION_DESCRIPTOR.index -> builder.encryptionConfiguration = deserializeEncryptionConfigurationDocument(deserializer)
ERROROUTPUTPREFIX_DESCRIPTOR.index -> builder.errorOutputPrefix = deserializeString()
FILEEXTENSION_DESCRIPTOR.index -> builder.fileExtension = deserializeString()
PREFIX_DESCRIPTOR.index -> builder.prefix = deserializeString()
PROCESSINGCONFIGURATION_DESCRIPTOR.index -> builder.processingConfiguration = deserializeProcessingConfigurationDocument(deserializer)
ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
S3BACKUPDESCRIPTION_DESCRIPTOR.index -> builder.s3BackupDescription = deserializeS3DestinationDescriptionDocument(deserializer)
S3BACKUPMODE_DESCRIPTOR.index -> builder.s3BackupMode = deserializeString().let { S3BackupMode.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}