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

commonMain.aws.sdk.kotlin.services.mediaconvert.transform.InsertableImageDocumentSerializer.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.InsertableImage
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.Serializer
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 serializeInsertableImageDocument(serializer: Serializer, input: InsertableImage) {
    val DURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("duration"))
    val FADEIN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("fadeIn"))
    val FADEOUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("fadeOut"))
    val HEIGHT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("height"))
    val IMAGEINSERTERINPUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("imageInserterInput"))
    val IMAGEX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("imageX"))
    val IMAGEY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("imageY"))
    val LAYER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("layer"))
    val OPACITY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("opacity"))
    val STARTTIME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("startTime"))
    val WIDTH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("width"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(DURATION_DESCRIPTOR)
        field(FADEIN_DESCRIPTOR)
        field(FADEOUT_DESCRIPTOR)
        field(HEIGHT_DESCRIPTOR)
        field(IMAGEINSERTERINPUT_DESCRIPTOR)
        field(IMAGEX_DESCRIPTOR)
        field(IMAGEY_DESCRIPTOR)
        field(LAYER_DESCRIPTOR)
        field(OPACITY_DESCRIPTOR)
        field(STARTTIME_DESCRIPTOR)
        field(WIDTH_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        if (input.duration != 0) field(DURATION_DESCRIPTOR, input.duration)
        if (input.fadeIn != 0) field(FADEIN_DESCRIPTOR, input.fadeIn)
        if (input.fadeOut != 0) field(FADEOUT_DESCRIPTOR, input.fadeOut)
        if (input.height != 0) field(HEIGHT_DESCRIPTOR, input.height)
        input.imageInserterInput?.let { field(IMAGEINSERTERINPUT_DESCRIPTOR, it) }
        if (input.imagex != 0) field(IMAGEX_DESCRIPTOR, input.imagex)
        if (input.imagey != 0) field(IMAGEY_DESCRIPTOR, input.imagey)
        if (input.layer != 0) field(LAYER_DESCRIPTOR, input.layer)
        if (input.opacity != 0) field(OPACITY_DESCRIPTOR, input.opacity)
        input.startTime?.let { field(STARTTIME_DESCRIPTOR, it) }
        if (input.width != 0) field(WIDTH_DESCRIPTOR, input.width)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy