commonMain.aws.sdk.kotlin.services.kinesisanalytics.serde.OutputDescriptionDocumentDeserializer.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.OutputDescription
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 fun deserializeOutputDescriptionDocument(deserializer: Deserializer): OutputDescription {
val builder = OutputDescription.Builder()
val DESTINATIONSCHEMA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DestinationSchema"))
val KINESISFIREHOSEOUTPUTDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KinesisFirehoseOutputDescription"))
val KINESISSTREAMSOUTPUTDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KinesisStreamsOutputDescription"))
val LAMBDAOUTPUTDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LambdaOutputDescription"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val OUTPUTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OutputId"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DESTINATIONSCHEMA_DESCRIPTOR)
field(KINESISFIREHOSEOUTPUTDESCRIPTION_DESCRIPTOR)
field(KINESISSTREAMSOUTPUTDESCRIPTION_DESCRIPTOR)
field(LAMBDAOUTPUTDESCRIPTION_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(OUTPUTID_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DESTINATIONSCHEMA_DESCRIPTOR.index -> builder.destinationSchema = deserializeDestinationSchemaDocument(deserializer)
KINESISFIREHOSEOUTPUTDESCRIPTION_DESCRIPTOR.index -> builder.kinesisFirehoseOutputDescription = deserializeKinesisFirehoseOutputDescriptionDocument(deserializer)
KINESISSTREAMSOUTPUTDESCRIPTION_DESCRIPTOR.index -> builder.kinesisStreamsOutputDescription = deserializeKinesisStreamsOutputDescriptionDocument(deserializer)
LAMBDAOUTPUTDESCRIPTION_DESCRIPTOR.index -> builder.lambdaOutputDescription = deserializeLambdaOutputDescriptionDocument(deserializer)
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
OUTPUTID_DESCRIPTOR.index -> builder.outputId = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}