commonMain.aws.sdk.kotlin.services.iotwireless.serde.WirelessDeviceStatisticsDocumentDeserializer.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.FuotaDeviceStatus
import aws.sdk.kotlin.services.iotwireless.model.WirelessDeviceStatistics
import aws.sdk.kotlin.services.iotwireless.model.WirelessDeviceType
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 deserializeWirelessDeviceStatisticsDocument(deserializer: Deserializer): WirelessDeviceStatistics {
val builder = WirelessDeviceStatistics.Builder()
val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Arn"))
val DESTINATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DestinationName"))
val FUOTADEVICESTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("FuotaDeviceStatus"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Id"))
val LASTUPLINKRECEIVEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LastUplinkReceivedAt"))
val LORAWAN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LoRaWAN"))
val MCGROUPID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("McGroupId"))
val MULTICASTDEVICESTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MulticastDeviceStatus"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val SIDEWALK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Sidewalk"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Type"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ARN_DESCRIPTOR)
field(DESTINATIONNAME_DESCRIPTOR)
field(FUOTADEVICESTATUS_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(LASTUPLINKRECEIVEDAT_DESCRIPTOR)
field(LORAWAN_DESCRIPTOR)
field(MCGROUPID_DESCRIPTOR)
field(MULTICASTDEVICESTATUS_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(SIDEWALK_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
DESTINATIONNAME_DESCRIPTOR.index -> builder.destinationName = deserializeString()
FUOTADEVICESTATUS_DESCRIPTOR.index -> builder.fuotaDeviceStatus = deserializeString().let { FuotaDeviceStatus.fromValue(it) }
ID_DESCRIPTOR.index -> builder.id = deserializeString()
LASTUPLINKRECEIVEDAT_DESCRIPTOR.index -> builder.lastUplinkReceivedAt = deserializeString()
LORAWAN_DESCRIPTOR.index -> builder.loRaWan = deserializeLoRaWanListDeviceDocument(deserializer)
MCGROUPID_DESCRIPTOR.index -> builder.mcGroupId = deserializeInt()
MULTICASTDEVICESTATUS_DESCRIPTOR.index -> builder.multicastDeviceStatus = deserializeString()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
SIDEWALK_DESCRIPTOR.index -> builder.sidewalk = deserializeSidewalkListDeviceDocument(deserializer)
TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { WirelessDeviceType.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy