commonMain.aws.sdk.kotlin.services.kinesisanalytics.serde.InputDescriptionDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesisanalytics-jvm Show documentation
Show all versions of kinesisanalytics-jvm Show documentation
The AWS SDK for Kotlin client for Kinesis Analytics
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kinesisanalytics.serde
import aws.sdk.kotlin.services.kinesisanalytics.model.InputDescription
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 deserializeInputDescriptionDocument(deserializer: Deserializer): InputDescription {
val builder = InputDescription.Builder()
val INAPPSTREAMNAMES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("InAppStreamNames"))
val INPUTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("InputId"))
val INPUTPARALLELISM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InputParallelism"))
val INPUTPROCESSINGCONFIGURATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InputProcessingConfigurationDescription"))
val INPUTSCHEMA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InputSchema"))
val INPUTSTARTINGPOSITIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InputStartingPositionConfiguration"))
val KINESISFIREHOSEINPUTDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KinesisFirehoseInputDescription"))
val KINESISSTREAMSINPUTDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KinesisStreamsInputDescription"))
val NAMEPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("NamePrefix"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(INAPPSTREAMNAMES_DESCRIPTOR)
field(INPUTID_DESCRIPTOR)
field(INPUTPARALLELISM_DESCRIPTOR)
field(INPUTPROCESSINGCONFIGURATIONDESCRIPTION_DESCRIPTOR)
field(INPUTSCHEMA_DESCRIPTOR)
field(INPUTSTARTINGPOSITIONCONFIGURATION_DESCRIPTOR)
field(KINESISFIREHOSEINPUTDESCRIPTION_DESCRIPTOR)
field(KINESISSTREAMSINPUTDESCRIPTION_DESCRIPTOR)
field(NAMEPREFIX_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
INAPPSTREAMNAMES_DESCRIPTOR.index -> builder.inAppStreamNames =
deserializer.deserializeList(INAPPSTREAMNAMES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
INPUTID_DESCRIPTOR.index -> builder.inputId = deserializeString()
INPUTPARALLELISM_DESCRIPTOR.index -> builder.inputParallelism = deserializeInputParallelismDocument(deserializer)
INPUTPROCESSINGCONFIGURATIONDESCRIPTION_DESCRIPTOR.index -> builder.inputProcessingConfigurationDescription = deserializeInputProcessingConfigurationDescriptionDocument(deserializer)
INPUTSCHEMA_DESCRIPTOR.index -> builder.inputSchema = deserializeSourceSchemaDocument(deserializer)
INPUTSTARTINGPOSITIONCONFIGURATION_DESCRIPTOR.index -> builder.inputStartingPositionConfiguration = deserializeInputStartingPositionConfigurationDocument(deserializer)
KINESISFIREHOSEINPUTDESCRIPTION_DESCRIPTOR.index -> builder.kinesisFirehoseInputDescription = deserializeKinesisFirehoseInputDescriptionDocument(deserializer)
KINESISSTREAMSINPUTDESCRIPTION_DESCRIPTOR.index -> builder.kinesisStreamsInputDescription = deserializeKinesisStreamsInputDescriptionDocument(deserializer)
NAMEPREFIX_DESCRIPTOR.index -> builder.namePrefix = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}