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

commonMain.aws.sdk.kotlin.services.cloudsearch.serde.TextArrayOptionsDocumentDeserializer.kt Maven / Gradle / Ivy

The 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.TextArrayOptions
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parseBoolean
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData

internal fun deserializeTextArrayOptionsDocument(reader: XmlTagReader): TextArrayOptions {
    val builder = TextArrayOptions.Builder()

    loop@while (true) {
        val curr = reader.nextTag() ?: break@loop
        when (curr.tagName) {
            // DefaultValue com.amazonaws.cloudsearch#TextArrayOptions$DefaultValue
            "DefaultValue" -> builder.defaultValue = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.cloudsearch#FieldValue`)" }
            // SourceFields com.amazonaws.cloudsearch#TextArrayOptions$SourceFields
            "SourceFields" -> builder.sourceFields = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.cloudsearch#FieldNameCommaList`)" }
            // ReturnEnabled com.amazonaws.cloudsearch#TextArrayOptions$ReturnEnabled
            "ReturnEnabled" -> builder.returnEnabled = curr.tryData()
                .parseBoolean()
                .getOrDeserializeErr { "expected (boolean: `com.amazonaws.cloudsearch#Boolean`)" }
            // HighlightEnabled com.amazonaws.cloudsearch#TextArrayOptions$HighlightEnabled
            "HighlightEnabled" -> builder.highlightEnabled = curr.tryData()
                .parseBoolean()
                .getOrDeserializeErr { "expected (boolean: `com.amazonaws.cloudsearch#Boolean`)" }
            // AnalysisScheme com.amazonaws.cloudsearch#TextArrayOptions$AnalysisScheme
            "AnalysisScheme" -> builder.analysisScheme = curr.tryData()
                .getOrDeserializeErr { "expected (string: `com.amazonaws.cloudsearch#Word`)" }
            else -> {}
        }
        curr.drop()
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy