commonMain.aws.sdk.kotlin.services.configservice.serde.ConformancePackStatusDetailDocumentDeserializer.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 Kotlin client for Config Service
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.configservice.serde
import aws.sdk.kotlin.services.configservice.model.ConformancePackState
import aws.sdk.kotlin.services.configservice.model.ConformancePackStatusDetail
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
internal fun deserializeConformancePackStatusDetailDocument(deserializer: Deserializer): ConformancePackStatusDetail {
val builder = ConformancePackStatusDetail.Builder()
val CONFORMANCEPACKARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ConformancePackArn"))
val CONFORMANCEPACKID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ConformancePackId"))
val CONFORMANCEPACKNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ConformancePackName"))
val CONFORMANCEPACKSTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ConformancePackState"))
val CONFORMANCEPACKSTATUSREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ConformancePackStatusReason"))
val LASTUPDATECOMPLETEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastUpdateCompletedTime"))
val LASTUPDATEREQUESTEDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastUpdateRequestedTime"))
val STACKARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StackArn"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONFORMANCEPACKARN_DESCRIPTOR)
field(CONFORMANCEPACKID_DESCRIPTOR)
field(CONFORMANCEPACKNAME_DESCRIPTOR)
field(CONFORMANCEPACKSTATE_DESCRIPTOR)
field(CONFORMANCEPACKSTATUSREASON_DESCRIPTOR)
field(LASTUPDATECOMPLETEDTIME_DESCRIPTOR)
field(LASTUPDATEREQUESTEDTIME_DESCRIPTOR)
field(STACKARN_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CONFORMANCEPACKARN_DESCRIPTOR.index -> builder.conformancePackArn = deserializeString()
CONFORMANCEPACKID_DESCRIPTOR.index -> builder.conformancePackId = deserializeString()
CONFORMANCEPACKNAME_DESCRIPTOR.index -> builder.conformancePackName = deserializeString()
CONFORMANCEPACKSTATE_DESCRIPTOR.index -> builder.conformancePackState = deserializeString().let { ConformancePackState.fromValue(it) }
CONFORMANCEPACKSTATUSREASON_DESCRIPTOR.index -> builder.conformancePackStatusReason = deserializeString()
LASTUPDATECOMPLETEDTIME_DESCRIPTOR.index -> builder.lastUpdateCompletedTime = deserializeString().let { Instant.fromEpochSeconds(it) }
LASTUPDATEREQUESTEDTIME_DESCRIPTOR.index -> builder.lastUpdateRequestedTime = deserializeString().let { Instant.fromEpochSeconds(it) }
STACKARN_DESCRIPTOR.index -> builder.stackArn = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy