commonMain.aws.sdk.kotlin.services.comprehend.serde.DocumentClassifierInputDataConfigDocumentSerializer.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.DocumentClassifierInputDataConfig
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.Serializer
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
internal fun serializeDocumentClassifierInputDataConfigDocument(serializer: Serializer, input: DocumentClassifierInputDataConfig) {
val AUGMENTEDMANIFESTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("AugmentedManifests"))
val DATAFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DataFormat"))
val DOCUMENTREADERCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DocumentReaderConfig"))
val DOCUMENTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DocumentType"))
val DOCUMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Documents"))
val LABELDELIMITER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LabelDelimiter"))
val S3URI_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("S3Uri"))
val TESTS3URI_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TestS3Uri"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AUGMENTEDMANIFESTS_DESCRIPTOR)
field(DATAFORMAT_DESCRIPTOR)
field(DOCUMENTREADERCONFIG_DESCRIPTOR)
field(DOCUMENTTYPE_DESCRIPTOR)
field(DOCUMENTS_DESCRIPTOR)
field(LABELDELIMITER_DESCRIPTOR)
field(S3URI_DESCRIPTOR)
field(TESTS3URI_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.dataFormat?.let { field(DATAFORMAT_DESCRIPTOR, it.value) }
input.s3Uri?.let { field(S3URI_DESCRIPTOR, it) }
input.testS3Uri?.let { field(TESTS3URI_DESCRIPTOR, it) }
input.labelDelimiter?.let { field(LABELDELIMITER_DESCRIPTOR, it) }
if (input.augmentedManifests != null) {
listField(AUGMENTEDMANIFESTS_DESCRIPTOR) {
for (el0 in input.augmentedManifests) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializeAugmentedManifestsListItemDocument))
}
}
}
input.documentType?.let { field(DOCUMENTTYPE_DESCRIPTOR, it.value) }
input.documents?.let { field(DOCUMENTS_DESCRIPTOR, it, ::serializeDocumentClassifierDocumentsDocument) }
input.documentReaderConfig?.let { field(DOCUMENTREADERCONFIG_DESCRIPTOR, it, ::serializeDocumentReaderConfigDocument) }
}
}