All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.medicalimaging.serde.DicomImportJobPropertiesDocumentDeserializer.kt Maven / Gradle / Ivy

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.DicomImportJobProperties
import aws.sdk.kotlin.services.medicalimaging.model.JobStatus
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 deserializeDicomImportJobPropertiesDocument(deserializer: Deserializer): DicomImportJobProperties {
    val builder = DicomImportJobProperties.Builder()
    val DATAACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("dataAccessRoleArn"))
    val DATASTOREID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("datastoreId"))
    val ENDEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("endedAt"))
    val INPUTS3URI_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("inputS3Uri"))
    val JOBID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("jobId"))
    val JOBNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("jobName"))
    val JOBSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("jobStatus"))
    val MESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("message"))
    val OUTPUTS3URI_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("outputS3Uri"))
    val SUBMITTEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("submittedAt"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(DATAACCESSROLEARN_DESCRIPTOR)
        field(DATASTOREID_DESCRIPTOR)
        field(ENDEDAT_DESCRIPTOR)
        field(INPUTS3URI_DESCRIPTOR)
        field(JOBID_DESCRIPTOR)
        field(JOBNAME_DESCRIPTOR)
        field(JOBSTATUS_DESCRIPTOR)
        field(MESSAGE_DESCRIPTOR)
        field(OUTPUTS3URI_DESCRIPTOR)
        field(SUBMITTEDAT_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                DATAACCESSROLEARN_DESCRIPTOR.index -> builder.dataAccessRoleArn = deserializeString()
                DATASTOREID_DESCRIPTOR.index -> builder.datastoreId = deserializeString()
                ENDEDAT_DESCRIPTOR.index -> builder.endedAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                INPUTS3URI_DESCRIPTOR.index -> builder.inputS3Uri = deserializeString()
                JOBID_DESCRIPTOR.index -> builder.jobId = deserializeString()
                JOBNAME_DESCRIPTOR.index -> builder.jobName = deserializeString()
                JOBSTATUS_DESCRIPTOR.index -> builder.jobStatus = deserializeString().let { JobStatus.fromValue(it) }
                MESSAGE_DESCRIPTOR.index -> builder.message = deserializeString()
                OUTPUTS3URI_DESCRIPTOR.index -> builder.outputS3Uri = deserializeString()
                SUBMITTEDAT_DESCRIPTOR.index -> builder.submittedAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy