All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.comprehend.serde.DatasetInputDataConfigDocumentSerializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.37
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.comprehend.serde

import aws.sdk.kotlin.services.comprehend.model.DatasetInputDataConfig
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 serializeDatasetInputDataConfigDocument(serializer: Serializer, input: DatasetInputDataConfig) {
    val AUGMENTEDMANIFESTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("AugmentedManifests"))
    val DATAFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("DataFormat"))
    val DOCUMENTCLASSIFIERINPUTDATACONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DocumentClassifierInputDataConfig"))
    val ENTITYRECOGNIZERINPUTDATACONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("EntityRecognizerInputDataConfig"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AUGMENTEDMANIFESTS_DESCRIPTOR)
        field(DATAFORMAT_DESCRIPTOR)
        field(DOCUMENTCLASSIFIERINPUTDATACONFIG_DESCRIPTOR)
        field(ENTITYRECOGNIZERINPUTDATACONFIG_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        if (input.augmentedManifests != null) {
            listField(AUGMENTEDMANIFESTS_DESCRIPTOR) {
                for (el0 in input.augmentedManifests) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeDatasetAugmentedManifestsListItemDocument))
                }
            }
        }
        input.dataFormat?.let { field(DATAFORMAT_DESCRIPTOR, it.value) }
        input.documentClassifierInputDataConfig?.let { field(DOCUMENTCLASSIFIERINPUTDATACONFIG_DESCRIPTOR, it, ::serializeDatasetDocumentClassifierInputDataConfigDocument) }
        input.entityRecognizerInputDataConfig?.let { field(ENTITYRECOGNIZERINPUTDATACONFIG_DESCRIPTOR, it, ::serializeDatasetEntityRecognizerInputDataConfigDocument) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy