commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ReplicationInstanceDocumentDeserializer.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.ReplicationInstance
import aws.sdk.kotlin.services.databasemigrationservice.model.VpcSecurityGroupMembership
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 aws.smithy.kotlin.runtime.time.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat
import kotlin.collections.mutableListOf
internal fun deserializeReplicationInstanceDocument(deserializer: Deserializer): ReplicationInstance {
val builder = ReplicationInstance.Builder()
val ALLOCATEDSTORAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("AllocatedStorage"))
val AUTOMINORVERSIONUPGRADE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("AutoMinorVersionUpgrade"))
val AVAILABILITYZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AvailabilityZone"))
val DNSNAMESERVERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DnsNameServers"))
val ENGINEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EngineVersion"))
val FREEUNTIL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("FreeUntil"))
val INSTANCECREATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("InstanceCreateTime"))
val KERBEROSAUTHENTICATIONSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KerberosAuthenticationSettings"))
val KMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("KmsKeyId"))
val MULTIAZ_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("MultiAZ"))
val NETWORKTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("NetworkType"))
val PENDINGMODIFIEDVALUES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("PendingModifiedValues"))
val PREFERREDMAINTENANCEWINDOW_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PreferredMaintenanceWindow"))
val PUBLICLYACCESSIBLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("PubliclyAccessible"))
val REPLICATIONINSTANCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstanceArn"))
val REPLICATIONINSTANCECLASS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstanceClass"))
val REPLICATIONINSTANCEIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstanceIdentifier"))
val REPLICATIONINSTANCEIPV6ADDRESSES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ReplicationInstanceIpv6Addresses"))
val REPLICATIONINSTANCEPRIVATEIPADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstancePrivateIpAddress"))
val REPLICATIONINSTANCEPRIVATEIPADDRESSES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ReplicationInstancePrivateIpAddresses"))
val REPLICATIONINSTANCEPUBLICIPADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstancePublicIpAddress"))
val REPLICATIONINSTANCEPUBLICIPADDRESSES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ReplicationInstancePublicIpAddresses"))
val REPLICATIONINSTANCESTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstanceStatus"))
val REPLICATIONSUBNETGROUP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ReplicationSubnetGroup"))
val SECONDARYAVAILABILITYZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecondaryAvailabilityZone"))
val VPCSECURITYGROUPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("VpcSecurityGroups"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ALLOCATEDSTORAGE_DESCRIPTOR)
field(AUTOMINORVERSIONUPGRADE_DESCRIPTOR)
field(AVAILABILITYZONE_DESCRIPTOR)
field(DNSNAMESERVERS_DESCRIPTOR)
field(ENGINEVERSION_DESCRIPTOR)
field(FREEUNTIL_DESCRIPTOR)
field(INSTANCECREATETIME_DESCRIPTOR)
field(KERBEROSAUTHENTICATIONSETTINGS_DESCRIPTOR)
field(KMSKEYID_DESCRIPTOR)
field(MULTIAZ_DESCRIPTOR)
field(NETWORKTYPE_DESCRIPTOR)
field(PENDINGMODIFIEDVALUES_DESCRIPTOR)
field(PREFERREDMAINTENANCEWINDOW_DESCRIPTOR)
field(PUBLICLYACCESSIBLE_DESCRIPTOR)
field(REPLICATIONINSTANCEARN_DESCRIPTOR)
field(REPLICATIONINSTANCECLASS_DESCRIPTOR)
field(REPLICATIONINSTANCEIDENTIFIER_DESCRIPTOR)
field(REPLICATIONINSTANCEIPV6ADDRESSES_DESCRIPTOR)
field(REPLICATIONINSTANCEPRIVATEIPADDRESS_DESCRIPTOR)
field(REPLICATIONINSTANCEPRIVATEIPADDRESSES_DESCRIPTOR)
field(REPLICATIONINSTANCEPUBLICIPADDRESS_DESCRIPTOR)
field(REPLICATIONINSTANCEPUBLICIPADDRESSES_DESCRIPTOR)
field(REPLICATIONINSTANCESTATUS_DESCRIPTOR)
field(REPLICATIONSUBNETGROUP_DESCRIPTOR)
field(SECONDARYAVAILABILITYZONE_DESCRIPTOR)
field(VPCSECURITYGROUPS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ALLOCATEDSTORAGE_DESCRIPTOR.index -> builder.allocatedStorage = deserializeInt()
AUTOMINORVERSIONUPGRADE_DESCRIPTOR.index -> builder.autoMinorVersionUpgrade = deserializeBoolean()
AVAILABILITYZONE_DESCRIPTOR.index -> builder.availabilityZone = deserializeString()
DNSNAMESERVERS_DESCRIPTOR.index -> builder.dnsNameServers = deserializeString()
ENGINEVERSION_DESCRIPTOR.index -> builder.engineVersion = deserializeString()
FREEUNTIL_DESCRIPTOR.index -> builder.freeUntil = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
INSTANCECREATETIME_DESCRIPTOR.index -> builder.instanceCreateTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
KERBEROSAUTHENTICATIONSETTINGS_DESCRIPTOR.index -> builder.kerberosAuthenticationSettings = deserializeKerberosAuthenticationSettingsDocument(deserializer)
KMSKEYID_DESCRIPTOR.index -> builder.kmsKeyId = deserializeString()
MULTIAZ_DESCRIPTOR.index -> builder.multiAz = deserializeBoolean()
NETWORKTYPE_DESCRIPTOR.index -> builder.networkType = deserializeString()
PENDINGMODIFIEDVALUES_DESCRIPTOR.index -> builder.pendingModifiedValues = deserializeReplicationPendingModifiedValuesDocument(deserializer)
PREFERREDMAINTENANCEWINDOW_DESCRIPTOR.index -> builder.preferredMaintenanceWindow = deserializeString()
PUBLICLYACCESSIBLE_DESCRIPTOR.index -> builder.publiclyAccessible = deserializeBoolean()
REPLICATIONINSTANCEARN_DESCRIPTOR.index -> builder.replicationInstanceArn = deserializeString()
REPLICATIONINSTANCECLASS_DESCRIPTOR.index -> builder.replicationInstanceClass = deserializeString()
REPLICATIONINSTANCEIDENTIFIER_DESCRIPTOR.index -> builder.replicationInstanceIdentifier = deserializeString()
REPLICATIONINSTANCEIPV6ADDRESSES_DESCRIPTOR.index -> builder.replicationInstanceIpv6Addresses =
deserializer.deserializeList(REPLICATIONINSTANCEIPV6ADDRESSES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
REPLICATIONINSTANCEPRIVATEIPADDRESS_DESCRIPTOR.index -> builder.replicationInstancePrivateIpAddress = deserializeString()
REPLICATIONINSTANCEPRIVATEIPADDRESSES_DESCRIPTOR.index -> builder.replicationInstancePrivateIpAddresses =
deserializer.deserializeList(REPLICATIONINSTANCEPRIVATEIPADDRESSES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
REPLICATIONINSTANCEPUBLICIPADDRESS_DESCRIPTOR.index -> builder.replicationInstancePublicIpAddress = deserializeString()
REPLICATIONINSTANCEPUBLICIPADDRESSES_DESCRIPTOR.index -> builder.replicationInstancePublicIpAddresses =
deserializer.deserializeList(REPLICATIONINSTANCEPUBLICIPADDRESSES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
REPLICATIONINSTANCESTATUS_DESCRIPTOR.index -> builder.replicationInstanceStatus = deserializeString()
REPLICATIONSUBNETGROUP_DESCRIPTOR.index -> builder.replicationSubnetGroup = deserializeReplicationSubnetGroupDocument(deserializer)
SECONDARYAVAILABILITYZONE_DESCRIPTOR.index -> builder.secondaryAvailabilityZone = deserializeString()
VPCSECURITYGROUPS_DESCRIPTOR.index -> builder.vpcSecurityGroups =
deserializer.deserializeList(VPCSECURITYGROUPS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeVpcSecurityGroupMembershipDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy