All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
commonMain.aws.sdk.kotlin.services.bedrockagent.serde.FlowNodeConfigurationDocumentSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.serde
import aws.sdk.kotlin.services.bedrockagent.model.FlowNodeConfiguration
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.SerializationException
import aws.smithy.kotlin.runtime.serde.Serializer
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 serializeFlowNodeConfigurationDocument(serializer: Serializer, input: FlowNodeConfiguration) {
val AGENT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("agent"))
val COLLECTOR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("collector"))
val CONDITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("condition"))
val INPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("input"))
val ITERATOR_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("iterator"))
val KNOWLEDGEBASE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("knowledgeBase"))
val LAMBDAFUNCTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("lambdaFunction"))
val LEX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("lex"))
val OUTPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("output"))
val PROMPT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("prompt"))
val RETRIEVAL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("retrieval"))
val STORAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("storage"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AGENT_DESCRIPTOR)
field(COLLECTOR_DESCRIPTOR)
field(CONDITION_DESCRIPTOR)
field(INPUT_DESCRIPTOR)
field(ITERATOR_DESCRIPTOR)
field(KNOWLEDGEBASE_DESCRIPTOR)
field(LAMBDAFUNCTION_DESCRIPTOR)
field(LEX_DESCRIPTOR)
field(OUTPUT_DESCRIPTOR)
field(PROMPT_DESCRIPTOR)
field(RETRIEVAL_DESCRIPTOR)
field(STORAGE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
when (input) {
is FlowNodeConfiguration.Input -> field(INPUT_DESCRIPTOR, input.value, ::serializeInputFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Output -> field(OUTPUT_DESCRIPTOR, input.value, ::serializeOutputFlowNodeConfigurationDocument)
is FlowNodeConfiguration.KnowledgeBase -> field(KNOWLEDGEBASE_DESCRIPTOR, input.value, ::serializeKnowledgeBaseFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Condition -> field(CONDITION_DESCRIPTOR, input.value, ::serializeConditionFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Lex -> field(LEX_DESCRIPTOR, input.value, ::serializeLexFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Prompt -> field(PROMPT_DESCRIPTOR, input.value, ::serializePromptFlowNodeConfigurationDocument)
is FlowNodeConfiguration.LambdaFunction -> field(LAMBDAFUNCTION_DESCRIPTOR, input.value, ::serializeLambdaFunctionFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Storage -> field(STORAGE_DESCRIPTOR, input.value, ::serializeStorageFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Agent -> field(AGENT_DESCRIPTOR, input.value, ::serializeAgentFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Retrieval -> field(RETRIEVAL_DESCRIPTOR, input.value, ::serializeRetrievalFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Iterator -> field(ITERATOR_DESCRIPTOR, input.value, ::serializeIteratorFlowNodeConfigurationDocument)
is FlowNodeConfiguration.Collector -> field(COLLECTOR_DESCRIPTOR, input.value, ::serializeCollectorFlowNodeConfigurationDocument)
is FlowNodeConfiguration.SdkUnknown -> throw SerializationException("Cannot serialize SdkUnknown")
}
}
}