commonMain.aws.sdk.kotlin.services.iotfleetwise.serde.SensorDocumentSerializer.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.Sensor
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 serializeSensorDocument(serializer: Serializer, input: Sensor) {
val ALLOWEDVALUES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("allowedValues"))
val COMMENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("comment"))
val DATATYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("dataType"))
val DEPRECATIONMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("deprecationMessage"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
val FULLYQUALIFIEDNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("fullyQualifiedName"))
val MAX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("max"))
val MIN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Double, JsonSerialName("min"))
val STRUCTFULLYQUALIFIEDNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("structFullyQualifiedName"))
val UNIT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("unit"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ALLOWEDVALUES_DESCRIPTOR)
field(COMMENT_DESCRIPTOR)
field(DATATYPE_DESCRIPTOR)
field(DEPRECATIONMESSAGE_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(FULLYQUALIFIEDNAME_DESCRIPTOR)
field(MAX_DESCRIPTOR)
field(MIN_DESCRIPTOR)
field(STRUCTFULLYQUALIFIEDNAME_DESCRIPTOR)
field(UNIT_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(FULLYQUALIFIEDNAME_DESCRIPTOR, input.fullyQualifiedName)
field(DATATYPE_DESCRIPTOR, input.dataType.value)
input.description?.let { field(DESCRIPTION_DESCRIPTOR, it) }
input.unit?.let { field(UNIT_DESCRIPTOR, it) }
if (input.allowedValues != null) {
listField(ALLOWEDVALUES_DESCRIPTOR) {
for (el0 in input.allowedValues) {
serializeString(el0)
}
}
}
input.min?.let { field(MIN_DESCRIPTOR, it) }
input.max?.let { field(MAX_DESCRIPTOR, it) }
input.deprecationMessage?.let { field(DEPRECATIONMESSAGE_DESCRIPTOR, it) }
input.comment?.let { field(COMMENT_DESCRIPTOR, it) }
input.structFullyQualifiedName?.let { field(STRUCTFULLYQUALIFIEDNAME_DESCRIPTOR, it) }
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy