commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ReplicationTaskStatsDocumentDeserializer.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.ReplicationTaskStats
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 deserializeReplicationTaskStatsDocument(deserializer: Deserializer): ReplicationTaskStats {
val builder = ReplicationTaskStats.Builder()
val ELAPSEDTIMEMILLIS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("ElapsedTimeMillis"))
val FRESHSTARTDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("FreshStartDate"))
val FULLLOADFINISHDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("FullLoadFinishDate"))
val FULLLOADPROGRESSPERCENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("FullLoadProgressPercent"))
val FULLLOADSTARTDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("FullLoadStartDate"))
val STARTDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StartDate"))
val STOPDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StopDate"))
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(ELAPSEDTIMEMILLIS_DESCRIPTOR)
field(FRESHSTARTDATE_DESCRIPTOR)
field(FULLLOADFINISHDATE_DESCRIPTOR)
field(FULLLOADPROGRESSPERCENT_DESCRIPTOR)
field(FULLLOADSTARTDATE_DESCRIPTOR)
field(STARTDATE_DESCRIPTOR)
field(STOPDATE_DESCRIPTOR)
field(TABLESERRORED_DESCRIPTOR)
field(TABLESLOADED_DESCRIPTOR)
field(TABLESLOADING_DESCRIPTOR)
field(TABLESQUEUED_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ELAPSEDTIMEMILLIS_DESCRIPTOR.index -> builder.elapsedTimeMillis = deserializeLong()
FRESHSTARTDATE_DESCRIPTOR.index -> builder.freshStartDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
FULLLOADFINISHDATE_DESCRIPTOR.index -> builder.fullLoadFinishDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
FULLLOADPROGRESSPERCENT_DESCRIPTOR.index -> builder.fullLoadProgressPercent = deserializeInt()
FULLLOADSTARTDATE_DESCRIPTOR.index -> builder.fullLoadStartDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
STARTDATE_DESCRIPTOR.index -> builder.startDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
STOPDATE_DESCRIPTOR.index -> builder.stopDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
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