
commonMain.aws.sdk.kotlin.services.ssm.serde.InstancePatchStateDocumentDeserializer.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.InstancePatchState
import aws.sdk.kotlin.services.ssm.model.PatchOperationType
import aws.sdk.kotlin.services.ssm.model.RebootOption
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 deserializeInstancePatchStateDocument(deserializer: Deserializer): InstancePatchState {
val builder = InstancePatchState.Builder()
val BASELINEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("BaselineId"))
val CRITICALNONCOMPLIANTCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("CriticalNonCompliantCount"))
val FAILEDCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("FailedCount"))
val INSTALLOVERRIDELIST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InstallOverrideList"))
val INSTALLEDCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("InstalledCount"))
val INSTALLEDOTHERCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("InstalledOtherCount"))
val INSTALLEDPENDINGREBOOTCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("InstalledPendingRebootCount"))
val INSTALLEDREJECTEDCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("InstalledRejectedCount"))
val INSTANCEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InstanceId"))
val LASTNOREBOOTINSTALLOPERATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastNoRebootInstallOperationTime"))
val MISSINGCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MissingCount"))
val NOTAPPLICABLECOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("NotApplicableCount"))
val OPERATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Operation"))
val OPERATIONENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("OperationEndTime"))
val OPERATIONSTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("OperationStartTime"))
val OTHERNONCOMPLIANTCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("OtherNonCompliantCount"))
val OWNERINFORMATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OwnerInformation"))
val PATCHGROUP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PatchGroup"))
val REBOOTOPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("RebootOption"))
val SECURITYNONCOMPLIANTCOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("SecurityNonCompliantCount"))
val SNAPSHOTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SnapshotId"))
val UNREPORTEDNOTAPPLICABLECOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("UnreportedNotApplicableCount"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(BASELINEID_DESCRIPTOR)
field(CRITICALNONCOMPLIANTCOUNT_DESCRIPTOR)
field(FAILEDCOUNT_DESCRIPTOR)
field(INSTALLOVERRIDELIST_DESCRIPTOR)
field(INSTALLEDCOUNT_DESCRIPTOR)
field(INSTALLEDOTHERCOUNT_DESCRIPTOR)
field(INSTALLEDPENDINGREBOOTCOUNT_DESCRIPTOR)
field(INSTALLEDREJECTEDCOUNT_DESCRIPTOR)
field(INSTANCEID_DESCRIPTOR)
field(LASTNOREBOOTINSTALLOPERATIONTIME_DESCRIPTOR)
field(MISSINGCOUNT_DESCRIPTOR)
field(NOTAPPLICABLECOUNT_DESCRIPTOR)
field(OPERATION_DESCRIPTOR)
field(OPERATIONENDTIME_DESCRIPTOR)
field(OPERATIONSTARTTIME_DESCRIPTOR)
field(OTHERNONCOMPLIANTCOUNT_DESCRIPTOR)
field(OWNERINFORMATION_DESCRIPTOR)
field(PATCHGROUP_DESCRIPTOR)
field(REBOOTOPTION_DESCRIPTOR)
field(SECURITYNONCOMPLIANTCOUNT_DESCRIPTOR)
field(SNAPSHOTID_DESCRIPTOR)
field(UNREPORTEDNOTAPPLICABLECOUNT_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
BASELINEID_DESCRIPTOR.index -> builder.baselineId = deserializeString()
CRITICALNONCOMPLIANTCOUNT_DESCRIPTOR.index -> builder.criticalNonCompliantCount = deserializeInt()
FAILEDCOUNT_DESCRIPTOR.index -> builder.failedCount = deserializeInt()
INSTALLOVERRIDELIST_DESCRIPTOR.index -> builder.installOverrideList = deserializeString()
INSTALLEDCOUNT_DESCRIPTOR.index -> builder.installedCount = deserializeInt()
INSTALLEDOTHERCOUNT_DESCRIPTOR.index -> builder.installedOtherCount = deserializeInt()
INSTALLEDPENDINGREBOOTCOUNT_DESCRIPTOR.index -> builder.installedPendingRebootCount = deserializeInt()
INSTALLEDREJECTEDCOUNT_DESCRIPTOR.index -> builder.installedRejectedCount = deserializeInt()
INSTANCEID_DESCRIPTOR.index -> builder.instanceId = deserializeString()
LASTNOREBOOTINSTALLOPERATIONTIME_DESCRIPTOR.index -> builder.lastNoRebootInstallOperationTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
MISSINGCOUNT_DESCRIPTOR.index -> builder.missingCount = deserializeInt()
NOTAPPLICABLECOUNT_DESCRIPTOR.index -> builder.notApplicableCount = deserializeInt()
OPERATION_DESCRIPTOR.index -> builder.operation = deserializeString().let { PatchOperationType.fromValue(it) }
OPERATIONENDTIME_DESCRIPTOR.index -> builder.operationEndTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
OPERATIONSTARTTIME_DESCRIPTOR.index -> builder.operationStartTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
OTHERNONCOMPLIANTCOUNT_DESCRIPTOR.index -> builder.otherNonCompliantCount = deserializeInt()
OWNERINFORMATION_DESCRIPTOR.index -> builder.ownerInformation = deserializeString()
PATCHGROUP_DESCRIPTOR.index -> builder.patchGroup = deserializeString()
REBOOTOPTION_DESCRIPTOR.index -> builder.rebootOption = deserializeString().let { RebootOption.fromValue(it) }
SECURITYNONCOMPLIANTCOUNT_DESCRIPTOR.index -> builder.securityNonCompliantCount = deserializeInt()
SNAPSHOTID_DESCRIPTOR.index -> builder.snapshotId = deserializeString()
UNREPORTEDNOTAPPLICABLECOUNT_DESCRIPTOR.index -> builder.unreportedNotApplicableCount = deserializeInt()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy