commonMain.aws.sdk.kotlin.services.databrew.transform.JobDocumentDeserializer.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.transform
import aws.sdk.kotlin.services.databrew.model.DataCatalogOutput
import aws.sdk.kotlin.services.databrew.model.DatabaseOutput
import aws.sdk.kotlin.services.databrew.model.EncryptionMode
import aws.sdk.kotlin.services.databrew.model.Job
import aws.sdk.kotlin.services.databrew.model.JobType
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
internal fun deserializeJobDocument(deserializer: Deserializer): Job {
val builder = Job.Builder()
val ACCOUNTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AccountId"))
val CREATEDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreateDate"))
val CREATEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CreatedBy"))
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 ENCRYPTIONKEYARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EncryptionKeyArn"))
val ENCRYPTIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EncryptionMode"))
val JOBSAMPLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("JobSample"))
val LASTMODIFIEDBY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LastModifiedBy"))
val LASTMODIFIEDDATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastModifiedDate"))
val LOGSUBSCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LogSubscription"))
val MAXCAPACITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxCapacity"))
val MAXRETRIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("MaxRetries"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val OUTPUTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Outputs"))
val PROJECTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ProjectName"))
val RECIPEREFERENCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RecipeReference"))
val RESOURCEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ResourceArn"))
val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleArn"))
val TAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("Tags"))
val TIMEOUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Timeout"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Type"))
val VALIDATIONCONFIGURATIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("ValidationConfigurations"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ACCOUNTID_DESCRIPTOR)
field(CREATEDATE_DESCRIPTOR)
field(CREATEDBY_DESCRIPTOR)
field(DATACATALOGOUTPUTS_DESCRIPTOR)
field(DATABASEOUTPUTS_DESCRIPTOR)
field(DATASETNAME_DESCRIPTOR)
field(ENCRYPTIONKEYARN_DESCRIPTOR)
field(ENCRYPTIONMODE_DESCRIPTOR)
field(JOBSAMPLE_DESCRIPTOR)
field(LASTMODIFIEDBY_DESCRIPTOR)
field(LASTMODIFIEDDATE_DESCRIPTOR)
field(LOGSUBSCRIPTION_DESCRIPTOR)
field(MAXCAPACITY_DESCRIPTOR)
field(MAXRETRIES_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(OUTPUTS_DESCRIPTOR)
field(PROJECTNAME_DESCRIPTOR)
field(RECIPEREFERENCE_DESCRIPTOR)
field(RESOURCEARN_DESCRIPTOR)
field(ROLEARN_DESCRIPTOR)
field(TAGS_DESCRIPTOR)
field(TIMEOUT_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
field(VALIDATIONCONFIGURATIONS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ACCOUNTID_DESCRIPTOR.index -> builder.accountId = deserializeString()
CREATEDATE_DESCRIPTOR.index -> builder.createDate = deserializeString().let { Instant.fromEpochSeconds(it) }
CREATEDBY_DESCRIPTOR.index -> builder.createdBy = deserializeString()
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()
ENCRYPTIONKEYARN_DESCRIPTOR.index -> builder.encryptionKeyArn = deserializeString()
ENCRYPTIONMODE_DESCRIPTOR.index -> builder.encryptionMode = deserializeString().let { EncryptionMode.fromValue(it) }
JOBSAMPLE_DESCRIPTOR.index -> builder.jobSample = deserializeJobSampleDocument(deserializer)
LASTMODIFIEDBY_DESCRIPTOR.index -> builder.lastModifiedBy = deserializeString()
LASTMODIFIEDDATE_DESCRIPTOR.index -> builder.lastModifiedDate = deserializeString().let { Instant.fromEpochSeconds(it) }
LOGSUBSCRIPTION_DESCRIPTOR.index -> builder.logSubscription = deserializeString().let { LogSubscription.fromValue(it) }
MAXCAPACITY_DESCRIPTOR.index -> builder.maxCapacity = deserializeInt()
MAXRETRIES_DESCRIPTOR.index -> builder.maxRetries = deserializeInt()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
OUTPUTS_DESCRIPTOR.index -> builder.outputs =
deserializer.deserializeList(OUTPUTS_DESCRIPTOR) {
val col0 = mutableListOf
© 2015 - 2025 Weber Informatics LLC | Privacy Policy