commonMain.aws.sdk.kotlin.services.emrserverless.serde.JobRunSummaryDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of emrserverless-jvm Show documentation
Show all versions of emrserverless-jvm Show documentation
The AWS SDK for Kotlin client for EMR Serverless
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.emrserverless.serde
import aws.sdk.kotlin.services.emrserverless.model.JobRunMode
import aws.sdk.kotlin.services.emrserverless.model.JobRunState
import aws.sdk.kotlin.services.emrserverless.model.JobRunSummary
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 deserializeJobRunSummaryDocument(deserializer: Deserializer): JobRunSummary {
val builder = JobRunSummary.Builder()
val APPLICATIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("applicationId"))
val ARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("arn"))
val ATTEMPT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("attempt"))
val ATTEMPTCREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("attemptCreatedAt"))
val ATTEMPTUPDATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("attemptUpdatedAt"))
val CREATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("createdAt"))
val CREATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("createdBy"))
val EXECUTIONROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("executionRole"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("id"))
val MODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("mode"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val RELEASELABEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("releaseLabel"))
val STATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("state"))
val STATEDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("stateDetails"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("type"))
val UPDATEDAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("updatedAt"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(APPLICATIONID_DESCRIPTOR)
field(ARN_DESCRIPTOR)
field(ATTEMPT_DESCRIPTOR)
field(ATTEMPTCREATEDAT_DESCRIPTOR)
field(ATTEMPTUPDATEDAT_DESCRIPTOR)
field(CREATEDAT_DESCRIPTOR)
field(CREATEDBY_DESCRIPTOR)
field(EXECUTIONROLE_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(MODE_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(RELEASELABEL_DESCRIPTOR)
field(STATE_DESCRIPTOR)
field(STATEDETAILS_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(UPDATEDAT_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
APPLICATIONID_DESCRIPTOR.index -> builder.applicationId = deserializeString()
ARN_DESCRIPTOR.index -> builder.arn = deserializeString()
ATTEMPT_DESCRIPTOR.index -> builder.attempt = deserializeInt()
ATTEMPTCREATEDAT_DESCRIPTOR.index -> builder.attemptCreatedAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
ATTEMPTUPDATEDAT_DESCRIPTOR.index -> builder.attemptUpdatedAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
CREATEDAT_DESCRIPTOR.index -> builder.createdAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
CREATEDBY_DESCRIPTOR.index -> builder.createdBy = deserializeString()
EXECUTIONROLE_DESCRIPTOR.index -> builder.executionRole = deserializeString()
ID_DESCRIPTOR.index -> builder.id = deserializeString()
MODE_DESCRIPTOR.index -> builder.mode = deserializeString().let { JobRunMode.fromValue(it) }
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
RELEASELABEL_DESCRIPTOR.index -> builder.releaseLabel = deserializeString()
STATE_DESCRIPTOR.index -> builder.state = deserializeString().let { JobRunState.fromValue(it) }
STATEDETAILS_DESCRIPTOR.index -> builder.stateDetails = deserializeString()
TYPE_DESCRIPTOR.index -> builder.type = deserializeString()
UPDATEDAT_DESCRIPTOR.index -> builder.updatedAt = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy