commonMain.aws.sdk.kotlin.services.lexruntimeservice.serde.GenericAttachmentDocumentDeserializer.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.Button
import aws.sdk.kotlin.services.lexruntimeservice.model.GenericAttachment
import aws.smithy.kotlin.runtime.serde.Deserializer
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.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
import kotlin.collections.mutableListOf
internal fun deserializeGenericAttachmentDocument(deserializer: Deserializer): GenericAttachment {
val builder = GenericAttachment.Builder()
val ATTACHMENTLINKURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("attachmentLinkUrl"))
val BUTTONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("buttons"))
val IMAGEURL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("imageUrl"))
val SUBTITLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("subTitle"))
val TITLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("title"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ATTACHMENTLINKURL_DESCRIPTOR)
field(BUTTONS_DESCRIPTOR)
field(IMAGEURL_DESCRIPTOR)
field(SUBTITLE_DESCRIPTOR)
field(TITLE_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ATTACHMENTLINKURL_DESCRIPTOR.index -> builder.attachmentLinkUrl = deserializeString()
BUTTONS_DESCRIPTOR.index -> builder.buttons =
deserializer.deserializeList(BUTTONS_DESCRIPTOR) {
val col0 = mutableListOf
© 2015 - 2025 Weber Informatics LLC | Privacy Policy