commonMain.aws.sdk.kotlin.services.cloudsearch.serde.IndexFieldDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudsearch-jvm Show documentation
Show all versions of cloudsearch-jvm Show documentation
The AWS SDK for Kotlin client for CloudSearch
// 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.sdk.kotlin.services.cloudsearch.model.IndexFieldType
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parse
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
internal fun deserializeIndexFieldDocument(reader: XmlTagReader): IndexField {
val builder = IndexField.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// IndexFieldName com.amazonaws.cloudsearch#IndexField$IndexFieldName
"IndexFieldName" -> builder.indexFieldName = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.cloudsearch#DynamicFieldName`)" }
// IndexFieldType com.amazonaws.cloudsearch#IndexField$IndexFieldType
"IndexFieldType" -> builder.indexFieldType = curr.tryData()
.parse { IndexFieldType.fromValue(it) }
.getOrDeserializeErr { "expected (enum: `com.amazonaws.cloudsearch#IndexFieldType`)" }
// IntOptions com.amazonaws.cloudsearch#IndexField$IntOptions
"IntOptions" -> builder.intOptions = deserializeIntOptionsDocument(curr)
// DoubleOptions com.amazonaws.cloudsearch#IndexField$DoubleOptions
"DoubleOptions" -> builder.doubleOptions = deserializeDoubleOptionsDocument(curr)
// LiteralOptions com.amazonaws.cloudsearch#IndexField$LiteralOptions
"LiteralOptions" -> builder.literalOptions = deserializeLiteralOptionsDocument(curr)
// TextOptions com.amazonaws.cloudsearch#IndexField$TextOptions
"TextOptions" -> builder.textOptions = deserializeTextOptionsDocument(curr)
// DateOptions com.amazonaws.cloudsearch#IndexField$DateOptions
"DateOptions" -> builder.dateOptions = deserializeDateOptionsDocument(curr)
// LatLonOptions com.amazonaws.cloudsearch#IndexField$LatLonOptions
"LatLonOptions" -> builder.latLonOptions = deserializeLatLonOptionsDocument(curr)
// IntArrayOptions com.amazonaws.cloudsearch#IndexField$IntArrayOptions
"IntArrayOptions" -> builder.intArrayOptions = deserializeIntArrayOptionsDocument(curr)
// DoubleArrayOptions com.amazonaws.cloudsearch#IndexField$DoubleArrayOptions
"DoubleArrayOptions" -> builder.doubleArrayOptions = deserializeDoubleArrayOptionsDocument(curr)
// LiteralArrayOptions com.amazonaws.cloudsearch#IndexField$LiteralArrayOptions
"LiteralArrayOptions" -> builder.literalArrayOptions = deserializeLiteralArrayOptionsDocument(curr)
// TextArrayOptions com.amazonaws.cloudsearch#IndexField$TextArrayOptions
"TextArrayOptions" -> builder.textArrayOptions = deserializeTextArrayOptionsDocument(curr)
// DateArrayOptions com.amazonaws.cloudsearch#IndexField$DateArrayOptions
"DateArrayOptions" -> builder.dateArrayOptions = deserializeDateArrayOptionsDocument(curr)
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy