commonMain.aws.sdk.kotlin.services.comprehend.serde.TopicsDetectionJobPropertiesDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of comprehend-jvm Show documentation
Show all versions of comprehend-jvm Show documentation
The AWS SDK for Kotlin client for Comprehend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.serde
import aws.sdk.kotlin.services.comprehend.model.JobStatus
import aws.sdk.kotlin.services.comprehend.model.TopicsDetectionJobProperties
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 deserializeTopicsDetectionJobPropertiesDocument(deserializer: Deserializer): TopicsDetectionJobProperties {
val builder = TopicsDetectionJobProperties.Builder()
val DATAACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DataAccessRoleArn"))
val ENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("EndTime"))
val INPUTDATACONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InputDataConfig"))
val JOBARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobArn"))
val JOBID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobId"))
val JOBNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("JobName"))
val JOBSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("JobStatus"))
val MESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Message"))
val NUMBEROFTOPICS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("NumberOfTopics"))
val OUTPUTDATACONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("OutputDataConfig"))
val SUBMITTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("SubmitTime"))
val VOLUMEKMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VolumeKmsKeyId"))
val VPCCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("VpcConfig"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DATAACCESSROLEARN_DESCRIPTOR)
field(ENDTIME_DESCRIPTOR)
field(INPUTDATACONFIG_DESCRIPTOR)
field(JOBARN_DESCRIPTOR)
field(JOBID_DESCRIPTOR)
field(JOBNAME_DESCRIPTOR)
field(JOBSTATUS_DESCRIPTOR)
field(MESSAGE_DESCRIPTOR)
field(NUMBEROFTOPICS_DESCRIPTOR)
field(OUTPUTDATACONFIG_DESCRIPTOR)
field(SUBMITTIME_DESCRIPTOR)
field(VOLUMEKMSKEYID_DESCRIPTOR)
field(VPCCONFIG_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
DATAACCESSROLEARN_DESCRIPTOR.index -> builder.dataAccessRoleArn = deserializeString()
ENDTIME_DESCRIPTOR.index -> builder.endTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
INPUTDATACONFIG_DESCRIPTOR.index -> builder.inputDataConfig = deserializeInputDataConfigDocument(deserializer)
JOBARN_DESCRIPTOR.index -> builder.jobArn = deserializeString()
JOBID_DESCRIPTOR.index -> builder.jobId = deserializeString()
JOBNAME_DESCRIPTOR.index -> builder.jobName = deserializeString()
JOBSTATUS_DESCRIPTOR.index -> builder.jobStatus = deserializeString().let { JobStatus.fromValue(it) }
MESSAGE_DESCRIPTOR.index -> builder.message = deserializeString()
NUMBEROFTOPICS_DESCRIPTOR.index -> builder.numberOfTopics = deserializeInt()
OUTPUTDATACONFIG_DESCRIPTOR.index -> builder.outputDataConfig = deserializeOutputDataConfigDocument(deserializer)
SUBMITTIME_DESCRIPTOR.index -> builder.submitTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
VOLUMEKMSKEYID_DESCRIPTOR.index -> builder.volumeKmsKeyId = deserializeString()
VPCCONFIG_DESCRIPTOR.index -> builder.vpcConfig = deserializeVpcConfigDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}