commonMain.aws.sdk.kotlin.services.iotfleetwise.serde.TimestreamRegistrationResponseDocumentDeserializer.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.RegistrationStatus
import aws.sdk.kotlin.services.iotfleetwise.model.TimestreamRegistrationResponse
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 deserializeTimestreamRegistrationResponseDocument(deserializer: Deserializer): TimestreamRegistrationResponse {
val builder = TimestreamRegistrationResponse.Builder()
val ERRORMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("errorMessage"))
val REGISTRATIONSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("registrationStatus"))
val TIMESTREAMDATABASEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("timestreamDatabaseArn"))
val TIMESTREAMDATABASENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("timestreamDatabaseName"))
val TIMESTREAMTABLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("timestreamTableArn"))
val TIMESTREAMTABLENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("timestreamTableName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ERRORMESSAGE_DESCRIPTOR)
field(REGISTRATIONSTATUS_DESCRIPTOR)
field(TIMESTREAMDATABASEARN_DESCRIPTOR)
field(TIMESTREAMDATABASENAME_DESCRIPTOR)
field(TIMESTREAMTABLEARN_DESCRIPTOR)
field(TIMESTREAMTABLENAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ERRORMESSAGE_DESCRIPTOR.index -> builder.errorMessage = deserializeString()
REGISTRATIONSTATUS_DESCRIPTOR.index -> builder.registrationStatus = deserializeString().let { RegistrationStatus.fromValue(it) }
TIMESTREAMDATABASEARN_DESCRIPTOR.index -> builder.timestreamDatabaseArn = deserializeString()
TIMESTREAMDATABASENAME_DESCRIPTOR.index -> builder.timestreamDatabaseName = deserializeString()
TIMESTREAMTABLEARN_DESCRIPTOR.index -> builder.timestreamTableArn = deserializeString()
TIMESTREAMTABLENAME_DESCRIPTOR.index -> builder.timestreamTableName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy