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

commonMain.aws.sdk.kotlin.services.mediaconvert.transform.JobSettingsDocumentDeserializer.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.Input
import aws.sdk.kotlin.services.mediaconvert.model.JobSettings
import aws.sdk.kotlin.services.mediaconvert.model.OutputGroup
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
import kotlin.collections.mutableListOf

internal fun deserializeJobSettingsDocument(deserializer: Deserializer): JobSettings {
    val builder = JobSettings.Builder()
    val ADAVAILOFFSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("adAvailOffset"))
    val AVAILBLANKING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("availBlanking"))
    val ESAM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("esam"))
    val EXTENDEDDATASERVICES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("extendedDataServices"))
    val INPUTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("inputs"))
    val KANTARWATERMARK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("kantarWatermark"))
    val MOTIONIMAGEINSERTER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("motionImageInserter"))
    val NIELSENCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("nielsenConfiguration"))
    val NIELSENNONLINEARWATERMARK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("nielsenNonLinearWatermark"))
    val OUTPUTGROUPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("outputGroups"))
    val TIMECODECONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("timecodeConfig"))
    val TIMEDMETADATAINSERTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("timedMetadataInsertion"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ADAVAILOFFSET_DESCRIPTOR)
        field(AVAILBLANKING_DESCRIPTOR)
        field(ESAM_DESCRIPTOR)
        field(EXTENDEDDATASERVICES_DESCRIPTOR)
        field(INPUTS_DESCRIPTOR)
        field(KANTARWATERMARK_DESCRIPTOR)
        field(MOTIONIMAGEINSERTER_DESCRIPTOR)
        field(NIELSENCONFIGURATION_DESCRIPTOR)
        field(NIELSENNONLINEARWATERMARK_DESCRIPTOR)
        field(OUTPUTGROUPS_DESCRIPTOR)
        field(TIMECODECONFIG_DESCRIPTOR)
        field(TIMEDMETADATAINSERTION_DESCRIPTOR)
    }

    deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
        loop@while (true) {
            when (findNextFieldIndex()) {
                ADAVAILOFFSET_DESCRIPTOR.index -> builder.adAvailOffset = deserializeInt()
                AVAILBLANKING_DESCRIPTOR.index -> builder.availBlanking = deserializeAvailBlankingDocument(deserializer)
                ESAM_DESCRIPTOR.index -> builder.esam = deserializeEsamSettingsDocument(deserializer)
                EXTENDEDDATASERVICES_DESCRIPTOR.index -> builder.extendedDataServices = deserializeExtendedDataServicesDocument(deserializer)
                INPUTS_DESCRIPTOR.index -> builder.inputs =
                    deserializer.deserializeList(INPUTS_DESCRIPTOR) {
                        val col0 = mutableListOf()
                        while (hasNextElement()) {
                            val el0 = if (nextHasValue()) { deserializeInputDocument(deserializer) } else { deserializeNull(); continue }
                            col0.add(el0)
                        }
                        col0
                    }
                KANTARWATERMARK_DESCRIPTOR.index -> builder.kantarWatermark = deserializeKantarWatermarkSettingsDocument(deserializer)
                MOTIONIMAGEINSERTER_DESCRIPTOR.index -> builder.motionImageInserter = deserializeMotionImageInserterDocument(deserializer)
                NIELSENCONFIGURATION_DESCRIPTOR.index -> builder.nielsenConfiguration = deserializeNielsenConfigurationDocument(deserializer)
                NIELSENNONLINEARWATERMARK_DESCRIPTOR.index -> builder.nielsenNonLinearWatermark = deserializeNielsenNonLinearWatermarkSettingsDocument(deserializer)
                OUTPUTGROUPS_DESCRIPTOR.index -> builder.outputGroups =
                    deserializer.deserializeList(OUTPUTGROUPS_DESCRIPTOR) {
                        val col0 = mutableListOf()
                        while (hasNextElement()) {
                            val el0 = if (nextHasValue()) { deserializeOutputGroupDocument(deserializer) } else { deserializeNull(); continue }
                            col0.add(el0)
                        }
                        col0
                    }
                TIMECODECONFIG_DESCRIPTOR.index -> builder.timecodeConfig = deserializeTimecodeConfigDocument(deserializer)
                TIMEDMETADATAINSERTION_DESCRIPTOR.index -> builder.timedMetadataInsertion = deserializeTimedMetadataInsertionDocument(deserializer)
                null -> break@loop
                else -> skipValue()
            }
        }
    }
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy