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

commonMain.aws.sdk.kotlin.services.mediaconvert.serde.XavcHdProfileSettingsDocumentDeserializer.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.mediaconvert.serde

import aws.sdk.kotlin.services.mediaconvert.model.XavcFlickerAdaptiveQuantization
import aws.sdk.kotlin.services.mediaconvert.model.XavcGopBReference
import aws.sdk.kotlin.services.mediaconvert.model.XavcHdProfileBitrateClass
import aws.sdk.kotlin.services.mediaconvert.model.XavcHdProfileQualityTuningLevel
import aws.sdk.kotlin.services.mediaconvert.model.XavcHdProfileSettings
import aws.sdk.kotlin.services.mediaconvert.model.XavcHdProfileTelecine
import aws.sdk.kotlin.services.mediaconvert.model.XavcInterlaceMode
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 deserializeXavcHdProfileSettingsDocument(deserializer: Deserializer): XavcHdProfileSettings {
    val builder = XavcHdProfileSettings.Builder()
    val BITRATECLASS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("bitrateClass"))
    val FLICKERADAPTIVEQUANTIZATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("flickerAdaptiveQuantization"))
    val GOPBREFERENCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("gopBReference"))
    val GOPCLOSEDCADENCE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("gopClosedCadence"))
    val HRDBUFFERSIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("hrdBufferSize"))
    val INTERLACEMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("interlaceMode"))
    val QUALITYTUNINGLEVEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("qualityTuningLevel"))
    val SLICES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("slices"))
    val TELECINE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("telecine"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(BITRATECLASS_DESCRIPTOR)
        field(FLICKERADAPTIVEQUANTIZATION_DESCRIPTOR)
        field(GOPBREFERENCE_DESCRIPTOR)
        field(GOPCLOSEDCADENCE_DESCRIPTOR)
        field(HRDBUFFERSIZE_DESCRIPTOR)
        field(INTERLACEMODE_DESCRIPTOR)
        field(QUALITYTUNINGLEVEL_DESCRIPTOR)
        field(SLICES_DESCRIPTOR)
        field(TELECINE_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                BITRATECLASS_DESCRIPTOR.index -> builder.bitrateClass = deserializeString().let { XavcHdProfileBitrateClass.fromValue(it) }
                FLICKERADAPTIVEQUANTIZATION_DESCRIPTOR.index -> builder.flickerAdaptiveQuantization = deserializeString().let { XavcFlickerAdaptiveQuantization.fromValue(it) }
                GOPBREFERENCE_DESCRIPTOR.index -> builder.gopBReference = deserializeString().let { XavcGopBReference.fromValue(it) }
                GOPCLOSEDCADENCE_DESCRIPTOR.index -> builder.gopClosedCadence = deserializeInt()
                HRDBUFFERSIZE_DESCRIPTOR.index -> builder.hrdBufferSize = deserializeInt()
                INTERLACEMODE_DESCRIPTOR.index -> builder.interlaceMode = deserializeString().let { XavcInterlaceMode.fromValue(it) }
                QUALITYTUNINGLEVEL_DESCRIPTOR.index -> builder.qualityTuningLevel = deserializeString().let { XavcHdProfileQualityTuningLevel.fromValue(it) }
                SLICES_DESCRIPTOR.index -> builder.slices = deserializeInt()
                TELECINE_DESCRIPTOR.index -> builder.telecine = deserializeString().let { XavcHdProfileTelecine.fromValue(it) }
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    builder.correctErrors()
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy