
commonMain.aws.sdk.kotlin.services.kinesisanalytics.serde.ApplicationDetailDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kinesisanalytics.serde
import aws.sdk.kotlin.services.kinesisanalytics.model.ApplicationDetail
import aws.sdk.kotlin.services.kinesisanalytics.model.ApplicationStatus
import aws.sdk.kotlin.services.kinesisanalytics.model.CloudWatchLoggingOptionDescription
import aws.sdk.kotlin.services.kinesisanalytics.model.InputDescription
import aws.sdk.kotlin.services.kinesisanalytics.model.OutputDescription
import aws.sdk.kotlin.services.kinesisanalytics.model.ReferenceDataSourceDescription
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 aws.smithy.kotlin.runtime.time.Instant
import kotlin.collections.mutableListOf
internal fun deserializeApplicationDetailDocument(deserializer: Deserializer): ApplicationDetail {
val builder = ApplicationDetail.Builder()
val APPLICATIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ApplicationARN"))
val APPLICATIONCODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ApplicationCode"))
val APPLICATIONDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ApplicationDescription"))
val APPLICATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ApplicationName"))
val APPLICATIONSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ApplicationStatus"))
val APPLICATIONVERSIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("ApplicationVersionId"))
val CLOUDWATCHLOGGINGOPTIONDESCRIPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("CloudWatchLoggingOptionDescriptions"))
val CREATETIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreateTimestamp"))
val INPUTDESCRIPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("InputDescriptions"))
val LASTUPDATETIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastUpdateTimestamp"))
val OUTPUTDESCRIPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("OutputDescriptions"))
val REFERENCEDATASOURCEDESCRIPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ReferenceDataSourceDescriptions"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(APPLICATIONARN_DESCRIPTOR)
field(APPLICATIONCODE_DESCRIPTOR)
field(APPLICATIONDESCRIPTION_DESCRIPTOR)
field(APPLICATIONNAME_DESCRIPTOR)
field(APPLICATIONSTATUS_DESCRIPTOR)
field(APPLICATIONVERSIONID_DESCRIPTOR)
field(CLOUDWATCHLOGGINGOPTIONDESCRIPTIONS_DESCRIPTOR)
field(CREATETIMESTAMP_DESCRIPTOR)
field(INPUTDESCRIPTIONS_DESCRIPTOR)
field(LASTUPDATETIMESTAMP_DESCRIPTOR)
field(OUTPUTDESCRIPTIONS_DESCRIPTOR)
field(REFERENCEDATASOURCEDESCRIPTIONS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
APPLICATIONARN_DESCRIPTOR.index -> builder.applicationArn = deserializeString()
APPLICATIONCODE_DESCRIPTOR.index -> builder.applicationCode = deserializeString()
APPLICATIONDESCRIPTION_DESCRIPTOR.index -> builder.applicationDescription = deserializeString()
APPLICATIONNAME_DESCRIPTOR.index -> builder.applicationName = deserializeString()
APPLICATIONSTATUS_DESCRIPTOR.index -> builder.applicationStatus = deserializeString().let { ApplicationStatus.fromValue(it) }
APPLICATIONVERSIONID_DESCRIPTOR.index -> builder.applicationVersionId = deserializeLong()
CLOUDWATCHLOGGINGOPTIONDESCRIPTIONS_DESCRIPTOR.index -> builder.cloudWatchLoggingOptionDescriptions =
deserializer.deserializeList(CLOUDWATCHLOGGINGOPTIONDESCRIPTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeCloudWatchLoggingOptionDescriptionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
CREATETIMESTAMP_DESCRIPTOR.index -> builder.createTimestamp = deserializeString().let { Instant.fromEpochSeconds(it) }
INPUTDESCRIPTIONS_DESCRIPTOR.index -> builder.inputDescriptions =
deserializer.deserializeList(INPUTDESCRIPTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeInputDescriptionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
LASTUPDATETIMESTAMP_DESCRIPTOR.index -> builder.lastUpdateTimestamp = deserializeString().let { Instant.fromEpochSeconds(it) }
OUTPUTDESCRIPTIONS_DESCRIPTOR.index -> builder.outputDescriptions =
deserializer.deserializeList(OUTPUTDESCRIPTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeOutputDescriptionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
REFERENCEDATASOURCEDESCRIPTIONS_DESCRIPTOR.index -> builder.referenceDataSourceDescriptions =
deserializer.deserializeList(REFERENCEDATASOURCEDESCRIPTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeReferenceDataSourceDescriptionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy