commonMain.aws.sdk.kotlin.services.entityresolution.serde.IdMappingRuleBasedPropertiesDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of entityresolution-jvm Show documentation
Show all versions of entityresolution-jvm Show documentation
The AWS SDK for Kotlin client for EntityResolution
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.entityresolution.serde
import aws.sdk.kotlin.services.entityresolution.model.AttributeMatchingModel
import aws.sdk.kotlin.services.entityresolution.model.IdMappingRuleBasedProperties
import aws.sdk.kotlin.services.entityresolution.model.IdMappingWorkflowRuleDefinitionType
import aws.sdk.kotlin.services.entityresolution.model.RecordMatchingModel
import aws.sdk.kotlin.services.entityresolution.model.Rule
import aws.smithy.kotlin.runtime.serde.Deserializer
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.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.json.JsonDeserializer
import aws.smithy.kotlin.runtime.serde.json.JsonSerialName
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
import kotlin.collections.mutableListOf
internal fun deserializeIdMappingRuleBasedPropertiesDocument(deserializer: Deserializer): IdMappingRuleBasedProperties {
val builder = IdMappingRuleBasedProperties.Builder()
val ATTRIBUTEMATCHINGMODEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("attributeMatchingModel"))
val RECORDMATCHINGMODEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("recordMatchingModel"))
val RULEDEFINITIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ruleDefinitionType"))
val RULES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("rules"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ATTRIBUTEMATCHINGMODEL_DESCRIPTOR)
field(RECORDMATCHINGMODEL_DESCRIPTOR)
field(RULEDEFINITIONTYPE_DESCRIPTOR)
field(RULES_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ATTRIBUTEMATCHINGMODEL_DESCRIPTOR.index -> builder.attributeMatchingModel = deserializeString().let { AttributeMatchingModel.fromValue(it) }
RECORDMATCHINGMODEL_DESCRIPTOR.index -> builder.recordMatchingModel = deserializeString().let { RecordMatchingModel.fromValue(it) }
RULEDEFINITIONTYPE_DESCRIPTOR.index -> builder.ruleDefinitionType = deserializeString().let { IdMappingWorkflowRuleDefinitionType.fromValue(it) }
RULES_DESCRIPTOR.index -> builder.rules =
deserializer.deserializeList(RULES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeRuleDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy