commonMain.aws.sdk.kotlin.services.amplifybackend.serde.BackendJobRespObjDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amplifybackend-jvm Show documentation
Show all versions of amplifybackend-jvm Show documentation
The AWS SDK for Kotlin client for AmplifyBackend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.amplifybackend.serde
import aws.sdk.kotlin.services.amplifybackend.model.BackendJobRespObj
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 deserializeBackendJobRespObjDocument(deserializer: Deserializer): BackendJobRespObj {
val builder = BackendJobRespObj.Builder()
val APPID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("appId"))
val BACKENDENVIRONMENTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("backendEnvironmentName"))
val CREATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("createTime"))
val ERROR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("error"))
val JOBID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("jobId"))
val OPERATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("operation"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("status"))
val UPDATETIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("updateTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(APPID_DESCRIPTOR)
field(BACKENDENVIRONMENTNAME_DESCRIPTOR)
field(CREATETIME_DESCRIPTOR)
field(ERROR_DESCRIPTOR)
field(JOBID_DESCRIPTOR)
field(OPERATION_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(UPDATETIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
APPID_DESCRIPTOR.index -> builder.appId = deserializeString()
BACKENDENVIRONMENTNAME_DESCRIPTOR.index -> builder.backendEnvironmentName = deserializeString()
CREATETIME_DESCRIPTOR.index -> builder.createTime = deserializeString()
ERROR_DESCRIPTOR.index -> builder.error = deserializeString()
JOBID_DESCRIPTOR.index -> builder.jobId = deserializeString()
OPERATION_DESCRIPTOR.index -> builder.operation = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
UPDATETIME_DESCRIPTOR.index -> builder.updateTime = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}