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

commonMain.aws.sdk.kotlin.services.cloudsearch.transform.AnalysisSchemeDocumentSerializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudsearch.transform

import aws.sdk.kotlin.services.cloudsearch.model.AnalysisScheme
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.formurl.FormUrlSerialName
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct

internal fun serializeAnalysisSchemeDocument(serializer: Serializer, input: AnalysisScheme) {
    val ANALYSISOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("AnalysisOptions"))
    val ANALYSISSCHEMELANGUAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, FormUrlSerialName("AnalysisSchemeLanguage"))
    val ANALYSISSCHEMENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, FormUrlSerialName("AnalysisSchemeName"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        trait(FormUrlSerialName("AnalysisScheme"))
        field(ANALYSISOPTIONS_DESCRIPTOR)
        field(ANALYSISSCHEMELANGUAGE_DESCRIPTOR)
        field(ANALYSISSCHEMENAME_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        input.analysisSchemeName?.let { field(ANALYSISSCHEMENAME_DESCRIPTOR, it) }
        input.analysisSchemeLanguage?.let { field(ANALYSISSCHEMELANGUAGE_DESCRIPTOR, it.value) }
        input.analysisOptions?.let { field(ANALYSISOPTIONS_DESCRIPTOR, it, ::serializeAnalysisOptionsDocument) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy