commonMain.aws.sdk.kotlin.services.bedrockagent.serde.PromptConfigurationDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockagent-jvm Show documentation
Show all versions of bedrockagent-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock Agent
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.serde
import aws.sdk.kotlin.services.bedrockagent.model.PromptConfiguration
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.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 serializePromptConfigurationDocument(serializer: Serializer, input: PromptConfiguration) {
val BASEPROMPTTEMPLATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("basePromptTemplate"))
val INFERENCECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("inferenceConfiguration"))
val PARSERMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("parserMode"))
val PROMPTCREATIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("promptCreationMode"))
val PROMPTSTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("promptState"))
val PROMPTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("promptType"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(BASEPROMPTTEMPLATE_DESCRIPTOR)
field(INFERENCECONFIGURATION_DESCRIPTOR)
field(PARSERMODE_DESCRIPTOR)
field(PROMPTCREATIONMODE_DESCRIPTOR)
field(PROMPTSTATE_DESCRIPTOR)
field(PROMPTTYPE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.promptType?.let { field(PROMPTTYPE_DESCRIPTOR, it.value) }
input.promptCreationMode?.let { field(PROMPTCREATIONMODE_DESCRIPTOR, it.value) }
input.promptState?.let { field(PROMPTSTATE_DESCRIPTOR, it.value) }
input.basePromptTemplate?.let { field(BASEPROMPTTEMPLATE_DESCRIPTOR, it) }
input.inferenceConfiguration?.let { field(INFERENCECONFIGURATION_DESCRIPTOR, it, ::serializeInferenceConfigurationDocument) }
input.parserMode?.let { field(PARSERMODE_DESCRIPTOR, it.value) }
}
}