aws.sdk.kotlin.services.connect.transform.HierarchyStructureDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connect.transform
import aws.sdk.kotlin.services.connect.model.HierarchyStructure
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
internal suspend fun deserializeHierarchyStructureDocument(deserializer: Deserializer): HierarchyStructure {
val builder = HierarchyStructure.builder()
val LEVELFIVE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LevelFive"))
val LEVELFOUR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LevelFour"))
val LEVELONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LevelOne"))
val LEVELTHREE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LevelThree"))
val LEVELTWO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LevelTwo"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(LEVELFIVE_DESCRIPTOR)
field(LEVELFOUR_DESCRIPTOR)
field(LEVELONE_DESCRIPTOR)
field(LEVELTHREE_DESCRIPTOR)
field(LEVELTWO_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
LEVELFIVE_DESCRIPTOR.index -> builder.levelFive = deserializeHierarchyLevelDocument(deserializer)
LEVELFOUR_DESCRIPTOR.index -> builder.levelFour = deserializeHierarchyLevelDocument(deserializer)
LEVELONE_DESCRIPTOR.index -> builder.levelOne = deserializeHierarchyLevelDocument(deserializer)
LEVELTHREE_DESCRIPTOR.index -> builder.levelThree = deserializeHierarchyLevelDocument(deserializer)
LEVELTWO_DESCRIPTOR.index -> builder.levelTwo = deserializeHierarchyLevelDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy