commonMain.aws.sdk.kotlin.services.iotwireless.serde.SemtechGnssDetailDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotwireless-jvm Show documentation
Show all versions of iotwireless-jvm Show documentation
The AWS Kotlin client for IoT Wireless
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotwireless.serde
import aws.sdk.kotlin.services.iotwireless.model.PositionConfigurationFec
import aws.sdk.kotlin.services.iotwireless.model.PositionConfigurationStatus
import aws.sdk.kotlin.services.iotwireless.model.PositionSolverProvider
import aws.sdk.kotlin.services.iotwireless.model.PositionSolverType
import aws.sdk.kotlin.services.iotwireless.model.SemtechGnssDetail
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 deserializeSemtechGnssDetailDocument(deserializer: Deserializer): SemtechGnssDetail {
val builder = SemtechGnssDetail.Builder()
val FEC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Fec"))
val PROVIDER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Provider"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Type"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(FEC_DESCRIPTOR)
field(PROVIDER_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
FEC_DESCRIPTOR.index -> builder.fec = deserializeString().let { PositionConfigurationFec.fromValue(it) }
PROVIDER_DESCRIPTOR.index -> builder.provider = deserializeString().let { PositionSolverProvider.fromValue(it) }
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { PositionConfigurationStatus.fromValue(it) }
TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { PositionSolverType.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy