aws.sdk.kotlin.services.transcribe.transform.RuleDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transcribe Show documentation
Show all versions of transcribe Show documentation
Amazon Transcribe Service
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transcribe.transform
import aws.sdk.kotlin.services.transcribe.model.Rule
import aws.smithy.kotlin.runtime.serde.DeserializationException
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 suspend fun deserializeRuleDocument(deserializer: Deserializer): Rule {
var value: Rule? = null
val INTERRUPTIONFILTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("InterruptionFilter"))
val NONTALKTIMEFILTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NonTalkTimeFilter"))
val SENTIMENTFILTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SentimentFilter"))
val TRANSCRIPTFILTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("TranscriptFilter"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(INTERRUPTIONFILTER_DESCRIPTOR)
field(NONTALKTIMEFILTER_DESCRIPTOR)
field(SENTIMENTFILTER_DESCRIPTOR)
field(TRANSCRIPTFILTER_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while(true) {
when(findNextFieldIndex()) {
INTERRUPTIONFILTER_DESCRIPTOR.index -> value = Rule.InterruptionFilter(deserializeInterruptionFilterDocument(deserializer))
NONTALKTIMEFILTER_DESCRIPTOR.index -> value = Rule.NonTalkTimeFilter(deserializeNonTalkTimeFilterDocument(deserializer))
SENTIMENTFILTER_DESCRIPTOR.index -> value = Rule.SentimentFilter(deserializeSentimentFilterDocument(deserializer))
TRANSCRIPTFILTER_DESCRIPTOR.index -> value = Rule.TranscriptFilter(deserializeTranscriptFilterDocument(deserializer))
null -> break@loop
else -> value = Rule.SdkUnknown.also { skipValue() }
}
}
}
return value ?: throw DeserializationException("Deserialized value unexpectedly null: Rule")
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy