commonMain.aws.sdk.kotlin.services.chatbot.serde.ChimeWebhookConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chatbot-jvm Show documentation
Show all versions of chatbot-jvm Show documentation
The AWS SDK for Kotlin client for chatbot
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.chatbot.serde
import aws.sdk.kotlin.services.chatbot.model.ChimeWebhookConfiguration
import aws.sdk.kotlin.services.chatbot.model.Tag
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 deserializeChimeWebhookConfigurationDocument(deserializer: Deserializer): ChimeWebhookConfiguration {
val builder = ChimeWebhookConfiguration.Builder()
val CHATCONFIGURATIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ChatConfigurationArn"))
val CONFIGURATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ConfigurationName"))
val IAMROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IamRoleArn"))
val LOGGINGLEVEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LoggingLevel"))
val SNSTOPICARNS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("SnsTopicArns"))
val TAGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Tags"))
val WEBHOOKDESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("WebhookDescription"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CHATCONFIGURATIONARN_DESCRIPTOR)
field(CONFIGURATIONNAME_DESCRIPTOR)
field(IAMROLEARN_DESCRIPTOR)
field(LOGGINGLEVEL_DESCRIPTOR)
field(SNSTOPICARNS_DESCRIPTOR)
field(TAGS_DESCRIPTOR)
field(WEBHOOKDESCRIPTION_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CHATCONFIGURATIONARN_DESCRIPTOR.index -> builder.chatConfigurationArn = deserializeString()
CONFIGURATIONNAME_DESCRIPTOR.index -> builder.configurationName = deserializeString()
IAMROLEARN_DESCRIPTOR.index -> builder.iamRoleArn = deserializeString()
LOGGINGLEVEL_DESCRIPTOR.index -> builder.loggingLevel = deserializeString()
SNSTOPICARNS_DESCRIPTOR.index -> builder.snsTopicArns =
deserializer.deserializeList(SNSTOPICARNS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
TAGS_DESCRIPTOR.index -> builder.tags =
deserializer.deserializeList(TAGS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeTagDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
WEBHOOKDESCRIPTION_DESCRIPTOR.index -> builder.webhookDescription = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}