
commonMain.aws.sdk.kotlin.services.mediaconvert.serde.Xavc4kProfileSettingsDocumentDeserializer.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.Xavc4kProfileBitrateClass
import aws.sdk.kotlin.services.mediaconvert.model.Xavc4kProfileCodecProfile
import aws.sdk.kotlin.services.mediaconvert.model.Xavc4kProfileQualityTuningLevel
import aws.sdk.kotlin.services.mediaconvert.model.Xavc4kProfileSettings
import aws.sdk.kotlin.services.mediaconvert.model.XavcFlickerAdaptiveQuantization
import aws.sdk.kotlin.services.mediaconvert.model.XavcGopBReference
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 deserializeXavc4kProfileSettingsDocument(deserializer: Deserializer): Xavc4kProfileSettings {
val builder = Xavc4kProfileSettings.Builder()
val BITRATECLASS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("bitrateClass"))
val CODECPROFILE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("codecProfile"))
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 QUALITYTUNINGLEVEL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("qualityTuningLevel"))
val SLICES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("slices"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(BITRATECLASS_DESCRIPTOR)
field(CODECPROFILE_DESCRIPTOR)
field(FLICKERADAPTIVEQUANTIZATION_DESCRIPTOR)
field(GOPBREFERENCE_DESCRIPTOR)
field(GOPCLOSEDCADENCE_DESCRIPTOR)
field(HRDBUFFERSIZE_DESCRIPTOR)
field(QUALITYTUNINGLEVEL_DESCRIPTOR)
field(SLICES_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
BITRATECLASS_DESCRIPTOR.index -> builder.bitrateClass = deserializeString().let { Xavc4kProfileBitrateClass.fromValue(it) }
CODECPROFILE_DESCRIPTOR.index -> builder.codecProfile = deserializeString().let { Xavc4kProfileCodecProfile.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()
QUALITYTUNINGLEVEL_DESCRIPTOR.index -> builder.qualityTuningLevel = deserializeString().let { Xavc4kProfileQualityTuningLevel.fromValue(it) }
SLICES_DESCRIPTOR.index -> builder.slices = deserializeInt()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy