
commonMain.aws.sdk.kotlin.services.launchwizard.serde.DeploymentDataSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.launchwizard.serde
import aws.sdk.kotlin.services.launchwizard.model.DeploymentDataSummary
import aws.sdk.kotlin.services.launchwizard.model.DeploymentStatus
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 deserializeDeploymentDataSummaryDocument(deserializer: Deserializer): DeploymentDataSummary {
val builder = DeploymentDataSummary.Builder()
val CREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createdAt"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("id"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val PATTERNNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("patternName"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("status"))
val WORKLOADNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("workloadName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATEDAT_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(PATTERNNAME_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(WORKLOADNAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CREATEDAT_DESCRIPTOR.index -> builder.createdAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
ID_DESCRIPTOR.index -> builder.id = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
PATTERNNAME_DESCRIPTOR.index -> builder.patternName = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { DeploymentStatus.fromValue(it) }
WORKLOADNAME_DESCRIPTOR.index -> builder.workloadName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy