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

commonMain.aws.sdk.kotlin.services.mediapackage.serde.DashPackageDocumentSerializer.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.mediapackage.serde

import aws.sdk.kotlin.services.mediapackage.model.DashPackage
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 serializeDashPackageDocument(serializer: Serializer, input: DashPackage) {
    val ADTRIGGERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("adTriggers"))
    val ADSONDELIVERYRESTRICTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("adsOnDeliveryRestrictions"))
    val ENCRYPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("encryption"))
    val INCLUDEIFRAMEONLYSTREAM_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("includeIframeOnlyStream"))
    val MANIFESTLAYOUT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("manifestLayout"))
    val MANIFESTWINDOWSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("manifestWindowSeconds"))
    val MINBUFFERTIMESECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("minBufferTimeSeconds"))
    val MINUPDATEPERIODSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("minUpdatePeriodSeconds"))
    val PERIODTRIGGERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("periodTriggers"))
    val PROFILE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("profile"))
    val SEGMENTDURATIONSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("segmentDurationSeconds"))
    val SEGMENTTEMPLATEFORMAT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("segmentTemplateFormat"))
    val STREAMSELECTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("streamSelection"))
    val SUGGESTEDPRESENTATIONDELAYSECONDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("suggestedPresentationDelaySeconds"))
    val UTCTIMING_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("utcTiming"))
    val UTCTIMINGURI_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("utcTimingUri"))
    val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
        field(ADTRIGGERS_DESCRIPTOR)
        field(ADSONDELIVERYRESTRICTIONS_DESCRIPTOR)
        field(ENCRYPTION_DESCRIPTOR)
        field(INCLUDEIFRAMEONLYSTREAM_DESCRIPTOR)
        field(MANIFESTLAYOUT_DESCRIPTOR)
        field(MANIFESTWINDOWSECONDS_DESCRIPTOR)
        field(MINBUFFERTIMESECONDS_DESCRIPTOR)
        field(MINUPDATEPERIODSECONDS_DESCRIPTOR)
        field(PERIODTRIGGERS_DESCRIPTOR)
        field(PROFILE_DESCRIPTOR)
        field(SEGMENTDURATIONSECONDS_DESCRIPTOR)
        field(SEGMENTTEMPLATEFORMAT_DESCRIPTOR)
        field(STREAMSELECTION_DESCRIPTOR)
        field(SUGGESTEDPRESENTATIONDELAYSECONDS_DESCRIPTOR)
        field(UTCTIMING_DESCRIPTOR)
        field(UTCTIMINGURI_DESCRIPTOR)
    }

    serializer.serializeStruct(OBJ_DESCRIPTOR) {
        if (input.adTriggers != null) {
            listField(ADTRIGGERS_DESCRIPTOR) {
                for (el0 in input.adTriggers) {
                    serializeString(el0.value)
                }
            }
        }
        input.adsOnDeliveryRestrictions?.let { field(ADSONDELIVERYRESTRICTIONS_DESCRIPTOR, it.value) }
        input.encryption?.let { field(ENCRYPTION_DESCRIPTOR, it, ::serializeDashEncryptionDocument) }
        input.includeIframeOnlyStream?.let { field(INCLUDEIFRAMEONLYSTREAM_DESCRIPTOR, it) }
        input.manifestLayout?.let { field(MANIFESTLAYOUT_DESCRIPTOR, it.value) }
        input.manifestWindowSeconds?.let { field(MANIFESTWINDOWSECONDS_DESCRIPTOR, it) }
        input.minBufferTimeSeconds?.let { field(MINBUFFERTIMESECONDS_DESCRIPTOR, it) }
        input.minUpdatePeriodSeconds?.let { field(MINUPDATEPERIODSECONDS_DESCRIPTOR, it) }
        if (input.periodTriggers != null) {
            listField(PERIODTRIGGERS_DESCRIPTOR) {
                for (el0 in input.periodTriggers) {
                    serializeString(el0.value)
                }
            }
        }
        input.profile?.let { field(PROFILE_DESCRIPTOR, it.value) }
        input.segmentDurationSeconds?.let { field(SEGMENTDURATIONSECONDS_DESCRIPTOR, it) }
        input.segmentTemplateFormat?.let { field(SEGMENTTEMPLATEFORMAT_DESCRIPTOR, it.value) }
        input.streamSelection?.let { field(STREAMSELECTION_DESCRIPTOR, it, ::serializeStreamSelectionDocument) }
        input.suggestedPresentationDelaySeconds?.let { field(SUGGESTEDPRESENTATIONDELAYSECONDS_DESCRIPTOR, it) }
        input.utcTiming?.let { field(UTCTIMING_DESCRIPTOR, it.value) }
        input.utcTimingUri?.let { field(UTCTIMINGURI_DESCRIPTOR, it) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy