
commonMain.aws.sdk.kotlin.services.ssm.serde.InventoryDeletionStatusItemDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssm.serde
import aws.sdk.kotlin.services.ssm.model.InventoryDeletionStatus
import aws.sdk.kotlin.services.ssm.model.InventoryDeletionStatusItem
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 deserializeInventoryDeletionStatusItemDocument(deserializer: Deserializer): InventoryDeletionStatusItem {
val builder = InventoryDeletionStatusItem.Builder()
val DELETIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DeletionId"))
val DELETIONSTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("DeletionStartTime"))
val DELETIONSUMMARY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DeletionSummary"))
val LASTSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("LastStatus"))
val LASTSTATUSMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LastStatusMessage"))
val LASTSTATUSUPDATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastStatusUpdateTime"))
val TYPENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TypeName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DELETIONID_DESCRIPTOR)
field(DELETIONSTARTTIME_DESCRIPTOR)
field(DELETIONSUMMARY_DESCRIPTOR)
field(LASTSTATUS_DESCRIPTOR)
field(LASTSTATUSMESSAGE_DESCRIPTOR)
field(LASTSTATUSUPDATETIME_DESCRIPTOR)
field(TYPENAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DELETIONID_DESCRIPTOR.index -> builder.deletionId = deserializeString()
DELETIONSTARTTIME_DESCRIPTOR.index -> builder.deletionStartTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
DELETIONSUMMARY_DESCRIPTOR.index -> builder.deletionSummary = deserializeInventoryDeletionSummaryDocument(deserializer)
LASTSTATUS_DESCRIPTOR.index -> builder.lastStatus = deserializeString().let { InventoryDeletionStatus.fromValue(it) }
LASTSTATUSMESSAGE_DESCRIPTOR.index -> builder.lastStatusMessage = deserializeString()
LASTSTATUSUPDATETIME_DESCRIPTOR.index -> builder.lastStatusUpdateTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
TYPENAME_DESCRIPTOR.index -> builder.typeName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy