commonMain.aws.sdk.kotlin.services.firehose.serde.IcebergDestinationDescriptionDocumentDeserializer.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.DestinationTableConfiguration
import aws.sdk.kotlin.services.firehose.model.IcebergDestinationDescription
import aws.sdk.kotlin.services.firehose.model.IcebergS3BackupMode
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
import kotlin.collections.mutableListOf
internal fun deserializeIcebergDestinationDescriptionDocument(deserializer: Deserializer): IcebergDestinationDescription {
val builder = IcebergDestinationDescription.Builder()
val BUFFERINGHINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BufferingHints"))
val CATALOGCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CatalogConfiguration"))
val CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchLoggingOptions"))
val DESTINATIONTABLECONFIGURATIONLIST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("DestinationTableConfigurationList"))
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 SCHEMAEVOLUTIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SchemaEvolutionConfiguration"))
val TABLECREATIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("TableCreationConfiguration"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(BUFFERINGHINTS_DESCRIPTOR)
field(CATALOGCONFIGURATION_DESCRIPTOR)
field(CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR)
field(DESTINATIONTABLECONFIGURATIONLIST_DESCRIPTOR)
field(PROCESSINGCONFIGURATION_DESCRIPTOR)
field(RETRYOPTIONS_DESCRIPTOR)
field(ROLEARN_DESCRIPTOR)
field(S3BACKUPMODE_DESCRIPTOR)
field(S3DESTINATIONDESCRIPTION_DESCRIPTOR)
field(SCHEMAEVOLUTIONCONFIGURATION_DESCRIPTOR)
field(TABLECREATIONCONFIGURATION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
BUFFERINGHINTS_DESCRIPTOR.index -> builder.bufferingHints = deserializeBufferingHintsDocument(deserializer)
CATALOGCONFIGURATION_DESCRIPTOR.index -> builder.catalogConfiguration = deserializeCatalogConfigurationDocument(deserializer)
CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR.index -> builder.cloudWatchLoggingOptions = deserializeCloudWatchLoggingOptionsDocument(deserializer)
DESTINATIONTABLECONFIGURATIONLIST_DESCRIPTOR.index -> builder.destinationTableConfigurationList =
deserializer.deserializeList(DESTINATIONTABLECONFIGURATIONLIST_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeDestinationTableConfigurationDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
PROCESSINGCONFIGURATION_DESCRIPTOR.index -> builder.processingConfiguration = deserializeProcessingConfigurationDocument(deserializer)
RETRYOPTIONS_DESCRIPTOR.index -> builder.retryOptions = deserializeRetryOptionsDocument(deserializer)
ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
S3BACKUPMODE_DESCRIPTOR.index -> builder.s3BackupMode = deserializeString().let { IcebergS3BackupMode.fromValue(it) }
S3DESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.s3DestinationDescription = deserializeS3DestinationDescriptionDocument(deserializer)
SCHEMAEVOLUTIONCONFIGURATION_DESCRIPTOR.index -> builder.schemaEvolutionConfiguration = deserializeSchemaEvolutionConfigurationDocument(deserializer)
TABLECREATIONCONFIGURATION_DESCRIPTOR.index -> builder.tableCreationConfiguration = deserializeTableCreationConfigurationDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}