commonMain.aws.sdk.kotlin.services.elastictranscoder.serde.VideoParametersDocumentSerializer.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.VideoParameters
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 serializeVideoParametersDocument(serializer: Serializer, input: VideoParameters) {
val ASPECTRATIO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AspectRatio"))
val BITRATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("BitRate"))
val CODEC_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Codec"))
val CODECOPTIONS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("CodecOptions"))
val DISPLAYASPECTRATIO_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DisplayAspectRatio"))
val FIXEDGOP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FixedGOP"))
val FRAMERATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FrameRate"))
val KEYFRAMESMAXDIST_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("KeyframesMaxDist"))
val MAXFRAMERATE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MaxFrameRate"))
val MAXHEIGHT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MaxHeight"))
val MAXWIDTH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("MaxWidth"))
val PADDINGPOLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PaddingPolicy"))
val RESOLUTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Resolution"))
val SIZINGPOLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SizingPolicy"))
val WATERMARKS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Watermarks"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ASPECTRATIO_DESCRIPTOR)
field(BITRATE_DESCRIPTOR)
field(CODEC_DESCRIPTOR)
field(CODECOPTIONS_DESCRIPTOR)
field(DISPLAYASPECTRATIO_DESCRIPTOR)
field(FIXEDGOP_DESCRIPTOR)
field(FRAMERATE_DESCRIPTOR)
field(KEYFRAMESMAXDIST_DESCRIPTOR)
field(MAXFRAMERATE_DESCRIPTOR)
field(MAXHEIGHT_DESCRIPTOR)
field(MAXWIDTH_DESCRIPTOR)
field(PADDINGPOLICY_DESCRIPTOR)
field(RESOLUTION_DESCRIPTOR)
field(SIZINGPOLICY_DESCRIPTOR)
field(WATERMARKS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.codec?.let { field(CODEC_DESCRIPTOR, it) }
if (input.codecOptions != null) {
mapField(CODECOPTIONS_DESCRIPTOR) {
input.codecOptions.forEach { (key, value) ->
entry(key, value)
}
}
}
input.keyframesMaxDist?.let { field(KEYFRAMESMAXDIST_DESCRIPTOR, it) }
input.fixedGop?.let { field(FIXEDGOP_DESCRIPTOR, it) }
input.bitRate?.let { field(BITRATE_DESCRIPTOR, it) }
input.frameRate?.let { field(FRAMERATE_DESCRIPTOR, it) }
input.maxFrameRate?.let { field(MAXFRAMERATE_DESCRIPTOR, it) }
input.resolution?.let { field(RESOLUTION_DESCRIPTOR, it) }
input.aspectRatio?.let { field(ASPECTRATIO_DESCRIPTOR, it) }
input.maxWidth?.let { field(MAXWIDTH_DESCRIPTOR, it) }
input.maxHeight?.let { field(MAXHEIGHT_DESCRIPTOR, it) }
input.displayAspectRatio?.let { field(DISPLAYASPECTRATIO_DESCRIPTOR, it) }
input.sizingPolicy?.let { field(SIZINGPOLICY_DESCRIPTOR, it) }
input.paddingPolicy?.let { field(PADDINGPOLICY_DESCRIPTOR, it) }
if (input.watermarks != null) {
listField(WATERMARKS_DESCRIPTOR) {
for (el0 in input.watermarks) {
serializeSdkSerializable(asSdkSerializable(el0, ::serializePresetWatermarkDocument))
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy