commonMain.aws.sdk.kotlin.services.firehose.serde.RedshiftDestinationDescriptionDocumentDeserializer.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.RedshiftDestinationDescription
import aws.sdk.kotlin.services.firehose.model.RedshiftS3BackupMode
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 deserializeRedshiftDestinationDescriptionDocument(deserializer: Deserializer): RedshiftDestinationDescription {
val builder = RedshiftDestinationDescription.Builder()
val CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchLoggingOptions"))
val CLUSTERJDBCURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ClusterJDBCURL"))
val COPYCOMMAND_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CopyCommand"))
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 S3BACKUPDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3BackupDescription"))
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 USERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Username"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR)
field(CLUSTERJDBCURL_DESCRIPTOR)
field(COPYCOMMAND_DESCRIPTOR)
field(PROCESSINGCONFIGURATION_DESCRIPTOR)
field(RETRYOPTIONS_DESCRIPTOR)
field(ROLEARN_DESCRIPTOR)
field(S3BACKUPDESCRIPTION_DESCRIPTOR)
field(S3BACKUPMODE_DESCRIPTOR)
field(S3DESTINATIONDESCRIPTION_DESCRIPTOR)
field(SECRETSMANAGERCONFIGURATION_DESCRIPTOR)
field(USERNAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR.index -> builder.cloudWatchLoggingOptions = deserializeCloudWatchLoggingOptionsDocument(deserializer)
CLUSTERJDBCURL_DESCRIPTOR.index -> builder.clusterJdbcurl = deserializeString()
COPYCOMMAND_DESCRIPTOR.index -> builder.copyCommand = deserializeCopyCommandDocument(deserializer)
PROCESSINGCONFIGURATION_DESCRIPTOR.index -> builder.processingConfiguration = deserializeProcessingConfigurationDocument(deserializer)
RETRYOPTIONS_DESCRIPTOR.index -> builder.retryOptions = deserializeRedshiftRetryOptionsDocument(deserializer)
ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
S3BACKUPDESCRIPTION_DESCRIPTOR.index -> builder.s3BackupDescription = deserializeS3DestinationDescriptionDocument(deserializer)
S3BACKUPMODE_DESCRIPTOR.index -> builder.s3BackupMode = deserializeString().let { RedshiftS3BackupMode.fromValue(it) }
S3DESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.s3DestinationDescription = deserializeS3DestinationDescriptionDocument(deserializer)
SECRETSMANAGERCONFIGURATION_DESCRIPTOR.index -> builder.secretsManagerConfiguration = deserializeSecretsManagerConfigurationDocument(deserializer)
USERNAME_DESCRIPTOR.index -> builder.username = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}