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

commonMain.aws.sdk.kotlin.services.cloudsearch.serde.IndexFieldDocumentSerializer.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.serde

import aws.sdk.kotlin.services.cloudsearch.model.IndexField
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 serializeIndexFieldDocument(serializer: Serializer, input: IndexField) {
    val DATEARRAYOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("DateArrayOptions"))
    val DATEOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("DateOptions"))
    val DOUBLEARRAYOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("DoubleArrayOptions"))
    val DOUBLEOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("DoubleOptions"))
    val INDEXFIELDNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, FormUrlSerialName("IndexFieldName"))
    val INDEXFIELDTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, FormUrlSerialName("IndexFieldType"))
    val INTARRAYOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("IntArrayOptions"))
    val INTOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("IntOptions"))
    val LATLONOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("LatLonOptions"))
    val LITERALARRAYOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("LiteralArrayOptions"))
    val LITERALOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("LiteralOptions"))
    val TEXTARRAYOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("TextArrayOptions"))
    val TEXTOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, FormUrlSerialName("TextOptions"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        trait(FormUrlSerialName("IndexField"))
        field(DATEARRAYOPTIONS_DESCRIPTOR)
        field(DATEOPTIONS_DESCRIPTOR)
        field(DOUBLEARRAYOPTIONS_DESCRIPTOR)
        field(DOUBLEOPTIONS_DESCRIPTOR)
        field(INDEXFIELDNAME_DESCRIPTOR)
        field(INDEXFIELDTYPE_DESCRIPTOR)
        field(INTARRAYOPTIONS_DESCRIPTOR)
        field(INTOPTIONS_DESCRIPTOR)
        field(LATLONOPTIONS_DESCRIPTOR)
        field(LITERALARRAYOPTIONS_DESCRIPTOR)
        field(LITERALOPTIONS_DESCRIPTOR)
        field(TEXTARRAYOPTIONS_DESCRIPTOR)
        field(TEXTOPTIONS_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        field(INDEXFIELDNAME_DESCRIPTOR, input.indexFieldName)
        field(INDEXFIELDTYPE_DESCRIPTOR, input.indexFieldType.value)
        input.intOptions?.let { field(INTOPTIONS_DESCRIPTOR, it, ::serializeIntOptionsDocument) }
        input.doubleOptions?.let { field(DOUBLEOPTIONS_DESCRIPTOR, it, ::serializeDoubleOptionsDocument) }
        input.literalOptions?.let { field(LITERALOPTIONS_DESCRIPTOR, it, ::serializeLiteralOptionsDocument) }
        input.textOptions?.let { field(TEXTOPTIONS_DESCRIPTOR, it, ::serializeTextOptionsDocument) }
        input.dateOptions?.let { field(DATEOPTIONS_DESCRIPTOR, it, ::serializeDateOptionsDocument) }
        input.latLonOptions?.let { field(LATLONOPTIONS_DESCRIPTOR, it, ::serializeLatLonOptionsDocument) }
        input.intArrayOptions?.let { field(INTARRAYOPTIONS_DESCRIPTOR, it, ::serializeIntArrayOptionsDocument) }
        input.doubleArrayOptions?.let { field(DOUBLEARRAYOPTIONS_DESCRIPTOR, it, ::serializeDoubleArrayOptionsDocument) }
        input.literalArrayOptions?.let { field(LITERALARRAYOPTIONS_DESCRIPTOR, it, ::serializeLiteralArrayOptionsDocument) }
        input.textArrayOptions?.let { field(TEXTARRAYOPTIONS_DESCRIPTOR, it, ::serializeTextArrayOptionsDocument) }
        input.dateArrayOptions?.let { field(DATEARRAYOPTIONS_DESCRIPTOR, it, ::serializeDateArrayOptionsDocument) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy