commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ReplicationSubnetGroupDocumentDeserializer.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.ReplicationSubnetGroup
import aws.sdk.kotlin.services.databasemigrationservice.model.Subnet
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 deserializeReplicationSubnetGroupDocument(deserializer: Deserializer): ReplicationSubnetGroup {
val builder = ReplicationSubnetGroup.Builder()
val REPLICATIONSUBNETGROUPDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationSubnetGroupDescription"))
val REPLICATIONSUBNETGROUPIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationSubnetGroupIdentifier"))
val SUBNETGROUPSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SubnetGroupStatus"))
val SUBNETS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Subnets"))
val SUPPORTEDNETWORKTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("SupportedNetworkTypes"))
val VPCID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VpcId"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(REPLICATIONSUBNETGROUPDESCRIPTION_DESCRIPTOR)
field(REPLICATIONSUBNETGROUPIDENTIFIER_DESCRIPTOR)
field(SUBNETGROUPSTATUS_DESCRIPTOR)
field(SUBNETS_DESCRIPTOR)
field(SUPPORTEDNETWORKTYPES_DESCRIPTOR)
field(VPCID_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
REPLICATIONSUBNETGROUPDESCRIPTION_DESCRIPTOR.index -> builder.replicationSubnetGroupDescription = deserializeString()
REPLICATIONSUBNETGROUPIDENTIFIER_DESCRIPTOR.index -> builder.replicationSubnetGroupIdentifier = deserializeString()
SUBNETGROUPSTATUS_DESCRIPTOR.index -> builder.subnetGroupStatus = deserializeString()
SUBNETS_DESCRIPTOR.index -> builder.subnets =
deserializer.deserializeList(SUBNETS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeSubnetDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
SUPPORTEDNETWORKTYPES_DESCRIPTOR.index -> builder.supportedNetworkTypes =
deserializer.deserializeList(SUPPORTEDNETWORKTYPES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
VPCID_DESCRIPTOR.index -> builder.vpcId = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy