All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.appsync.serde.FunctionConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// 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()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy