commonMain.aws.sdk.kotlin.services.applicationdiscoveryservice.serde.ExportInfoDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of applicationdiscoveryservice-jvm Show documentation
Show all versions of applicationdiscoveryservice-jvm Show documentation
The AWS SDK for Kotlin client for Application Discovery Service
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.applicationdiscoveryservice.serde
import aws.sdk.kotlin.services.applicationdiscoveryservice.model.ExportInfo
import aws.sdk.kotlin.services.applicationdiscoveryservice.model.ExportStatus
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
import aws.smithy.kotlin.runtime.time.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat
internal fun deserializeExportInfoDocument(deserializer: Deserializer): ExportInfo {
val builder = ExportInfo.Builder()
val CONFIGURATIONSDOWNLOADURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("configurationsDownloadUrl"))
val EXPORTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("exportId"))
val EXPORTREQUESTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("exportRequestTime"))
val EXPORTSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("exportStatus"))
val ISTRUNCATED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("isTruncated"))
val REQUESTEDENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("requestedEndTime"))
val REQUESTEDSTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("requestedStartTime"))
val STATUSMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("statusMessage"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CONFIGURATIONSDOWNLOADURL_DESCRIPTOR)
field(EXPORTID_DESCRIPTOR)
field(EXPORTREQUESTTIME_DESCRIPTOR)
field(EXPORTSTATUS_DESCRIPTOR)
field(ISTRUNCATED_DESCRIPTOR)
field(REQUESTEDENDTIME_DESCRIPTOR)
field(REQUESTEDSTARTTIME_DESCRIPTOR)
field(STATUSMESSAGE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CONFIGURATIONSDOWNLOADURL_DESCRIPTOR.index -> builder.configurationsDownloadUrl = deserializeString()
EXPORTID_DESCRIPTOR.index -> builder.exportId = deserializeString()
EXPORTREQUESTTIME_DESCRIPTOR.index -> builder.exportRequestTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
EXPORTSTATUS_DESCRIPTOR.index -> builder.exportStatus = deserializeString().let { ExportStatus.fromValue(it) }
ISTRUNCATED_DESCRIPTOR.index -> builder.isTruncated = deserializeBoolean()
REQUESTEDENDTIME_DESCRIPTOR.index -> builder.requestedEndTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
REQUESTEDSTARTTIME_DESCRIPTOR.index -> builder.requestedStartTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
STATUSMESSAGE_DESCRIPTOR.index -> builder.statusMessage = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy