commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.DataProviderSettingsDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databasemigrationservice-jvm Show documentation
Show all versions of databasemigrationservice-jvm Show documentation
The AWS SDK for Kotlin client for Database Migration Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databasemigrationservice.serde
import aws.sdk.kotlin.services.databasemigrationservice.model.DataProviderSettings
import aws.smithy.kotlin.runtime.serde.DeserializationException
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.IgnoreKey
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 deserializeDataProviderSettingsDocument(deserializer: Deserializer): DataProviderSettings {
var value: DataProviderSettings? = null
val DOCDBSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DocDbSettings"))
val MARIADBSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MariaDbSettings"))
val MICROSOFTSQLSERVERSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MicrosoftSqlServerSettings"))
val MONGODBSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MongoDbSettings"))
val MYSQLSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MySqlSettings"))
val ORACLESETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("OracleSettings"))
val POSTGRESQLSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("PostgreSqlSettings"))
val REDSHIFTSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RedshiftSettings"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
trait(IgnoreKey("__type"))
field(DOCDBSETTINGS_DESCRIPTOR)
field(MARIADBSETTINGS_DESCRIPTOR)
field(MICROSOFTSQLSERVERSETTINGS_DESCRIPTOR)
field(MONGODBSETTINGS_DESCRIPTOR)
field(MYSQLSETTINGS_DESCRIPTOR)
field(ORACLESETTINGS_DESCRIPTOR)
field(POSTGRESQLSETTINGS_DESCRIPTOR)
field(REDSHIFTSETTINGS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while(true) {
when(findNextFieldIndex()) {
DOCDBSETTINGS_DESCRIPTOR.index -> value = DataProviderSettings.DocDbSettings(deserializeDocDbDataProviderSettingsDocument(deserializer))
MARIADBSETTINGS_DESCRIPTOR.index -> value = DataProviderSettings.MariaDbSettings(deserializeMariaDbDataProviderSettingsDocument(deserializer))
MICROSOFTSQLSERVERSETTINGS_DESCRIPTOR.index -> value = DataProviderSettings.MicrosoftSqlServerSettings(deserializeMicrosoftSqlServerDataProviderSettingsDocument(deserializer))
MONGODBSETTINGS_DESCRIPTOR.index -> value = DataProviderSettings.MongoDbSettings(deserializeMongoDbDataProviderSettingsDocument(deserializer))
MYSQLSETTINGS_DESCRIPTOR.index -> value = DataProviderSettings.MySqlSettings(deserializeMySqlDataProviderSettingsDocument(deserializer))
ORACLESETTINGS_DESCRIPTOR.index -> value = DataProviderSettings.OracleSettings(deserializeOracleDataProviderSettingsDocument(deserializer))
POSTGRESQLSETTINGS_DESCRIPTOR.index -> value = DataProviderSettings.PostgreSqlSettings(deserializePostgreSqlDataProviderSettingsDocument(deserializer))
REDSHIFTSETTINGS_DESCRIPTOR.index -> value = DataProviderSettings.RedshiftSettings(deserializeRedshiftDataProviderSettingsDocument(deserializer))
null -> break@loop
else -> value = DataProviderSettings.SdkUnknown.also { skipValue() }
}
}
}
return value ?: throw DeserializationException("Deserialized union value unexpectedly null: DataProviderSettings")
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy