commonMain.aws.sdk.kotlin.services.comprehend.serde.EntityRecognizerPropertiesDocumentDeserializer.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.EntityRecognizerProperties
import aws.sdk.kotlin.services.comprehend.model.LanguageCode
import aws.sdk.kotlin.services.comprehend.model.ModelStatus
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 deserializeEntityRecognizerPropertiesDocument(deserializer: Deserializer): EntityRecognizerProperties {
val builder = EntityRecognizerProperties.Builder()
val DATAACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DataAccessRoleArn"))
val ENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("EndTime"))
val ENTITYRECOGNIZERARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EntityRecognizerArn"))
val FLYWHEELARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FlywheelArn"))
val INPUTDATACONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InputDataConfig"))
val LANGUAGECODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("LanguageCode"))
val MESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Message"))
val MODELKMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ModelKmsKeyId"))
val OUTPUTDATACONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("OutputDataConfig"))
val RECOGNIZERMETADATA_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RecognizerMetadata"))
val SOURCEMODELARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SourceModelArn"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Status"))
val SUBMITTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("SubmitTime"))
val TRAININGENDTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("TrainingEndTime"))
val TRAININGSTARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("TrainingStartTime"))
val VERSIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VersionName"))
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(ENTITYRECOGNIZERARN_DESCRIPTOR)
field(FLYWHEELARN_DESCRIPTOR)
field(INPUTDATACONFIG_DESCRIPTOR)
field(LANGUAGECODE_DESCRIPTOR)
field(MESSAGE_DESCRIPTOR)
field(MODELKMSKEYID_DESCRIPTOR)
field(OUTPUTDATACONFIG_DESCRIPTOR)
field(RECOGNIZERMETADATA_DESCRIPTOR)
field(SOURCEMODELARN_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(SUBMITTIME_DESCRIPTOR)
field(TRAININGENDTIME_DESCRIPTOR)
field(TRAININGSTARTTIME_DESCRIPTOR)
field(VERSIONNAME_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)
ENTITYRECOGNIZERARN_DESCRIPTOR.index -> builder.entityRecognizerArn = deserializeString()
FLYWHEELARN_DESCRIPTOR.index -> builder.flywheelArn = deserializeString()
INPUTDATACONFIG_DESCRIPTOR.index -> builder.inputDataConfig = deserializeEntityRecognizerInputDataConfigDocument(deserializer)
LANGUAGECODE_DESCRIPTOR.index -> builder.languageCode = deserializeString().let { LanguageCode.fromValue(it) }
MESSAGE_DESCRIPTOR.index -> builder.message = deserializeString()
MODELKMSKEYID_DESCRIPTOR.index -> builder.modelKmsKeyId = deserializeString()
OUTPUTDATACONFIG_DESCRIPTOR.index -> builder.outputDataConfig = deserializeEntityRecognizerOutputDataConfigDocument(deserializer)
RECOGNIZERMETADATA_DESCRIPTOR.index -> builder.recognizerMetadata = deserializeEntityRecognizerMetadataDocument(deserializer)
SOURCEMODELARN_DESCRIPTOR.index -> builder.sourceModelArn = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString().let { ModelStatus.fromValue(it) }
SUBMITTIME_DESCRIPTOR.index -> builder.submitTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
TRAININGENDTIME_DESCRIPTOR.index -> builder.trainingEndTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
TRAININGSTARTTIME_DESCRIPTOR.index -> builder.trainingStartTime = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
VERSIONNAME_DESCRIPTOR.index -> builder.versionName = deserializeString()
VOLUMEKMSKEYID_DESCRIPTOR.index -> builder.volumeKmsKeyId = deserializeString()
VPCCONFIG_DESCRIPTOR.index -> builder.vpcConfig = deserializeVpcConfigDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}