commonMain.aws.sdk.kotlin.services.lexruntimeservice.serde.DialogActionDocumentSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lexruntimeservice-jvm Show documentation
Show all versions of lexruntimeservice-jvm Show documentation
The AWS Kotlin client for Lex Runtime Service
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexruntimeservice.serde
import aws.sdk.kotlin.services.lexruntimeservice.model.DialogAction
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 serializeDialogActionDocument(serializer: Serializer, input: DialogAction) {
val FULFILLMENTSTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("fulfillmentState"))
val INTENTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("intentName"))
val MESSAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("message"))
val MESSAGEFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("messageFormat"))
val SLOTTOELICIT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("slotToElicit"))
val SLOTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("slots"))
val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("type"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(FULFILLMENTSTATE_DESCRIPTOR)
field(INTENTNAME_DESCRIPTOR)
field(MESSAGE_DESCRIPTOR)
field(MESSAGEFORMAT_DESCRIPTOR)
field(SLOTTOELICIT_DESCRIPTOR)
field(SLOTS_DESCRIPTOR)
field(TYPE_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(TYPE_DESCRIPTOR, input.type.value)
input.intentName?.let { field(INTENTNAME_DESCRIPTOR, it) }
if (input.slots != null) {
mapField(SLOTS_DESCRIPTOR) {
input.slots.forEach { (key, value) ->
entry(key, value)
}
}
}
input.slotToElicit?.let { field(SLOTTOELICIT_DESCRIPTOR, it) }
input.fulfillmentState?.let { field(FULFILLMENTSTATE_DESCRIPTOR, it.value) }
input.message?.let { field(MESSAGE_DESCRIPTOR, it) }
input.messageFormat?.let { field(MESSAGEFORMAT_DESCRIPTOR, it.value) }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy