commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.serde.AmazonTranscribeCallAnalyticsProcessorConfigurationDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chimesdkmediapipelines-jvm Show documentation
Show all versions of chimesdkmediapipelines-jvm Show documentation
The AWS SDK for Kotlin client for Chime SDK Media Pipelines
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.AmazonTranscribeCallAnalyticsProcessorConfiguration
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
import kotlin.collections.mutableListOf
internal fun deserializeAmazonTranscribeCallAnalyticsProcessorConfigurationDocument(deserializer: Deserializer): AmazonTranscribeCallAnalyticsProcessorConfiguration {
val builder = AmazonTranscribeCallAnalyticsProcessorConfiguration.Builder()
val CALLANALYTICSSTREAMCATEGORIES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("CallAnalyticsStreamCategories"))
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 LANGUAGECODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("LanguageCode"))
val LANGUAGEMODELNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LanguageModelName"))
val PARTIALRESULTSSTABILITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("PartialResultsStability"))
val PIIENTITYTYPES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PiiEntityTypes"))
val POSTCALLANALYTICSSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("PostCallAnalyticsSettings"))
val VOCABULARYFILTERMETHOD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("VocabularyFilterMethod"))
val VOCABULARYFILTERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VocabularyFilterName"))
val VOCABULARYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VocabularyName"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CALLANALYTICSSTREAMCATEGORIES_DESCRIPTOR)
field(CONTENTIDENTIFICATIONTYPE_DESCRIPTOR)
field(CONTENTREDACTIONTYPE_DESCRIPTOR)
field(ENABLEPARTIALRESULTSSTABILIZATION_DESCRIPTOR)
field(FILTERPARTIALRESULTS_DESCRIPTOR)
field(LANGUAGECODE_DESCRIPTOR)
field(LANGUAGEMODELNAME_DESCRIPTOR)
field(PARTIALRESULTSSTABILITY_DESCRIPTOR)
field(PIIENTITYTYPES_DESCRIPTOR)
field(POSTCALLANALYTICSSETTINGS_DESCRIPTOR)
field(VOCABULARYFILTERMETHOD_DESCRIPTOR)
field(VOCABULARYFILTERNAME_DESCRIPTOR)
field(VOCABULARYNAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CALLANALYTICSSTREAMCATEGORIES_DESCRIPTOR.index -> builder.callAnalyticsStreamCategories =
deserializer.deserializeList(CALLANALYTICSSTREAMCATEGORIES_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
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()
LANGUAGECODE_DESCRIPTOR.index -> builder.languageCode = deserializeString().let { CallAnalyticsLanguageCode.fromValue(it) }
LANGUAGEMODELNAME_DESCRIPTOR.index -> builder.languageModelName = deserializeString()
PARTIALRESULTSSTABILITY_DESCRIPTOR.index -> builder.partialResultsStability = deserializeString().let { PartialResultsStability.fromValue(it) }
PIIENTITYTYPES_DESCRIPTOR.index -> builder.piiEntityTypes = deserializeString()
POSTCALLANALYTICSSETTINGS_DESCRIPTOR.index -> builder.postCallAnalyticsSettings = deserializePostCallAnalyticsSettingsDocument(deserializer)
VOCABULARYFILTERMETHOD_DESCRIPTOR.index -> builder.vocabularyFilterMethod = deserializeString().let { VocabularyFilterMethod.fromValue(it) }
VOCABULARYFILTERNAME_DESCRIPTOR.index -> builder.vocabularyFilterName = deserializeString()
VOCABULARYNAME_DESCRIPTOR.index -> builder.vocabularyName = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}