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

commonMain.aws.sdk.kotlin.services.mediaconvert.transform.AutomatedAbrRuleDocumentSerializer.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.AutomatedAbrRule
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 serializeAutomatedAbrRuleDocument(serializer: Serializer, input: AutomatedAbrRule) {
    val ALLOWEDRENDITIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("allowedRenditions"))
    val FORCEINCLUDERENDITIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("forceIncludeRenditions"))
    val MINBOTTOMRENDITIONSIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("minBottomRenditionSize"))
    val MINTOPRENDITIONSIZE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("minTopRenditionSize"))
    val TYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("type"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ALLOWEDRENDITIONS_DESCRIPTOR)
        field(FORCEINCLUDERENDITIONS_DESCRIPTOR)
        field(MINBOTTOMRENDITIONSIZE_DESCRIPTOR)
        field(MINTOPRENDITIONSIZE_DESCRIPTOR)
        field(TYPE_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        if (input.allowedRenditions != null) {
            listField(ALLOWEDRENDITIONS_DESCRIPTOR) {
                for (el0 in input.allowedRenditions) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeAllowedRenditionSizeDocument))
                }
            }
        }
        if (input.forceIncludeRenditions != null) {
            listField(FORCEINCLUDERENDITIONS_DESCRIPTOR) {
                for (el0 in input.forceIncludeRenditions) {
                    serializeSdkSerializable(asSdkSerializable(el0, ::serializeForceIncludeRenditionSizeDocument))
                }
            }
        }
        input.minBottomRenditionSize?.let { field(MINBOTTOMRENDITIONSIZE_DESCRIPTOR, it, ::serializeMinBottomRenditionSizeDocument) }
        input.minTopRenditionSize?.let { field(MINTOPRENDITIONSIZE_DESCRIPTOR, it, ::serializeMinTopRenditionSizeDocument) }
        input.type?.let { field(TYPE_DESCRIPTOR, it.value) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy