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

commonMain.aws.sdk.kotlin.services.mediaconvert.transform.AudioDescriptionDocumentDeserializer.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.mediaconvert.transform

import aws.sdk.kotlin.services.mediaconvert.model.AudioDescription
import aws.sdk.kotlin.services.mediaconvert.model.AudioLanguageCodeControl
import aws.sdk.kotlin.services.mediaconvert.model.AudioTypeControl
import aws.sdk.kotlin.services.mediaconvert.model.LanguageCode
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 deserializeAudioDescriptionDocument(deserializer: Deserializer): AudioDescription {
    val builder = AudioDescription.Builder()
    val AUDIOCHANNELTAGGINGSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("audioChannelTaggingSettings"))
    val AUDIONORMALIZATIONSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("audioNormalizationSettings"))
    val AUDIOSOURCENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("audioSourceName"))
    val AUDIOTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("audioType"))
    val AUDIOTYPECONTROL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("audioTypeControl"))
    val CODECSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("codecSettings"))
    val CUSTOMLANGUAGECODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("customLanguageCode"))
    val LANGUAGECODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("languageCode"))
    val LANGUAGECODECONTROL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("languageCodeControl"))
    val REMIXSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("remixSettings"))
    val STREAMNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("streamName"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(AUDIOCHANNELTAGGINGSETTINGS_DESCRIPTOR)
        field(AUDIONORMALIZATIONSETTINGS_DESCRIPTOR)
        field(AUDIOSOURCENAME_DESCRIPTOR)
        field(AUDIOTYPE_DESCRIPTOR)
        field(AUDIOTYPECONTROL_DESCRIPTOR)
        field(CODECSETTINGS_DESCRIPTOR)
        field(CUSTOMLANGUAGECODE_DESCRIPTOR)
        field(LANGUAGECODE_DESCRIPTOR)
        field(LANGUAGECODECONTROL_DESCRIPTOR)
        field(REMIXSETTINGS_DESCRIPTOR)
        field(STREAMNAME_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                AUDIOCHANNELTAGGINGSETTINGS_DESCRIPTOR.index -> builder.audioChannelTaggingSettings = deserializeAudioChannelTaggingSettingsDocument(deserializer)
                AUDIONORMALIZATIONSETTINGS_DESCRIPTOR.index -> builder.audioNormalizationSettings = deserializeAudioNormalizationSettingsDocument(deserializer)
                AUDIOSOURCENAME_DESCRIPTOR.index -> builder.audioSourceName = deserializeString()
                AUDIOTYPE_DESCRIPTOR.index -> builder.audioType = deserializeInt()
                AUDIOTYPECONTROL_DESCRIPTOR.index -> builder.audioTypeControl = deserializeString().let { AudioTypeControl.fromValue(it) }
                CODECSETTINGS_DESCRIPTOR.index -> builder.codecSettings = deserializeAudioCodecSettingsDocument(deserializer)
                CUSTOMLANGUAGECODE_DESCRIPTOR.index -> builder.customLanguageCode = deserializeString()
                LANGUAGECODE_DESCRIPTOR.index -> builder.languageCode = deserializeString().let { LanguageCode.fromValue(it) }
                LANGUAGECODECONTROL_DESCRIPTOR.index -> builder.languageCodeControl = deserializeString().let { AudioLanguageCodeControl.fromValue(it) }
                REMIXSETTINGS_DESCRIPTOR.index -> builder.remixSettings = deserializeRemixSettingsDocument(deserializer)
                STREAMNAME_DESCRIPTOR.index -> builder.streamName = deserializeString()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy