
commonMain.aws.sdk.kotlin.services.apptest.serde.Tn3270StepOutputDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.apptest.serde
import aws.sdk.kotlin.services.apptest.model.DataSet
import aws.sdk.kotlin.services.apptest.model.Tn3270StepOutput
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
internal fun deserializeTn3270StepOutputDocument(deserializer: Deserializer): Tn3270StepOutput {
val builder = Tn3270StepOutput.Builder()
val DATASETDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("dataSetDetails"))
val DATASETEXPORTLOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("dataSetExportLocation"))
val DMSOUTPUTLOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("dmsOutputLocation"))
val SCRIPTOUTPUTLOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("scriptOutputLocation"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DATASETDETAILS_DESCRIPTOR)
field(DATASETEXPORTLOCATION_DESCRIPTOR)
field(DMSOUTPUTLOCATION_DESCRIPTOR)
field(SCRIPTOUTPUTLOCATION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DATASETDETAILS_DESCRIPTOR.index -> builder.dataSetDetails =
deserializer.deserializeList(DATASETDETAILS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeDataSetDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DATASETEXPORTLOCATION_DESCRIPTOR.index -> builder.dataSetExportLocation = deserializeString()
DMSOUTPUTLOCATION_DESCRIPTOR.index -> builder.dmsOutputLocation = deserializeString()
SCRIPTOUTPUTLOCATION_DESCRIPTOR.index -> builder.scriptOutputLocation = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy