All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.iotwireless.serde.CdmaObjDocumentSerializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotwireless.serde

import aws.sdk.kotlin.services.iotwireless.model.CdmaObj
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.Serializer
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 serializeCdmaObjDocument(serializer: Serializer, input: CdmaObj) {
    val BASELAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Float, JsonSerialName("BaseLat"))
    val BASELNG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Float, JsonSerialName("BaseLng"))
    val BASESTATIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("BaseStationId"))
    val CDMALOCALID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("CdmaLocalId"))
    val CDMANMR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("CdmaNmr"))
    val NETWORKID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("NetworkId"))
    val PILOTPOWER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("PilotPower"))
    val REGISTRATIONZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("RegistrationZone"))
    val SYSTEMID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("SystemId"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BASELAT_DESCRIPTOR)
        field(BASELNG_DESCRIPTOR)
        field(BASESTATIONID_DESCRIPTOR)
        field(CDMALOCALID_DESCRIPTOR)
        field(CDMANMR_DESCRIPTOR)
        field(NETWORKID_DESCRIPTOR)
        field(PILOTPOWER_DESCRIPTOR)
        field(REGISTRATIONZONE_DESCRIPTOR)
        field(SYSTEMID_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(SYSTEMID_DESCRIPTOR, input.systemId)
        field(NETWORKID_DESCRIPTOR, input.networkId)
        field(BASESTATIONID_DESCRIPTOR, input.baseStationId)
        input.registrationZone?.let { field(REGISTRATIONZONE_DESCRIPTOR, it) }
        input.cdmaLocalId?.let { field(CDMALOCALID_DESCRIPTOR, it, ::serializeCdmaLocalIdDocument) }
        input.pilotPower?.let { field(PILOTPOWER_DESCRIPTOR, it) }
        input.baseLat?.let { field(BASELAT_DESCRIPTOR, it) }
        input.baseLng?.let { field(BASELNG_DESCRIPTOR, it) }
        if (input.cdmaNmr != null) {
            listField(CDMANMR_DESCRIPTOR) {
                for (el0 in input.cdmaNmr) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeCdmaNmrObjDocument))
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy