commonMain.aws.sdk.kotlin.services.chatbot.serde.TeamsChannelConfigurationDocumentDeserializer.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.Tag
import aws.sdk.kotlin.services.chatbot.model.TeamsChannelConfiguration
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 deserializeTeamsChannelConfigurationDocument(deserializer: Deserializer): TeamsChannelConfiguration {
val builder = TeamsChannelConfiguration.Builder()
val CHANNELID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ChannelId"))
val CHANNELNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ChannelName"))
val CHATCONFIGURATIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ChatConfigurationArn"))
val CONFIGURATIONNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ConfigurationName"))
val GUARDRAILPOLICYARNS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("GuardrailPolicyArns"))
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 TEAMID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TeamId"))
val TEAMNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TeamName"))
val TENANTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TenantId"))
val USERAUTHORIZATIONREQUIRED_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("UserAuthorizationRequired"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CHANNELID_DESCRIPTOR)
field(CHANNELNAME_DESCRIPTOR)
field(CHATCONFIGURATIONARN_DESCRIPTOR)
field(CONFIGURATIONNAME_DESCRIPTOR)
field(GUARDRAILPOLICYARNS_DESCRIPTOR)
field(IAMROLEARN_DESCRIPTOR)
field(LOGGINGLEVEL_DESCRIPTOR)
field(SNSTOPICARNS_DESCRIPTOR)
field(TAGS_DESCRIPTOR)
field(TEAMID_DESCRIPTOR)
field(TEAMNAME_DESCRIPTOR)
field(TENANTID_DESCRIPTOR)
field(USERAUTHORIZATIONREQUIRED_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CHANNELID_DESCRIPTOR.index -> builder.channelId = deserializeString()
CHANNELNAME_DESCRIPTOR.index -> builder.channelName = deserializeString()
CHATCONFIGURATIONARN_DESCRIPTOR.index -> builder.chatConfigurationArn = deserializeString()
CONFIGURATIONNAME_DESCRIPTOR.index -> builder.configurationName = deserializeString()
GUARDRAILPOLICYARNS_DESCRIPTOR.index -> builder.guardrailPolicyArns =
deserializer.deserializeList(GUARDRAILPOLICYARNS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
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
}
TEAMID_DESCRIPTOR.index -> builder.teamId = deserializeString()
TEAMNAME_DESCRIPTOR.index -> builder.teamName = deserializeString()
TENANTID_DESCRIPTOR.index -> builder.tenantId = deserializeString()
USERAUTHORIZATIONREQUIRED_DESCRIPTOR.index -> builder.userAuthorizationRequired = deserializeBoolean()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy