commonMain.aws.sdk.kotlin.services.configservice.serde.ComplianceSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configservice-jvm Show documentation
Show all versions of configservice-jvm Show documentation
The AWS SDK for Kotlin client for Config Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.serde
import aws.sdk.kotlin.services.configservice.model.ComplianceSummary
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 deserializeComplianceSummaryDocument(deserializer: Deserializer): ComplianceSummary {
val builder = ComplianceSummary.Builder()
val COMPLIANCESUMMARYTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("ComplianceSummaryTimestamp"))
val COMPLIANTRESOURCECOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CompliantResourceCount"))
val NONCOMPLIANTRESOURCECOUNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NonCompliantResourceCount"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(COMPLIANCESUMMARYTIMESTAMP_DESCRIPTOR)
field(COMPLIANTRESOURCECOUNT_DESCRIPTOR)
field(NONCOMPLIANTRESOURCECOUNT_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
COMPLIANCESUMMARYTIMESTAMP_DESCRIPTOR.index -> builder.complianceSummaryTimestamp = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
COMPLIANTRESOURCECOUNT_DESCRIPTOR.index -> builder.compliantResourceCount = deserializeComplianceContributorCountDocument(deserializer)
NONCOMPLIANTRESOURCECOUNT_DESCRIPTOR.index -> builder.nonCompliantResourceCount = deserializeComplianceContributorCountDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}