commonMain.aws.sdk.kotlin.services.iotfleetwise.serde.NetworkInterfaceDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotfleetwise-jvm Show documentation
Show all versions of iotfleetwise-jvm Show documentation
The AWS SDK for Kotlin client for IoTFleetWise
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotfleetwise.serde
import aws.sdk.kotlin.services.iotfleetwise.model.NetworkInterface
import aws.sdk.kotlin.services.iotfleetwise.model.NetworkInterfaceType
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 deserializeNetworkInterfaceDocument(deserializer: Deserializer): NetworkInterface {
val builder = NetworkInterface.Builder()
val CANINTERFACE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("canInterface"))
val INTERFACEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("interfaceId"))
val OBDINTERFACE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("obdInterface"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("type"))
val VEHICLEMIDDLEWARE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("vehicleMiddleware"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CANINTERFACE_DESCRIPTOR)
field(INTERFACEID_DESCRIPTOR)
field(OBDINTERFACE_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(VEHICLEMIDDLEWARE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CANINTERFACE_DESCRIPTOR.index -> builder.canInterface = deserializeCanInterfaceDocument(deserializer)
INTERFACEID_DESCRIPTOR.index -> builder.interfaceId = deserializeString()
OBDINTERFACE_DESCRIPTOR.index -> builder.obdInterface = deserializeObdInterfaceDocument(deserializer)
TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { NetworkInterfaceType.fromValue(it) }
VEHICLEMIDDLEWARE_DESCRIPTOR.index -> builder.vehicleMiddleware = deserializeVehicleMiddlewareDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy