commonMain.aws.sdk.kotlin.services.appflow.serde.ConnectorEntityFieldDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appflow-jvm Show documentation
Show all versions of appflow-jvm Show documentation
The AWS SDK for Kotlin client for Appflow
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appflow.serde
import aws.sdk.kotlin.services.appflow.model.ConnectorEntityField
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.mutableMapOf
internal fun deserializeConnectorEntityFieldDocument(deserializer: Deserializer): ConnectorEntityField {
val builder = ConnectorEntityField.Builder()
val CUSTOMPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("customProperties"))
val DEFAULTVALUE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("defaultValue"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
val DESTINATIONPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("destinationProperties"))
val IDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("identifier"))
val ISDEPRECATED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("isDeprecated"))
val ISPRIMARYKEY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("isPrimaryKey"))
val LABEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("label"))
val PARENTIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("parentIdentifier"))
val SOURCEPROPERTIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("sourceProperties"))
val SUPPORTEDFIELDTYPEDETAILS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("supportedFieldTypeDetails"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CUSTOMPROPERTIES_DESCRIPTOR)
field(DEFAULTVALUE_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(DESTINATIONPROPERTIES_DESCRIPTOR)
field(IDENTIFIER_DESCRIPTOR)
field(ISDEPRECATED_DESCRIPTOR)
field(ISPRIMARYKEY_DESCRIPTOR)
field(LABEL_DESCRIPTOR)
field(PARENTIDENTIFIER_DESCRIPTOR)
field(SOURCEPROPERTIES_DESCRIPTOR)
field(SUPPORTEDFIELDTYPEDETAILS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CUSTOMPROPERTIES_DESCRIPTOR.index -> builder.customProperties =
deserializer.deserializeMap(CUSTOMPROPERTIES_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
DEFAULTVALUE_DESCRIPTOR.index -> builder.defaultValue = deserializeString()
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
DESTINATIONPROPERTIES_DESCRIPTOR.index -> builder.destinationProperties = deserializeDestinationFieldPropertiesDocument(deserializer)
IDENTIFIER_DESCRIPTOR.index -> builder.identifier = deserializeString()
ISDEPRECATED_DESCRIPTOR.index -> builder.isDeprecated = deserializeBoolean()
ISPRIMARYKEY_DESCRIPTOR.index -> builder.isPrimaryKey = deserializeBoolean()
LABEL_DESCRIPTOR.index -> builder.label = deserializeString()
PARENTIDENTIFIER_DESCRIPTOR.index -> builder.parentIdentifier = deserializeString()
SOURCEPROPERTIES_DESCRIPTOR.index -> builder.sourceProperties = deserializeSourceFieldPropertiesDocument(deserializer)
SUPPORTEDFIELDTYPEDETAILS_DESCRIPTOR.index -> builder.supportedFieldTypeDetails = deserializeSupportedFieldTypeDetailsDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}