
commonMain.aws.sdk.kotlin.services.mediaconvert.serde.MsSmoothGroupSettingsDocumentDeserializer.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.MsSmoothAdditionalManifest
import aws.sdk.kotlin.services.mediaconvert.model.MsSmoothAudioDeduplication
import aws.sdk.kotlin.services.mediaconvert.model.MsSmoothFragmentLengthControl
import aws.sdk.kotlin.services.mediaconvert.model.MsSmoothGroupSettings
import aws.sdk.kotlin.services.mediaconvert.model.MsSmoothManifestEncoding
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 deserializeMsSmoothGroupSettingsDocument(deserializer: Deserializer): MsSmoothGroupSettings {
val builder = MsSmoothGroupSettings.Builder()
val ADDITIONALMANIFESTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("additionalManifests"))
val AUDIODEDUPLICATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("audioDeduplication"))
val DESTINATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("destination"))
val DESTINATIONSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("destinationSettings"))
val ENCRYPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("encryption"))
val FRAGMENTLENGTH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("fragmentLength"))
val FRAGMENTLENGTHCONTROL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("fragmentLengthControl"))
val MANIFESTENCODING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("manifestEncoding"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ADDITIONALMANIFESTS_DESCRIPTOR)
field(AUDIODEDUPLICATION_DESCRIPTOR)
field(DESTINATION_DESCRIPTOR)
field(DESTINATIONSETTINGS_DESCRIPTOR)
field(ENCRYPTION_DESCRIPTOR)
field(FRAGMENTLENGTH_DESCRIPTOR)
field(FRAGMENTLENGTHCONTROL_DESCRIPTOR)
field(MANIFESTENCODING_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ADDITIONALMANIFESTS_DESCRIPTOR.index -> builder.additionalManifests =
deserializer.deserializeList(ADDITIONALMANIFESTS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeMsSmoothAdditionalManifestDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
AUDIODEDUPLICATION_DESCRIPTOR.index -> builder.audioDeduplication = deserializeString().let { MsSmoothAudioDeduplication.fromValue(it) }
DESTINATION_DESCRIPTOR.index -> builder.destination = deserializeString()
DESTINATIONSETTINGS_DESCRIPTOR.index -> builder.destinationSettings = deserializeDestinationSettingsDocument(deserializer)
ENCRYPTION_DESCRIPTOR.index -> builder.encryption = deserializeMsSmoothEncryptionSettingsDocument(deserializer)
FRAGMENTLENGTH_DESCRIPTOR.index -> builder.fragmentLength = deserializeInt()
FRAGMENTLENGTHCONTROL_DESCRIPTOR.index -> builder.fragmentLengthControl = deserializeString().let { MsSmoothFragmentLengthControl.fromValue(it) }
MANIFESTENCODING_DESCRIPTOR.index -> builder.manifestEncoding = deserializeString().let { MsSmoothManifestEncoding.fromValue(it) }
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy