commonMain.aws.sdk.kotlin.services.elastictranscoder.serde.JobOutputDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elastictranscoder-jvm Show documentation
Show all versions of elastictranscoder-jvm Show documentation
The AWS SDK for Kotlin client for Elastic Transcoder
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elastictranscoder.serde
import aws.sdk.kotlin.services.elastictranscoder.model.Clip
import aws.sdk.kotlin.services.elastictranscoder.model.JobOutput
import aws.sdk.kotlin.services.elastictranscoder.model.JobWatermark
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 deserializeJobOutputDocument(deserializer: Deserializer): JobOutput {
val builder = JobOutput.Builder()
val ALBUMART_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("AlbumArt"))
val APPLIEDCOLORSPACECONVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AppliedColorSpaceConversion"))
val CAPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Captions"))
val COMPOSITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Composition"))
val DURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("Duration"))
val DURATIONMILLIS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("DurationMillis"))
val ENCRYPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Encryption"))
val FILESIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Long, JsonSerialName("FileSize"))
val FRAMERATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FrameRate"))
val HEIGHT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Height"))
val ID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Id"))
val KEY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Key"))
val PRESETID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PresetId"))
val ROTATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Rotate"))
val SEGMENTDURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SegmentDuration"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
val STATUSDETAIL_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("StatusDetail"))
val THUMBNAILENCRYPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ThumbnailEncryption"))
val THUMBNAILPATTERN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ThumbnailPattern"))
val WATERMARKS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Watermarks"))
val WIDTH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Width"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ALBUMART_DESCRIPTOR)
field(APPLIEDCOLORSPACECONVERSION_DESCRIPTOR)
field(CAPTIONS_DESCRIPTOR)
field(COMPOSITION_DESCRIPTOR)
field(DURATION_DESCRIPTOR)
field(DURATIONMILLIS_DESCRIPTOR)
field(ENCRYPTION_DESCRIPTOR)
field(FILESIZE_DESCRIPTOR)
field(FRAMERATE_DESCRIPTOR)
field(HEIGHT_DESCRIPTOR)
field(ID_DESCRIPTOR)
field(KEY_DESCRIPTOR)
field(PRESETID_DESCRIPTOR)
field(ROTATE_DESCRIPTOR)
field(SEGMENTDURATION_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(STATUSDETAIL_DESCRIPTOR)
field(THUMBNAILENCRYPTION_DESCRIPTOR)
field(THUMBNAILPATTERN_DESCRIPTOR)
field(WATERMARKS_DESCRIPTOR)
field(WIDTH_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ALBUMART_DESCRIPTOR.index -> builder.albumArt = deserializeJobAlbumArtDocument(deserializer)
APPLIEDCOLORSPACECONVERSION_DESCRIPTOR.index -> builder.appliedColorSpaceConversion = deserializeString()
CAPTIONS_DESCRIPTOR.index -> builder.captions = deserializeCaptionsDocument(deserializer)
COMPOSITION_DESCRIPTOR.index -> builder.composition =
deserializer.deserializeList(COMPOSITION_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeClipDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
DURATION_DESCRIPTOR.index -> builder.duration = deserializeLong()
DURATIONMILLIS_DESCRIPTOR.index -> builder.durationMillis = deserializeLong()
ENCRYPTION_DESCRIPTOR.index -> builder.encryption = deserializeEncryptionDocument(deserializer)
FILESIZE_DESCRIPTOR.index -> builder.fileSize = deserializeLong()
FRAMERATE_DESCRIPTOR.index -> builder.frameRate = deserializeString()
HEIGHT_DESCRIPTOR.index -> builder.height = deserializeInt()
ID_DESCRIPTOR.index -> builder.id = deserializeString()
KEY_DESCRIPTOR.index -> builder.key = deserializeString()
PRESETID_DESCRIPTOR.index -> builder.presetId = deserializeString()
ROTATE_DESCRIPTOR.index -> builder.rotate = deserializeString()
SEGMENTDURATION_DESCRIPTOR.index -> builder.segmentDuration = deserializeString()
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
STATUSDETAIL_DESCRIPTOR.index -> builder.statusDetail = deserializeString()
THUMBNAILENCRYPTION_DESCRIPTOR.index -> builder.thumbnailEncryption = deserializeEncryptionDocument(deserializer)
THUMBNAILPATTERN_DESCRIPTOR.index -> builder.thumbnailPattern = deserializeString()
WATERMARKS_DESCRIPTOR.index -> builder.watermarks =
deserializer.deserializeList(WATERMARKS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeJobWatermarkDocument(deserializer) } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
WIDTH_DESCRIPTOR.index -> builder.width = deserializeInt()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy