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

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

There is a newer version: 1.3.76
Show 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.MediaInsightsPipelineConfigurationElement
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.MediaInsightsPipelineConfigurationElementType
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 deserializeMediaInsightsPipelineConfigurationElementDocument(deserializer: Deserializer): MediaInsightsPipelineConfigurationElement {
    val builder = MediaInsightsPipelineConfigurationElement.Builder()
    val AMAZONTRANSCRIBECALLANALYTICSPROCESSORCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AmazonTranscribeCallAnalyticsProcessorConfiguration"))
    val AMAZONTRANSCRIBEPROCESSORCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AmazonTranscribeProcessorConfiguration"))
    val KINESISDATASTREAMSINKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KinesisDataStreamSinkConfiguration"))
    val LAMBDAFUNCTIONSINKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LambdaFunctionSinkConfiguration"))
    val S3RECORDINGSINKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3RecordingSinkConfiguration"))
    val SNSTOPICSINKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SnsTopicSinkConfiguration"))
    val SQSQUEUESINKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SqsQueueSinkConfiguration"))
    val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("Type"))
    val VOICEANALYTICSPROCESSORCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("VoiceAnalyticsProcessorConfiguration"))
    val VOICEENHANCEMENTSINKCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("VoiceEnhancementSinkConfiguration"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AMAZONTRANSCRIBECALLANALYTICSPROCESSORCONFIGURATION_DESCRIPTOR)
        field(AMAZONTRANSCRIBEPROCESSORCONFIGURATION_DESCRIPTOR)
        field(KINESISDATASTREAMSINKCONFIGURATION_DESCRIPTOR)
        field(LAMBDAFUNCTIONSINKCONFIGURATION_DESCRIPTOR)
        field(S3RECORDINGSINKCONFIGURATION_DESCRIPTOR)
        field(SNSTOPICSINKCONFIGURATION_DESCRIPTOR)
        field(SQSQUEUESINKCONFIGURATION_DESCRIPTOR)
        field(TYPE_DESCRIPTOR)
        field(VOICEANALYTICSPROCESSORCONFIGURATION_DESCRIPTOR)
        field(VOICEENHANCEMENTSINKCONFIGURATION_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                AMAZONTRANSCRIBECALLANALYTICSPROCESSORCONFIGURATION_DESCRIPTOR.index -> builder.amazonTranscribeCallAnalyticsProcessorConfiguration = deserializeAmazonTranscribeCallAnalyticsProcessorConfigurationDocument(deserializer)
                AMAZONTRANSCRIBEPROCESSORCONFIGURATION_DESCRIPTOR.index -> builder.amazonTranscribeProcessorConfiguration = deserializeAmazonTranscribeProcessorConfigurationDocument(deserializer)
                KINESISDATASTREAMSINKCONFIGURATION_DESCRIPTOR.index -> builder.kinesisDataStreamSinkConfiguration = deserializeKinesisDataStreamSinkConfigurationDocument(deserializer)
                LAMBDAFUNCTIONSINKCONFIGURATION_DESCRIPTOR.index -> builder.lambdaFunctionSinkConfiguration = deserializeLambdaFunctionSinkConfigurationDocument(deserializer)
                S3RECORDINGSINKCONFIGURATION_DESCRIPTOR.index -> builder.s3RecordingSinkConfiguration = deserializeS3RecordingSinkConfigurationDocument(deserializer)
                SNSTOPICSINKCONFIGURATION_DESCRIPTOR.index -> builder.snsTopicSinkConfiguration = deserializeSnsTopicSinkConfigurationDocument(deserializer)
                SQSQUEUESINKCONFIGURATION_DESCRIPTOR.index -> builder.sqsQueueSinkConfiguration = deserializeSqsQueueSinkConfigurationDocument(deserializer)
                TYPE_DESCRIPTOR.index -> builder.type = deserializeString().let { MediaInsightsPipelineConfigurationElementType.fromValue(it) }
                VOICEANALYTICSPROCESSORCONFIGURATION_DESCRIPTOR.index -> builder.voiceAnalyticsProcessorConfiguration = deserializeVoiceAnalyticsProcessorConfigurationDocument(deserializer)
                VOICEENHANCEMENTSINKCONFIGURATION_DESCRIPTOR.index -> builder.voiceEnhancementSinkConfiguration = deserializeVoiceEnhancementSinkConfigurationDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy