commonMain.aws.sdk.kotlin.services.firehose.serde.SnowflakeDestinationDescriptionDocumentDeserializer.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.SnowflakeDataLoadingOption
import aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationDescription
import aws.sdk.kotlin.services.firehose.model.SnowflakeS3BackupMode
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 deserializeSnowflakeDestinationDescriptionDocument(deserializer: Deserializer): SnowflakeDestinationDescription {
val builder = SnowflakeDestinationDescription.Builder()
val ACCOUNTURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AccountUrl"))
val BUFFERINGHINTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("BufferingHints"))
val CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CloudWatchLoggingOptions"))
val CONTENTCOLUMNNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ContentColumnName"))
val DATALOADINGOPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DataLoadingOption"))
val DATABASE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Database"))
val METADATACOLUMNNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MetaDataColumnName"))
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 SCHEMA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Schema"))
val SECRETSMANAGERCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SecretsManagerConfiguration"))
val SNOWFLAKEROLECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SnowflakeRoleConfiguration"))
val SNOWFLAKEVPCCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SnowflakeVpcConfiguration"))
val TABLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Table"))
val USER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("User"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACCOUNTURL_DESCRIPTOR)
field(BUFFERINGHINTS_DESCRIPTOR)
field(CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR)
field(CONTENTCOLUMNNAME_DESCRIPTOR)
field(DATALOADINGOPTION_DESCRIPTOR)
field(DATABASE_DESCRIPTOR)
field(METADATACOLUMNNAME_DESCRIPTOR)
field(PROCESSINGCONFIGURATION_DESCRIPTOR)
field(RETRYOPTIONS_DESCRIPTOR)
field(ROLEARN_DESCRIPTOR)
field(S3BACKUPMODE_DESCRIPTOR)
field(S3DESTINATIONDESCRIPTION_DESCRIPTOR)
field(SCHEMA_DESCRIPTOR)
field(SECRETSMANAGERCONFIGURATION_DESCRIPTOR)
field(SNOWFLAKEROLECONFIGURATION_DESCRIPTOR)
field(SNOWFLAKEVPCCONFIGURATION_DESCRIPTOR)
field(TABLE_DESCRIPTOR)
field(USER_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ACCOUNTURL_DESCRIPTOR.index -> builder.accountUrl = deserializeString()
BUFFERINGHINTS_DESCRIPTOR.index -> builder.bufferingHints = deserializeSnowflakeBufferingHintsDocument(deserializer)
CLOUDWATCHLOGGINGOPTIONS_DESCRIPTOR.index -> builder.cloudWatchLoggingOptions = deserializeCloudWatchLoggingOptionsDocument(deserializer)
CONTENTCOLUMNNAME_DESCRIPTOR.index -> builder.contentColumnName = deserializeString()
DATALOADINGOPTION_DESCRIPTOR.index -> builder.dataLoadingOption = deserializeString().let { SnowflakeDataLoadingOption.fromValue(it) }
DATABASE_DESCRIPTOR.index -> builder.database = deserializeString()
METADATACOLUMNNAME_DESCRIPTOR.index -> builder.metaDataColumnName = deserializeString()
PROCESSINGCONFIGURATION_DESCRIPTOR.index -> builder.processingConfiguration = deserializeProcessingConfigurationDocument(deserializer)
RETRYOPTIONS_DESCRIPTOR.index -> builder.retryOptions = deserializeSnowflakeRetryOptionsDocument(deserializer)
ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
S3BACKUPMODE_DESCRIPTOR.index -> builder.s3BackupMode = deserializeString().let { SnowflakeS3BackupMode.fromValue(it) }
S3DESTINATIONDESCRIPTION_DESCRIPTOR.index -> builder.s3DestinationDescription = deserializeS3DestinationDescriptionDocument(deserializer)
SCHEMA_DESCRIPTOR.index -> builder.schema = deserializeString()
SECRETSMANAGERCONFIGURATION_DESCRIPTOR.index -> builder.secretsManagerConfiguration = deserializeSecretsManagerConfigurationDocument(deserializer)
SNOWFLAKEROLECONFIGURATION_DESCRIPTOR.index -> builder.snowflakeRoleConfiguration = deserializeSnowflakeRoleConfigurationDocument(deserializer)
SNOWFLAKEVPCCONFIGURATION_DESCRIPTOR.index -> builder.snowflakeVpcConfiguration = deserializeSnowflakeVpcConfigurationDocument(deserializer)
TABLE_DESCRIPTOR.index -> builder.table = deserializeString()
USER_DESCRIPTOR.index -> builder.user = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}