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

commonMain.aws.sdk.kotlin.services.mediaconvert.transform.Ac3SettingsDocumentDeserializer.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.Ac3BitstreamMode
import aws.sdk.kotlin.services.mediaconvert.model.Ac3CodingMode
import aws.sdk.kotlin.services.mediaconvert.model.Ac3DynamicRangeCompressionLine
import aws.sdk.kotlin.services.mediaconvert.model.Ac3DynamicRangeCompressionProfile
import aws.sdk.kotlin.services.mediaconvert.model.Ac3DynamicRangeCompressionRf
import aws.sdk.kotlin.services.mediaconvert.model.Ac3LfeFilter
import aws.sdk.kotlin.services.mediaconvert.model.Ac3MetadataControl
import aws.sdk.kotlin.services.mediaconvert.model.Ac3Settings
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 deserializeAc3SettingsDocument(deserializer: Deserializer): Ac3Settings {
    val builder = Ac3Settings.Builder()
    val BITRATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("bitrate"))
    val BITSTREAMMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("bitstreamMode"))
    val CODINGMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("codingMode"))
    val DIALNORM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("dialnorm"))
    val DYNAMICRANGECOMPRESSIONLINE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("dynamicRangeCompressionLine"))
    val DYNAMICRANGECOMPRESSIONPROFILE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("dynamicRangeCompressionProfile"))
    val DYNAMICRANGECOMPRESSIONRF_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("dynamicRangeCompressionRf"))
    val LFEFILTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("lfeFilter"))
    val METADATACONTROL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("metadataControl"))
    val SAMPLERATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("sampleRate"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BITRATE_DESCRIPTOR)
        field(BITSTREAMMODE_DESCRIPTOR)
        field(CODINGMODE_DESCRIPTOR)
        field(DIALNORM_DESCRIPTOR)
        field(DYNAMICRANGECOMPRESSIONLINE_DESCRIPTOR)
        field(DYNAMICRANGECOMPRESSIONPROFILE_DESCRIPTOR)
        field(DYNAMICRANGECOMPRESSIONRF_DESCRIPTOR)
        field(LFEFILTER_DESCRIPTOR)
        field(METADATACONTROL_DESCRIPTOR)
        field(SAMPLERATE_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                BITRATE_DESCRIPTOR.index -> builder.bitrate = deserializeInt()
                BITSTREAMMODE_DESCRIPTOR.index -> builder.bitstreamMode = deserializeString().let { Ac3BitstreamMode.fromValue(it) }
                CODINGMODE_DESCRIPTOR.index -> builder.codingMode = deserializeString().let { Ac3CodingMode.fromValue(it) }
                DIALNORM_DESCRIPTOR.index -> builder.dialnorm = deserializeInt()
                DYNAMICRANGECOMPRESSIONLINE_DESCRIPTOR.index -> builder.dynamicRangeCompressionLine = deserializeString().let { Ac3DynamicRangeCompressionLine.fromValue(it) }
                DYNAMICRANGECOMPRESSIONPROFILE_DESCRIPTOR.index -> builder.dynamicRangeCompressionProfile = deserializeString().let { Ac3DynamicRangeCompressionProfile.fromValue(it) }
                DYNAMICRANGECOMPRESSIONRF_DESCRIPTOR.index -> builder.dynamicRangeCompressionRf = deserializeString().let { Ac3DynamicRangeCompressionRf.fromValue(it) }
                LFEFILTER_DESCRIPTOR.index -> builder.lfeFilter = deserializeString().let { Ac3LfeFilter.fromValue(it) }
                METADATACONTROL_DESCRIPTOR.index -> builder.metadataControl = deserializeString().let { Ac3MetadataControl.fromValue(it) }
                SAMPLERATE_DESCRIPTOR.index -> builder.sampleRate = deserializeInt()
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy