commonMain.aws.sdk.kotlin.services.outposts.serde.CapacityTaskSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of outposts-jvm Show documentation
Show all versions of outposts-jvm Show documentation
The AWS SDK for Kotlin client for Outposts
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.outposts.serde
import aws.sdk.kotlin.services.outposts.model.CapacityTaskStatus
import aws.sdk.kotlin.services.outposts.model.CapacityTaskSummary
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 deserializeCapacityTaskSummaryDocument(deserializer: Deserializer): CapacityTaskSummary {
val builder = CapacityTaskSummary.Builder()
val CAPACITYTASKID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CapacityTaskId"))
val CAPACITYTASKSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("CapacityTaskStatus"))
val COMPLETIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CompletionDate"))
val CREATIONDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreationDate"))
val LASTMODIFIEDDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastModifiedDate"))
val ORDERID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OrderId"))
val OUTPOSTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OutpostId"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CAPACITYTASKID_DESCRIPTOR)
field(CAPACITYTASKSTATUS_DESCRIPTOR)
field(COMPLETIONDATE_DESCRIPTOR)
field(CREATIONDATE_DESCRIPTOR)
field(LASTMODIFIEDDATE_DESCRIPTOR)
field(ORDERID_DESCRIPTOR)
field(OUTPOSTID_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CAPACITYTASKID_DESCRIPTOR.index -> builder.capacityTaskId = deserializeString()
CAPACITYTASKSTATUS_DESCRIPTOR.index -> builder.capacityTaskStatus = deserializeString().let { CapacityTaskStatus.fromValue(it) }
COMPLETIONDATE_DESCRIPTOR.index -> builder.completionDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
CREATIONDATE_DESCRIPTOR.index -> builder.creationDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
LASTMODIFIEDDATE_DESCRIPTOR.index -> builder.lastModifiedDate = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
ORDERID_DESCRIPTOR.index -> builder.orderId = deserializeString()
OUTPOSTID_DESCRIPTOR.index -> builder.outpostId = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy