commonMain.aws.sdk.kotlin.services.neptunegraph.serde.GraphDataSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.neptunegraph.serde
import aws.sdk.kotlin.services.neptunegraph.model.EdgeStructure
import aws.sdk.kotlin.services.neptunegraph.model.GraphDataSummary
import aws.sdk.kotlin.services.neptunegraph.model.NodeStructure
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 kotlin.collections.mutableListOf
import kotlin.collections.mutableMapOf
internal fun deserializeGraphDataSummaryDocument(deserializer: Deserializer): GraphDataSummary {
val builder = GraphDataSummary.Builder()
val EDGELABELS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("edgeLabels"))
val EDGEPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("edgeProperties"))
val EDGEPROPERTIES_C0_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map)
val EDGESTRUCTURES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("edgeStructures"))
val NODELABELS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("nodeLabels"))
val NODEPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("nodeProperties"))
val NODEPROPERTIES_C0_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map)
val NODESTRUCTURES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("nodeStructures"))
val NUMEDGELABELS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numEdgeLabels"))
val NUMEDGEPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numEdgeProperties"))
val NUMEDGES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numEdges"))
val NUMNODELABELS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numNodeLabels"))
val NUMNODEPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numNodeProperties"))
val NUMNODES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("numNodes"))
val TOTALEDGEPROPERTYVALUES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("totalEdgePropertyValues"))
val TOTALNODEPROPERTYVALUES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("totalNodePropertyValues"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(EDGELABELS_DESCRIPTOR)
field(EDGEPROPERTIES_DESCRIPTOR)
field(EDGESTRUCTURES_DESCRIPTOR)
field(NODELABELS_DESCRIPTOR)
field(NODEPROPERTIES_DESCRIPTOR)
field(NODESTRUCTURES_DESCRIPTOR)
field(NUMEDGELABELS_DESCRIPTOR)
field(NUMEDGEPROPERTIES_DESCRIPTOR)
field(NUMEDGES_DESCRIPTOR)
field(NUMNODELABELS_DESCRIPTOR)
field(NUMNODEPROPERTIES_DESCRIPTOR)
field(NUMNODES_DESCRIPTOR)
field(TOTALEDGEPROPERTYVALUES_DESCRIPTOR)
field(TOTALNODEPROPERTYVALUES_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
EDGELABELS_DESCRIPTOR.index -> builder.edgeLabels =
deserializer.deserializeList(EDGELABELS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
EDGEPROPERTIES_DESCRIPTOR.index -> builder.edgeProperties =
deserializer.deserializeList(EDGEPROPERTIES_DESCRIPTOR) {
val col0 = mutableListOf