commonMain.aws.sdk.kotlin.services.cloudsearch.serde.DomainNameMapShapeDeserializer.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.smithy.kotlin.runtime.serde.DeserializationException
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
import kotlin.collections.MutableMap
internal fun deserializeDomainNameMapShape(reader: XmlTagReader): Map {
val result = mutableMapOf()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
"entry" -> {
deserializeDomainNameMapEntry(result, curr)
}
else -> {}
}
curr.drop()
}
return result
}
internal fun deserializeDomainNameMapEntry(dest: MutableMap, reader: XmlTagReader) {
var key: String? = null
var value: String? = null
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
"key" -> key = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.cloudsearch#DomainName`)" }
"value" -> value = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.cloudsearch#APIVersion`)" }
else -> {}
}
curr.drop()
}
if (key == null) throw DeserializationException("missing key map entry")
if (value == null) throw DeserializationException("missing value map entry")
dest[key] = value
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy