commonMain.aws.sdk.kotlin.services.mediapackage.serde.DashPackageDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mediapackage-jvm Show documentation
Show all versions of mediapackage-jvm Show documentation
The AWS SDK for Kotlin client for MediaPackage
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.AdTriggersElement
import aws.sdk.kotlin.services.mediapackage.model.AdsOnDeliveryRestrictions
import aws.sdk.kotlin.services.mediapackage.model.DashPackage
import aws.sdk.kotlin.services.mediapackage.model.ManifestLayout
import aws.sdk.kotlin.services.mediapackage.model.PeriodTriggersElement
import aws.sdk.kotlin.services.mediapackage.model.Profile
import aws.sdk.kotlin.services.mediapackage.model.SegmentTemplateFormat
import aws.sdk.kotlin.services.mediapackage.model.UtcTiming
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 deserializeDashPackageDocument(deserializer: Deserializer): DashPackage {
val builder = DashPackage.Builder()
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)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ADTRIGGERS_DESCRIPTOR.index -> builder.adTriggers =
deserializer.deserializeList(ADTRIGGERS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString().let { AdTriggersElement.fromValue(it) } } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
ADSONDELIVERYRESTRICTIONS_DESCRIPTOR.index -> builder.adsOnDeliveryRestrictions = deserializeString().let { AdsOnDeliveryRestrictions.fromValue(it) }
ENCRYPTION_DESCRIPTOR.index -> builder.encryption = deserializeDashEncryptionDocument(deserializer)
INCLUDEIFRAMEONLYSTREAM_DESCRIPTOR.index -> builder.includeIframeOnlyStream = deserializeBoolean()
MANIFESTLAYOUT_DESCRIPTOR.index -> builder.manifestLayout = deserializeString().let { ManifestLayout.fromValue(it) }
MANIFESTWINDOWSECONDS_DESCRIPTOR.index -> builder.manifestWindowSeconds = deserializeInt()
MINBUFFERTIMESECONDS_DESCRIPTOR.index -> builder.minBufferTimeSeconds = deserializeInt()
MINUPDATEPERIODSECONDS_DESCRIPTOR.index -> builder.minUpdatePeriodSeconds = deserializeInt()
PERIODTRIGGERS_DESCRIPTOR.index -> builder.periodTriggers =
deserializer.deserializeList(PERIODTRIGGERS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString().let { PeriodTriggersElement.fromValue(it) } } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
PROFILE_DESCRIPTOR.index -> builder.profile = deserializeString().let { Profile.fromValue(it) }
SEGMENTDURATIONSECONDS_DESCRIPTOR.index -> builder.segmentDurationSeconds = deserializeInt()
SEGMENTTEMPLATEFORMAT_DESCRIPTOR.index -> builder.segmentTemplateFormat = deserializeString().let { SegmentTemplateFormat.fromValue(it) }
STREAMSELECTION_DESCRIPTOR.index -> builder.streamSelection = deserializeStreamSelectionDocument(deserializer)
SUGGESTEDPRESENTATIONDELAYSECONDS_DESCRIPTOR.index -> builder.suggestedPresentationDelaySeconds = deserializeInt()
UTCTIMING_DESCRIPTOR.index -> builder.utcTiming = deserializeString().let { UtcTiming.fromValue(it) }
UTCTIMINGURI_DESCRIPTOR.index -> builder.utcTimingUri = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy