
commonMain.aws.sdk.kotlin.services.mediaconvert.serde.MotionImageInserterDocumentDeserializer.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.MotionImageInserter
import aws.sdk.kotlin.services.mediaconvert.model.MotionImageInsertionMode
import aws.sdk.kotlin.services.mediaconvert.model.MotionImagePlayback
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 deserializeMotionImageInserterDocument(deserializer: Deserializer): MotionImageInserter {
val builder = MotionImageInserter.Builder()
val FRAMERATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("framerate"))
val INPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("input"))
val INSERTIONMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("insertionMode"))
val OFFSET_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("offset"))
val PLAYBACK_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("playback"))
val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("startTime"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(FRAMERATE_DESCRIPTOR)
field(INPUT_DESCRIPTOR)
field(INSERTIONMODE_DESCRIPTOR)
field(OFFSET_DESCRIPTOR)
field(PLAYBACK_DESCRIPTOR)
field(STARTTIME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
FRAMERATE_DESCRIPTOR.index -> builder.framerate = deserializeMotionImageInsertionFramerateDocument(deserializer)
INPUT_DESCRIPTOR.index -> builder.input = deserializeString()
INSERTIONMODE_DESCRIPTOR.index -> builder.insertionMode = deserializeString().let { MotionImageInsertionMode.fromValue(it) }
OFFSET_DESCRIPTOR.index -> builder.offset = deserializeMotionImageInsertionOffsetDocument(deserializer)
PLAYBACK_DESCRIPTOR.index -> builder.playback = deserializeString().let { MotionImagePlayback.fromValue(it) }
STARTTIME_DESCRIPTOR.index -> builder.startTime = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy