
commonMain.aws.sdk.kotlin.services.medialive.transform.EncoderSettingsDocumentDeserializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.medialive.transform
import aws.sdk.kotlin.services.medialive.model.AudioDescription
import aws.sdk.kotlin.services.medialive.model.CaptionDescription
import aws.sdk.kotlin.services.medialive.model.EncoderSettings
import aws.sdk.kotlin.services.medialive.model.OutputGroup
import aws.sdk.kotlin.services.medialive.model.VideoDescription
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 deserializeEncoderSettingsDocument(deserializer: Deserializer): EncoderSettings {
val builder = EncoderSettings.Builder()
val AUDIODESCRIPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("audioDescriptions"))
val AVAILBLANKING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("availBlanking"))
val AVAILCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("availConfiguration"))
val BLACKOUTSLATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("blackoutSlate"))
val CAPTIONDESCRIPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("captionDescriptions"))
val FEATUREACTIVATIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("featureActivations"))
val GLOBALCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("globalConfiguration"))
val MOTIONGRAPHICSCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("motionGraphicsConfiguration"))
val NIELSENCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("nielsenConfiguration"))
val OUTPUTGROUPS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("outputGroups"))
val TIMECODECONFIG_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("timecodeConfig"))
val VIDEODESCRIPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("videoDescriptions"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(AUDIODESCRIPTIONS_DESCRIPTOR)
field(AVAILBLANKING_DESCRIPTOR)
field(AVAILCONFIGURATION_DESCRIPTOR)
field(BLACKOUTSLATE_DESCRIPTOR)
field(CAPTIONDESCRIPTIONS_DESCRIPTOR)
field(FEATUREACTIVATIONS_DESCRIPTOR)
field(GLOBALCONFIGURATION_DESCRIPTOR)
field(MOTIONGRAPHICSCONFIGURATION_DESCRIPTOR)
field(NIELSENCONFIGURATION_DESCRIPTOR)
field(OUTPUTGROUPS_DESCRIPTOR)
field(TIMECODECONFIG_DESCRIPTOR)
field(VIDEODESCRIPTIONS_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
AUDIODESCRIPTIONS_DESCRIPTOR.index -> builder.audioDescriptions =
deserializer.deserializeList(AUDIODESCRIPTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeAudioDescriptionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
AVAILBLANKING_DESCRIPTOR.index -> builder.availBlanking = deserializeAvailBlankingDocument(deserializer)
AVAILCONFIGURATION_DESCRIPTOR.index -> builder.availConfiguration = deserializeAvailConfigurationDocument(deserializer)
BLACKOUTSLATE_DESCRIPTOR.index -> builder.blackoutSlate = deserializeBlackoutSlateDocument(deserializer)
CAPTIONDESCRIPTIONS_DESCRIPTOR.index -> builder.captionDescriptions =
deserializer.deserializeList(CAPTIONDESCRIPTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeCaptionDescriptionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
FEATUREACTIVATIONS_DESCRIPTOR.index -> builder.featureActivations = deserializeFeatureActivationsDocument(deserializer)
GLOBALCONFIGURATION_DESCRIPTOR.index -> builder.globalConfiguration = deserializeGlobalConfigurationDocument(deserializer)
MOTIONGRAPHICSCONFIGURATION_DESCRIPTOR.index -> builder.motionGraphicsConfiguration = deserializeMotionGraphicsConfigurationDocument(deserializer)
NIELSENCONFIGURATION_DESCRIPTOR.index -> builder.nielsenConfiguration = deserializeNielsenConfigurationDocument(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)
VIDEODESCRIPTIONS_DESCRIPTOR.index -> builder.videoDescriptions =
deserializer.deserializeList(VIDEODESCRIPTIONS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeVideoDescriptionDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
null -> break@loop
else -> skipValue()
}
}
}
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy