commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.DataMigrationStatisticsDocumentDeserializer.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.DataMigrationStatistics
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
internal fun deserializeDataMigrationStatisticsDocument(deserializer: Deserializer): DataMigrationStatistics {
val builder = DataMigrationStatistics.Builder()
val CDCLATENCY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("CDCLatency"))
val ELAPSEDTIMEMILLIS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("ElapsedTimeMillis"))
val FULLLOADPERCENTAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("FullLoadPercentage"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StartTime"))
val STOPTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StopTime"))
val TABLESERRORED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("TablesErrored"))
val TABLESLOADED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("TablesLoaded"))
val TABLESLOADING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("TablesLoading"))
val TABLESQUEUED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("TablesQueued"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CDCLATENCY_DESCRIPTOR)
field(ELAPSEDTIMEMILLIS_DESCRIPTOR)
field(FULLLOADPERCENTAGE_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
field(STOPTIME_DESCRIPTOR)
field(TABLESERRORED_DESCRIPTOR)
field(TABLESLOADED_DESCRIPTOR)
field(TABLESLOADING_DESCRIPTOR)
field(TABLESQUEUED_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CDCLATENCY_DESCRIPTOR.index -> builder.cdcLatency = deserializeInt()
ELAPSEDTIMEMILLIS_DESCRIPTOR.index -> builder.elapsedTimeMillis = deserializeLong()
FULLLOADPERCENTAGE_DESCRIPTOR.index -> builder.fullLoadPercentage = deserializeInt()
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeInstant(TimestampFormat.ISO_8601)
STOPTIME_DESCRIPTOR.index -> builder.stopTime = deserializeInstant(TimestampFormat.ISO_8601)
TABLESERRORED_DESCRIPTOR.index -> builder.tablesErrored = deserializeInt()
TABLESLOADED_DESCRIPTOR.index -> builder.tablesLoaded = deserializeInt()
TABLESLOADING_DESCRIPTOR.index -> builder.tablesLoading = deserializeInt()
TABLESQUEUED_DESCRIPTOR.index -> builder.tablesQueued = deserializeInt()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy