All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.chatbot.serde.TeamsUserIdentityDocumentDeserializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.chatbot.serde

import aws.sdk.kotlin.services.chatbot.model.TeamsUserIdentity
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

internal fun deserializeTeamsUserIdentityDocument(deserializer: Deserializer): TeamsUserIdentity {
    val builder = TeamsUserIdentity.Builder()
    val AWSUSERIDENTITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AwsUserIdentity"))
    val CHATCONFIGURATIONARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ChatConfigurationArn"))
    val IAMROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("IamRoleArn"))
    val TEAMID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TeamId"))
    val TEAMSCHANNELID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TeamsChannelId"))
    val TEAMSTENANTID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TeamsTenantId"))
    val USERID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("UserId"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AWSUSERIDENTITY_DESCRIPTOR)
        field(CHATCONFIGURATIONARN_DESCRIPTOR)
        field(IAMROLEARN_DESCRIPTOR)
        field(TEAMID_DESCRIPTOR)
        field(TEAMSCHANNELID_DESCRIPTOR)
        field(TEAMSTENANTID_DESCRIPTOR)
        field(USERID_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                AWSUSERIDENTITY_DESCRIPTOR.index -> builder.awsUserIdentity = deserializeString()
                CHATCONFIGURATIONARN_DESCRIPTOR.index -> builder.chatConfigurationArn = deserializeString()
                IAMROLEARN_DESCRIPTOR.index -> builder.iamRoleArn = deserializeString()
                TEAMID_DESCRIPTOR.index -> builder.teamId = deserializeString()
                TEAMSCHANNELID_DESCRIPTOR.index -> builder.teamsChannelId = deserializeString()
                TEAMSTENANTID_DESCRIPTOR.index -> builder.teamsTenantId = deserializeString()
                USERID_DESCRIPTOR.index -> builder.userId = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy