commonMain.aws.sdk.kotlin.services.lexruntimeservice.serde.IntentSummaryDocumentSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexruntimeservice.serde
import aws.sdk.kotlin.services.lexruntimeservice.model.IntentSummary
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 serializeIntentSummaryDocument(serializer: Serializer, input: IntentSummary) {
val CHECKPOINTLABEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("checkpointLabel"))
val CONFIRMATIONSTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("confirmationStatus"))
val DIALOGACTIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("dialogActionType"))
val FULFILLMENTSTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("fulfillmentState"))
val INTENTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("intentName"))
val SLOTTOELICIT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("slotToElicit"))
val SLOTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("slots"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CHECKPOINTLABEL_DESCRIPTOR)
field(CONFIRMATIONSTATUS_DESCRIPTOR)
field(DIALOGACTIONTYPE_DESCRIPTOR)
field(FULFILLMENTSTATE_DESCRIPTOR)
field(INTENTNAME_DESCRIPTOR)
field(SLOTTOELICIT_DESCRIPTOR)
field(SLOTS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.intentName?.let { field(INTENTNAME_DESCRIPTOR, it) }
input.checkpointLabel?.let { field(CHECKPOINTLABEL_DESCRIPTOR, it) }
if (input.slots != null) {
mapField(SLOTS_DESCRIPTOR) {
input.slots.forEach { (key, value) -> entry(key, value) }
}
}
input.confirmationStatus?.let { field(CONFIRMATIONSTATUS_DESCRIPTOR, it.value) }
field(DIALOGACTIONTYPE_DESCRIPTOR, input.dialogActionType.value)
input.fulfillmentState?.let { field(FULFILLMENTSTATE_DESCRIPTOR, it.value) }
input.slotToElicit?.let { field(SLOTTOELICIT_DESCRIPTOR, it) }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy