commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.OrderableReplicationInstanceDocumentDeserializer.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.OrderableReplicationInstance
import aws.sdk.kotlin.services.databasemigrationservice.model.ReleaseStatusValues
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 deserializeOrderableReplicationInstanceDocument(deserializer: Deserializer): OrderableReplicationInstance {
val builder = OrderableReplicationInstance.Builder()
val AVAILABILITYZONES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("AvailabilityZones"))
val DEFAULTALLOCATEDSTORAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("DefaultAllocatedStorage"))
val ENGINEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EngineVersion"))
val INCLUDEDALLOCATEDSTORAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("IncludedAllocatedStorage"))
val MAXALLOCATEDSTORAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxAllocatedStorage"))
val MINALLOCATEDSTORAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MinAllocatedStorage"))
val RELEASESTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ReleaseStatus"))
val REPLICATIONINSTANCECLASS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ReplicationInstanceClass"))
val STORAGETYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StorageType"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AVAILABILITYZONES_DESCRIPTOR)
field(DEFAULTALLOCATEDSTORAGE_DESCRIPTOR)
field(ENGINEVERSION_DESCRIPTOR)
field(INCLUDEDALLOCATEDSTORAGE_DESCRIPTOR)
field(MAXALLOCATEDSTORAGE_DESCRIPTOR)
field(MINALLOCATEDSTORAGE_DESCRIPTOR)
field(RELEASESTATUS_DESCRIPTOR)
field(REPLICATIONINSTANCECLASS_DESCRIPTOR)
field(STORAGETYPE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
AVAILABILITYZONES_DESCRIPTOR.index -> builder.availabilityZones =
deserializer.deserializeList(AVAILABILITYZONES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DEFAULTALLOCATEDSTORAGE_DESCRIPTOR.index -> builder.defaultAllocatedStorage = deserializeInt()
ENGINEVERSION_DESCRIPTOR.index -> builder.engineVersion = deserializeString()
INCLUDEDALLOCATEDSTORAGE_DESCRIPTOR.index -> builder.includedAllocatedStorage = deserializeInt()
MAXALLOCATEDSTORAGE_DESCRIPTOR.index -> builder.maxAllocatedStorage = deserializeInt()
MINALLOCATEDSTORAGE_DESCRIPTOR.index -> builder.minAllocatedStorage = deserializeInt()
RELEASESTATUS_DESCRIPTOR.index -> builder.releaseStatus = deserializeString().let { ReleaseStatusValues.fromValue(it) }
REPLICATIONINSTANCECLASS_DESCRIPTOR.index -> builder.replicationInstanceClass = deserializeString()
STORAGETYPE_DESCRIPTOR.index -> builder.storageType = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy