commonMain.aws.sdk.kotlin.services.medicalimaging.serde.CopyDestinationImageSetPropertiesDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of medicalimaging-jvm Show documentation
Show all versions of medicalimaging-jvm Show documentation
The AWS SDK for Kotlin client for Medical Imaging
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.medicalimaging.serde
import aws.sdk.kotlin.services.medicalimaging.model.CopyDestinationImageSetProperties
import aws.sdk.kotlin.services.medicalimaging.model.ImageSetState
import aws.sdk.kotlin.services.medicalimaging.model.ImageSetWorkflowStatus
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 deserializeCopyDestinationImageSetPropertiesDocument(deserializer: Deserializer): CopyDestinationImageSetProperties {
val builder = CopyDestinationImageSetProperties.Builder()
val CREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createdAt"))
val IMAGESETARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("imageSetArn"))
val IMAGESETID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("imageSetId"))
val IMAGESETSTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("imageSetState"))
val IMAGESETWORKFLOWSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("imageSetWorkflowStatus"))
val LATESTVERSIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("latestVersionId"))
val UPDATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("updatedAt"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CREATEDAT_DESCRIPTOR)
field(IMAGESETARN_DESCRIPTOR)
field(IMAGESETID_DESCRIPTOR)
field(IMAGESETSTATE_DESCRIPTOR)
field(IMAGESETWORKFLOWSTATUS_DESCRIPTOR)
field(LATESTVERSIONID_DESCRIPTOR)
field(UPDATEDAT_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CREATEDAT_DESCRIPTOR.index -> builder.createdAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
IMAGESETARN_DESCRIPTOR.index -> builder.imageSetArn = deserializeString()
IMAGESETID_DESCRIPTOR.index -> builder.imageSetId = deserializeString()
IMAGESETSTATE_DESCRIPTOR.index -> builder.imageSetState = deserializeString().let { ImageSetState.fromValue(it) }
IMAGESETWORKFLOWSTATUS_DESCRIPTOR.index -> builder.imageSetWorkflowStatus = deserializeString().let { ImageSetWorkflowStatus.fromValue(it) }
LATESTVERSIONID_DESCRIPTOR.index -> builder.latestVersionId = deserializeString()
UPDATEDAT_DESCRIPTOR.index -> builder.updatedAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}