commonMain.aws.sdk.kotlin.services.lookoutmetrics.serde.RdsSourceConfigDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lookoutmetrics-jvm Show documentation
Show all versions of lookoutmetrics-jvm Show documentation
The AWS SDK for Kotlin client for LookoutMetrics
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lookoutmetrics.serde
import aws.sdk.kotlin.services.lookoutmetrics.model.RdsSourceConfig
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 deserializeRdsSourceConfigDocument(deserializer: Deserializer): RdsSourceConfig {
val builder = RdsSourceConfig.Builder()
val DBINSTANCEIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DBInstanceIdentifier"))
val DATABASEHOST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatabaseHost"))
val DATABASENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatabaseName"))
val DATABASEPORT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("DatabasePort"))
val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleArn"))
val SECRETMANAGERARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecretManagerArn"))
val TABLENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TableName"))
val VPCCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("VpcConfiguration"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DBINSTANCEIDENTIFIER_DESCRIPTOR)
field(DATABASEHOST_DESCRIPTOR)
field(DATABASENAME_DESCRIPTOR)
field(DATABASEPORT_DESCRIPTOR)
field(ROLEARN_DESCRIPTOR)
field(SECRETMANAGERARN_DESCRIPTOR)
field(TABLENAME_DESCRIPTOR)
field(VPCCONFIGURATION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DBINSTANCEIDENTIFIER_DESCRIPTOR.index -> builder.dbInstanceIdentifier = deserializeString()
DATABASEHOST_DESCRIPTOR.index -> builder.databaseHost = deserializeString()
DATABASENAME_DESCRIPTOR.index -> builder.databaseName = deserializeString()
DATABASEPORT_DESCRIPTOR.index -> builder.databasePort = deserializeInt()
ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
SECRETMANAGERARN_DESCRIPTOR.index -> builder.secretManagerArn = deserializeString()
TABLENAME_DESCRIPTOR.index -> builder.tableName = deserializeString()
VPCCONFIGURATION_DESCRIPTOR.index -> builder.vpcConfiguration = deserializeVpcConfigurationDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy