commonMain.aws.sdk.kotlin.services.appsync.serde.FunctionConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appsync-jvm Show documentation
Show all versions of appsync-jvm Show documentation
The AWS SDK for Kotlin client for AppSync
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appsync.serde
import aws.sdk.kotlin.services.appsync.model.FunctionConfiguration
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
internal fun deserializeFunctionConfigurationDocument(deserializer: Deserializer): FunctionConfiguration {
val builder = FunctionConfiguration.Builder()
val CODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("code"))
val DATASOURCENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("dataSourceName"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
val FUNCTIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("functionArn"))
val FUNCTIONID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("functionId"))
val FUNCTIONVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("functionVersion"))
val MAXBATCHSIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("maxBatchSize"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val REQUESTMAPPINGTEMPLATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("requestMappingTemplate"))
val RESPONSEMAPPINGTEMPLATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("responseMappingTemplate"))
val RUNTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("runtime"))
val SYNCCONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("syncConfig"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CODE_DESCRIPTOR)
field(DATASOURCENAME_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(FUNCTIONARN_DESCRIPTOR)
field(FUNCTIONID_DESCRIPTOR)
field(FUNCTIONVERSION_DESCRIPTOR)
field(MAXBATCHSIZE_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(REQUESTMAPPINGTEMPLATE_DESCRIPTOR)
field(RESPONSEMAPPINGTEMPLATE_DESCRIPTOR)
field(RUNTIME_DESCRIPTOR)
field(SYNCCONFIG_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CODE_DESCRIPTOR.index -> builder.code = deserializeString()
DATASOURCENAME_DESCRIPTOR.index -> builder.dataSourceName = deserializeString()
DESCRIPTION_DESCRIPTOR.index -> builder.description = deserializeString()
FUNCTIONARN_DESCRIPTOR.index -> builder.functionArn = deserializeString()
FUNCTIONID_DESCRIPTOR.index -> builder.functionId = deserializeString()
FUNCTIONVERSION_DESCRIPTOR.index -> builder.functionVersion = deserializeString()
MAXBATCHSIZE_DESCRIPTOR.index -> builder.maxBatchSize = deserializeInt()
NAME_DESCRIPTOR.index -> builder.name = deserializeString()
REQUESTMAPPINGTEMPLATE_DESCRIPTOR.index -> builder.requestMappingTemplate = deserializeString()
RESPONSEMAPPINGTEMPLATE_DESCRIPTOR.index -> builder.responseMappingTemplate = deserializeString()
RUNTIME_DESCRIPTOR.index -> builder.runtime = deserializeAppSyncRuntimeDocument(deserializer)
SYNCCONFIG_DESCRIPTOR.index -> builder.syncConfig = deserializeSyncConfigDocument(deserializer)
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}