commonMain.aws.sdk.kotlin.services.databrew.serde.JobRunDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databrew-jvm Show documentation
Show all versions of databrew-jvm Show documentation
The AWS Kotlin client for DataBrew
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databrew.serde
import aws.sdk.kotlin.services.databrew.model.DataCatalogOutput
import aws.sdk.kotlin.services.databrew.model.DatabaseOutput
import aws.sdk.kotlin.services.databrew.model.JobRun
import aws.sdk.kotlin.services.databrew.model.JobRunState
import aws.sdk.kotlin.services.databrew.model.LogSubscription
import aws.sdk.kotlin.services.databrew.model.Output
import aws.sdk.kotlin.services.databrew.model.ValidationConfiguration
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 kotlin.collections.mutableListOf
internal fun deserializeJobRunDocument(deserializer: Deserializer): JobRun {
val builder = JobRun.Builder()
val ATTEMPT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Attempt"))
val COMPLETEDON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CompletedOn"))
val DATACATALOGOUTPUTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("DataCatalogOutputs"))
val DATABASEOUTPUTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("DatabaseOutputs"))
val DATASETNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatasetName"))
val ERRORMESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ErrorMessage"))
val EXECUTIONTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("ExecutionTime"))
val JOBNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobName"))
val JOBSAMPLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("JobSample"))
val LOGGROUPNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LogGroupName"))
val LOGSUBSCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("LogSubscription"))
val OUTPUTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Outputs"))
val RECIPEREFERENCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RecipeReference"))
val RUNID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RunId"))
val STARTEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StartedBy"))
val STARTEDON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("StartedOn"))
val STATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("State"))
val VALIDATIONCONFIGURATIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ValidationConfigurations"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ATTEMPT_DESCRIPTOR)
field(COMPLETEDON_DESCRIPTOR)
field(DATACATALOGOUTPUTS_DESCRIPTOR)
field(DATABASEOUTPUTS_DESCRIPTOR)
field(DATASETNAME_DESCRIPTOR)
field(ERRORMESSAGE_DESCRIPTOR)
field(EXECUTIONTIME_DESCRIPTOR)
field(JOBNAME_DESCRIPTOR)
field(JOBSAMPLE_DESCRIPTOR)
field(LOGGROUPNAME_DESCRIPTOR)
field(LOGSUBSCRIPTION_DESCRIPTOR)
field(OUTPUTS_DESCRIPTOR)
field(RECIPEREFERENCE_DESCRIPTOR)
field(RUNID_DESCRIPTOR)
field(STARTEDBY_DESCRIPTOR)
field(STARTEDON_DESCRIPTOR)
field(STATE_DESCRIPTOR)
field(VALIDATIONCONFIGURATIONS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ATTEMPT_DESCRIPTOR.index -> builder.attempt = deserializeInt()
COMPLETEDON_DESCRIPTOR.index -> builder.completedOn = deserializeString().let { Instant.fromEpochSeconds(it) }
DATACATALOGOUTPUTS_DESCRIPTOR.index -> builder.dataCatalogOutputs =
deserializer.deserializeList(DATACATALOGOUTPUTS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeDataCatalogOutputDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DATABASEOUTPUTS_DESCRIPTOR.index -> builder.databaseOutputs =
deserializer.deserializeList(DATABASEOUTPUTS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeDatabaseOutputDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DATASETNAME_DESCRIPTOR.index -> builder.datasetName = deserializeString()
ERRORMESSAGE_DESCRIPTOR.index -> builder.errorMessage = deserializeString()
EXECUTIONTIME_DESCRIPTOR.index -> builder.executionTime = deserializeInt()
JOBNAME_DESCRIPTOR.index -> builder.jobName = deserializeString()
JOBSAMPLE_DESCRIPTOR.index -> builder.jobSample = deserializeJobSampleDocument(deserializer)
LOGGROUPNAME_DESCRIPTOR.index -> builder.logGroupName = deserializeString()
LOGSUBSCRIPTION_DESCRIPTOR.index -> builder.logSubscription = deserializeString().let { LogSubscription.fromValue(it) }
OUTPUTS_DESCRIPTOR.index -> builder.outputs =
deserializer.deserializeList(OUTPUTS_DESCRIPTOR) {
val col0 = mutableListOf
© 2015 - 2025 Weber Informatics LLC | Privacy Policy