commonMain.aws.sdk.kotlin.services.omics.serde.VariantImportJobItemDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of omics-jvm Show documentation
Show all versions of omics-jvm Show documentation
The AWS SDK for Kotlin client for Omics
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.omics.serde
import aws.sdk.kotlin.services.omics.model.JobStatus
import aws.sdk.kotlin.services.omics.model.VariantImportJobItem
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 kotlin.collections.mutableMapOf
internal fun deserializeVariantImportJobItemDocument(deserializer: Deserializer): VariantImportJobItem {
val builder = VariantImportJobItem.Builder()
val ANNOTATIONFIELDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("annotationFields"))
val COMPLETIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("completionTime"))
val CREATIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("creationTime"))
val DESTINATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("destinationName"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("id"))
val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("roleArn"))
val RUNLEFTNORMALIZATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("runLeftNormalization"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("status"))
val UPDATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("updateTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ANNOTATIONFIELDS_DESCRIPTOR)
field(COMPLETIONTIME_DESCRIPTOR)
field(CREATIONTIME_DESCRIPTOR)
field(DESTINATIONNAME_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(ROLEARN_DESCRIPTOR)
field(RUNLEFTNORMALIZATION_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(UPDATETIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ANNOTATIONFIELDS_DESCRIPTOR.index -> builder.annotationFields =
deserializer.deserializeMap(ANNOTATIONFIELDS_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
COMPLETIONTIME_DESCRIPTOR.index -> builder.completionTime = deserializeString().let { Instant.fromIso8601(it) }
CREATIONTIME_DESCRIPTOR.index -> builder.creationTime = deserializeString().let { Instant.fromIso8601(it) }
DESTINATIONNAME_DESCRIPTOR.index -> builder.destinationName = deserializeString()
ID_DESCRIPTOR.index -> builder.id = deserializeString()
ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
RUNLEFTNORMALIZATION_DESCRIPTOR.index -> builder.runLeftNormalization = deserializeBoolean()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { JobStatus.fromValue(it) }
UPDATETIME_DESCRIPTOR.index -> builder.updateTime = deserializeString().let { Instant.fromIso8601(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}