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

commonMain.aws.sdk.kotlin.services.iotfleetwise.serde.ObdInterfaceDocumentSerializer.kt Maven / Gradle / Ivy

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.ObdInterface
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 serializeObdInterfaceDocument(serializer: Serializer, input: ObdInterface) {
    val DTCREQUESTINTERVALSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("dtcRequestIntervalSeconds"))
    val HASTRANSMISSIONECU_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("hasTransmissionEcu"))
    val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
    val OBDSTANDARD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("obdStandard"))
    val PIDREQUESTINTERVALSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("pidRequestIntervalSeconds"))
    val REQUESTMESSAGEID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("requestMessageId"))
    val USEEXTENDEDIDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("useExtendedIds"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(DTCREQUESTINTERVALSECONDS_DESCRIPTOR)
        field(HASTRANSMISSIONECU_DESCRIPTOR)
        field(NAME_DESCRIPTOR)
        field(OBDSTANDARD_DESCRIPTOR)
        field(PIDREQUESTINTERVALSECONDS_DESCRIPTOR)
        field(REQUESTMESSAGEID_DESCRIPTOR)
        field(USEEXTENDEDIDS_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(NAME_DESCRIPTOR, input.name)
        field(REQUESTMESSAGEID_DESCRIPTOR, input.requestMessageId)
        input.obdStandard?.let { field(OBDSTANDARD_DESCRIPTOR, it) }
        if (input.pidRequestIntervalSeconds != 0) field(PIDREQUESTINTERVALSECONDS_DESCRIPTOR, input.pidRequestIntervalSeconds)
        if (input.dtcRequestIntervalSeconds != 0) field(DTCREQUESTINTERVALSECONDS_DESCRIPTOR, input.dtcRequestIntervalSeconds)
        if (input.useExtendedIds != false) field(USEEXTENDEDIDS_DESCRIPTOR, input.useExtendedIds)
        if (input.hasTransmissionEcu != false) field(HASTRANSMISSIONECU_DESCRIPTOR, input.hasTransmissionEcu)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy