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

commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.serde.AmazonTranscribeProcessorConfigurationDocumentDeserializer.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.AmazonTranscribeProcessorConfiguration
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.CallAnalyticsLanguageCode
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.ContentType
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.PartialResultsStability
import aws.sdk.kotlin.services.chimesdkmediapipelines.model.VocabularyFilterMethod
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 deserializeAmazonTranscribeProcessorConfigurationDocument(deserializer: Deserializer): AmazonTranscribeProcessorConfiguration {
    val builder = AmazonTranscribeProcessorConfiguration.Builder()
    val CONTENTIDENTIFICATIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ContentIdentificationType"))
    val CONTENTREDACTIONTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("ContentRedactionType"))
    val ENABLEPARTIALRESULTSSTABILIZATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("EnablePartialResultsStabilization"))
    val FILTERPARTIALRESULTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("FilterPartialResults"))
    val IDENTIFYLANGUAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IdentifyLanguage"))
    val IDENTIFYMULTIPLELANGUAGES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("IdentifyMultipleLanguages"))
    val LANGUAGECODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("LanguageCode"))
    val LANGUAGEMODELNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LanguageModelName"))
    val LANGUAGEOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LanguageOptions"))
    val PARTIALRESULTSSTABILITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PartialResultsStability"))
    val PIIENTITYTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PiiEntityTypes"))
    val PREFERREDLANGUAGE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PreferredLanguage"))
    val SHOWSPEAKERLABEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("ShowSpeakerLabel"))
    val VOCABULARYFILTERMETHOD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("VocabularyFilterMethod"))
    val VOCABULARYFILTERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VocabularyFilterName"))
    val VOCABULARYFILTERNAMES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VocabularyFilterNames"))
    val VOCABULARYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VocabularyName"))
    val VOCABULARYNAMES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VocabularyNames"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(CONTENTIDENTIFICATIONTYPE_DESCRIPTOR)
        field(CONTENTREDACTIONTYPE_DESCRIPTOR)
        field(ENABLEPARTIALRESULTSSTABILIZATION_DESCRIPTOR)
        field(FILTERPARTIALRESULTS_DESCRIPTOR)
        field(IDENTIFYLANGUAGE_DESCRIPTOR)
        field(IDENTIFYMULTIPLELANGUAGES_DESCRIPTOR)
        field(LANGUAGECODE_DESCRIPTOR)
        field(LANGUAGEMODELNAME_DESCRIPTOR)
        field(LANGUAGEOPTIONS_DESCRIPTOR)
        field(PARTIALRESULTSSTABILITY_DESCRIPTOR)
        field(PIIENTITYTYPES_DESCRIPTOR)
        field(PREFERREDLANGUAGE_DESCRIPTOR)
        field(SHOWSPEAKERLABEL_DESCRIPTOR)
        field(VOCABULARYFILTERMETHOD_DESCRIPTOR)
        field(VOCABULARYFILTERNAME_DESCRIPTOR)
        field(VOCABULARYFILTERNAMES_DESCRIPTOR)
        field(VOCABULARYNAME_DESCRIPTOR)
        field(VOCABULARYNAMES_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                CONTENTIDENTIFICATIONTYPE_DESCRIPTOR.index -> builder.contentIdentificationType = deserializeString().let { ContentType.fromValue(it) }
                CONTENTREDACTIONTYPE_DESCRIPTOR.index -> builder.contentRedactionType = deserializeString().let { ContentType.fromValue(it) }
                ENABLEPARTIALRESULTSSTABILIZATION_DESCRIPTOR.index -> builder.enablePartialResultsStabilization = deserializeBoolean()
                FILTERPARTIALRESULTS_DESCRIPTOR.index -> builder.filterPartialResults = deserializeBoolean()
                IDENTIFYLANGUAGE_DESCRIPTOR.index -> builder.identifyLanguage = deserializeBoolean()
                IDENTIFYMULTIPLELANGUAGES_DESCRIPTOR.index -> builder.identifyMultipleLanguages = deserializeBoolean()
                LANGUAGECODE_DESCRIPTOR.index -> builder.languageCode = deserializeString().let { CallAnalyticsLanguageCode.fromValue(it) }
                LANGUAGEMODELNAME_DESCRIPTOR.index -> builder.languageModelName = deserializeString()
                LANGUAGEOPTIONS_DESCRIPTOR.index -> builder.languageOptions = deserializeString()
                PARTIALRESULTSSTABILITY_DESCRIPTOR.index -> builder.partialResultsStability = deserializeString().let { PartialResultsStability.fromValue(it) }
                PIIENTITYTYPES_DESCRIPTOR.index -> builder.piiEntityTypes = deserializeString()
                PREFERREDLANGUAGE_DESCRIPTOR.index -> builder.preferredLanguage = deserializeString().let { CallAnalyticsLanguageCode.fromValue(it) }
                SHOWSPEAKERLABEL_DESCRIPTOR.index -> builder.showSpeakerLabel = deserializeBoolean()
                VOCABULARYFILTERMETHOD_DESCRIPTOR.index -> builder.vocabularyFilterMethod = deserializeString().let { VocabularyFilterMethod.fromValue(it) }
                VOCABULARYFILTERNAME_DESCRIPTOR.index -> builder.vocabularyFilterName = deserializeString()
                VOCABULARYFILTERNAMES_DESCRIPTOR.index -> builder.vocabularyFilterNames = deserializeString()
                VOCABULARYNAME_DESCRIPTOR.index -> builder.vocabularyName = deserializeString()
                VOCABULARYNAMES_DESCRIPTOR.index -> builder.vocabularyNames = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy