commonMain.aws.sdk.kotlin.services.glue.serde.EvaluateDataQualityMultiFrameDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.AdditionalOptionKeys
import aws.sdk.kotlin.services.glue.model.EvaluateDataQualityMultiFrame
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 deserializeEvaluateDataQualityMultiFrameDocument(deserializer: Deserializer): EvaluateDataQualityMultiFrame {
val builder = EvaluateDataQualityMultiFrame.Builder()
val ADDITIONALDATASOURCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("AdditionalDataSources"))
val ADDITIONALOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("AdditionalOptions"))
val INPUTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Inputs"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val PUBLISHINGOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("PublishingOptions"))
val RULESET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Ruleset"))
val STOPJOBONFAILUREOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("StopJobOnFailureOptions"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ADDITIONALDATASOURCES_DESCRIPTOR)
field(ADDITIONALOPTIONS_DESCRIPTOR)
field(INPUTS_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(PUBLISHINGOPTIONS_DESCRIPTOR)
field(RULESET_DESCRIPTOR)
field(STOPJOBONFAILUREOPTIONS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ADDITIONALDATASOURCES_DESCRIPTOR.index -> builder.additionalDataSources =
deserializer.deserializeMap(ADDITIONALDATASOURCES_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
ADDITIONALOPTIONS_DESCRIPTOR.index -> builder.additionalOptions =
deserializer.deserializeMap(ADDITIONALOPTIONS_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = AdditionalOptionKeys.fromValue(key())
val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
INPUTS_DESCRIPTOR.index -> builder.inputs =
deserializer.deserializeList(INPUTS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
PUBLISHINGOPTIONS_DESCRIPTOR.index -> builder.publishingOptions = deserializeDqResultsPublishingOptionsDocument(deserializer)
RULESET_DESCRIPTOR.index -> builder.ruleset = deserializeString()
STOPJOBONFAILUREOPTIONS_DESCRIPTOR.index -> builder.stopJobOnFailureOptions = deserializeDqStopJobOnFailureOptionsDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}