commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.serde.SlotDocumentSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexmodelbuildingservice.serde
import aws.sdk.kotlin.services.lexmodelbuildingservice.model.Slot
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 serializeSlotDocument(serializer: Serializer, input: Slot) {
val DEFAULTVALUESPEC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("defaultValueSpec"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("description"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("name"))
val OBFUSCATIONSETTING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("obfuscationSetting"))
val PRIORITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("priority"))
val RESPONSECARD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("responseCard"))
val SAMPLEUTTERANCES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("sampleUtterances"))
val SLOTCONSTRAINT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("slotConstraint"))
val SLOTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("slotType"))
val SLOTTYPEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("slotTypeVersion"))
val VALUEELICITATIONPROMPT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("valueElicitationPrompt"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(DEFAULTVALUESPEC_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(OBFUSCATIONSETTING_DESCRIPTOR)
field(PRIORITY_DESCRIPTOR)
field(RESPONSECARD_DESCRIPTOR)
field(SAMPLEUTTERANCES_DESCRIPTOR)
field(SLOTCONSTRAINT_DESCRIPTOR)
field(SLOTTYPE_DESCRIPTOR)
field(SLOTTYPEVERSION_DESCRIPTOR)
field(VALUEELICITATIONPROMPT_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
field(NAME_DESCRIPTOR, input.name)
input.description?.let { field(DESCRIPTION_DESCRIPTOR, it) }
field(SLOTCONSTRAINT_DESCRIPTOR, input.slotConstraint.value)
input.slotType?.let { field(SLOTTYPE_DESCRIPTOR, it) }
input.slotTypeVersion?.let { field(SLOTTYPEVERSION_DESCRIPTOR, it) }
input.valueElicitationPrompt?.let { field(VALUEELICITATIONPROMPT_DESCRIPTOR, it, ::serializePromptDocument) }
input.priority?.let { field(PRIORITY_DESCRIPTOR, it) }
if (input.sampleUtterances != null) {
listField(SAMPLEUTTERANCES_DESCRIPTOR) {
for (el0 in input.sampleUtterances) {
serializeString(el0)
}
}
}
input.responseCard?.let { field(RESPONSECARD_DESCRIPTOR, it) }
input.obfuscationSetting?.let { field(OBFUSCATIONSETTING_DESCRIPTOR, it.value) }
input.defaultValueSpec?.let { field(DEFAULTVALUESPEC_DESCRIPTOR, it, ::serializeSlotDefaultValueSpecDocument) }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy