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

commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.serde.PostCallAnalyticsSettingsDocumentDeserializer.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.chimesdkmediapipelines.serde

import aws.sdk.kotlin.services.chimesdkmediapipelines.model.ContentRedactionOutput
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.PostCallAnalyticsSettings
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 deserializePostCallAnalyticsSettingsDocument(deserializer: Deserializer): PostCallAnalyticsSettings {
    val builder = PostCallAnalyticsSettings.Builder()
    val CONTENTREDACTIONOUTPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ContentRedactionOutput"))
    val DATAACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DataAccessRoleArn"))
    val OUTPUTENCRYPTIONKMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OutputEncryptionKMSKeyId"))
    val OUTPUTLOCATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("OutputLocation"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(CONTENTREDACTIONOUTPUT_DESCRIPTOR)
        field(DATAACCESSROLEARN_DESCRIPTOR)
        field(OUTPUTENCRYPTIONKMSKEYID_DESCRIPTOR)
        field(OUTPUTLOCATION_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                CONTENTREDACTIONOUTPUT_DESCRIPTOR.index -> builder.contentRedactionOutput = deserializeString().let { ContentRedactionOutput.fromValue(it) }
                DATAACCESSROLEARN_DESCRIPTOR.index -> builder.dataAccessRoleArn = deserializeString()
                OUTPUTENCRYPTIONKMSKEYID_DESCRIPTOR.index -> builder.outputEncryptionKmsKeyId = deserializeString()
                OUTPUTLOCATION_DESCRIPTOR.index -> builder.outputLocation = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy