commonMain.aws.sdk.kotlin.services.iotwireless.serde.LoRaWanDeviceProfileDocumentDeserializer.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.LoRaWanDeviceProfile
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 deserializeLoRaWanDeviceProfileDocument(deserializer: Deserializer): LoRaWanDeviceProfile {
val builder = LoRaWanDeviceProfile.Builder()
val CLASSBTIMEOUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("ClassBTimeout"))
val CLASSCTIMEOUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("ClassCTimeout"))
val FACTORYPRESETFREQSLIST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("FactoryPresetFreqsList"))
val MACVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MacVersion"))
val MAXDUTYCYCLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxDutyCycle"))
val MAXEIRP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxEirp"))
val PINGSLOTDR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("PingSlotDr"))
val PINGSLOTFREQ_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("PingSlotFreq"))
val PINGSLOTPERIOD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("PingSlotPeriod"))
val REGPARAMSREVISION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RegParamsRevision"))
val RFREGION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RfRegion"))
val RXDATARATE2_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("RxDataRate2"))
val RXDELAY1_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("RxDelay1"))
val RXDROFFSET1_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("RxDrOffset1"))
val RXFREQ2_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("RxFreq2"))
val SUPPORTS32BITFCNT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("Supports32BitFCnt"))
val SUPPORTSCLASSB_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("SupportsClassB"))
val SUPPORTSCLASSC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("SupportsClassC"))
val SUPPORTSJOIN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("SupportsJoin"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CLASSBTIMEOUT_DESCRIPTOR)
field(CLASSCTIMEOUT_DESCRIPTOR)
field(FACTORYPRESETFREQSLIST_DESCRIPTOR)
field(MACVERSION_DESCRIPTOR)
field(MAXDUTYCYCLE_DESCRIPTOR)
field(MAXEIRP_DESCRIPTOR)
field(PINGSLOTDR_DESCRIPTOR)
field(PINGSLOTFREQ_DESCRIPTOR)
field(PINGSLOTPERIOD_DESCRIPTOR)
field(REGPARAMSREVISION_DESCRIPTOR)
field(RFREGION_DESCRIPTOR)
field(RXDATARATE2_DESCRIPTOR)
field(RXDELAY1_DESCRIPTOR)
field(RXDROFFSET1_DESCRIPTOR)
field(RXFREQ2_DESCRIPTOR)
field(SUPPORTS32BITFCNT_DESCRIPTOR)
field(SUPPORTSCLASSB_DESCRIPTOR)
field(SUPPORTSCLASSC_DESCRIPTOR)
field(SUPPORTSJOIN_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CLASSBTIMEOUT_DESCRIPTOR.index -> builder.classBTimeout = deserializeInt()
CLASSCTIMEOUT_DESCRIPTOR.index -> builder.classCTimeout = deserializeInt()
FACTORYPRESETFREQSLIST_DESCRIPTOR.index -> builder.factoryPresetFreqsList =
deserializer.deserializeList(FACTORYPRESETFREQSLIST_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeInt() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
MACVERSION_DESCRIPTOR.index -> builder.macVersion = deserializeString()
MAXDUTYCYCLE_DESCRIPTOR.index -> builder.maxDutyCycle = deserializeInt()
MAXEIRP_DESCRIPTOR.index -> builder.maxEirp = deserializeInt()
PINGSLOTDR_DESCRIPTOR.index -> builder.pingSlotDr = deserializeInt()
PINGSLOTFREQ_DESCRIPTOR.index -> builder.pingSlotFreq = deserializeInt()
PINGSLOTPERIOD_DESCRIPTOR.index -> builder.pingSlotPeriod = deserializeInt()
REGPARAMSREVISION_DESCRIPTOR.index -> builder.regParamsRevision = deserializeString()
RFREGION_DESCRIPTOR.index -> builder.rfRegion = deserializeString()
RXDATARATE2_DESCRIPTOR.index -> builder.rxDataRate2 = deserializeInt()
RXDELAY1_DESCRIPTOR.index -> builder.rxDelay1 = deserializeInt()
RXDROFFSET1_DESCRIPTOR.index -> builder.rxDrOffset1 = deserializeInt()
RXFREQ2_DESCRIPTOR.index -> builder.rxFreq2 = deserializeInt()
SUPPORTS32BITFCNT_DESCRIPTOR.index -> builder.supports32BitFCnt = deserializeBoolean()
SUPPORTSCLASSB_DESCRIPTOR.index -> builder.supportsClassB = deserializeBoolean()
SUPPORTSCLASSC_DESCRIPTOR.index -> builder.supportsClassC = deserializeBoolean()
SUPPORTSJOIN_DESCRIPTOR.index -> builder.supportsJoin = deserializeBoolean()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy