{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaConvert.Types.MpdSettings
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.MpdSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.MpdAccessibilityCaptionHints
import Amazonka.MediaConvert.Types.MpdAudioDuration
import Amazonka.MediaConvert.Types.MpdCaptionContainerType
import Amazonka.MediaConvert.Types.MpdScte35Esam
import Amazonka.MediaConvert.Types.MpdScte35Source
import qualified Amazonka.Prelude as Prelude

-- | These settings relate to the fragmented MP4 container for the segments
-- in your DASH outputs.
--
-- /See:/ 'newMpdSettings' smart constructor.
data MpdSettings = MpdSettings'
  { -- | Use this setting only when you specify SCTE-35 markers from ESAM. Choose
    -- INSERT to put SCTE-35 markers in this output at the insertion points
    -- that you specify in an ESAM XML document. Provide the document in the
    -- setting SCC XML (sccXml).
    MpdSettings -> Maybe MpdScte35Esam
scte35Esam :: Prelude.Maybe MpdScte35Esam,
    -- | Specify this setting only when your output will be consumed by a
    -- downstream repackaging workflow that is sensitive to very small duration
    -- differences between video and audio. For this situation, choose Match
    -- video duration (MATCH_VIDEO_DURATION). In all other cases, keep the
    -- default value, Default codec duration (DEFAULT_CODEC_DURATION). When you
    -- choose Match video duration, MediaConvert pads the output audio streams
    -- with silence or trims them to ensure that the total duration of each
    -- audio stream is at least as long as the total duration of the video
    -- stream. After padding or trimming, the audio stream duration is no more
    -- than one frame longer than the video stream. MediaConvert applies audio
    -- padding or trimming only to the end of the last segment of the output.
    -- For unsegmented outputs, MediaConvert adds padding only to the end of
    -- the file. When you keep the default value, any minor discrepancies
    -- between audio and video duration will depend on your output audio codec.
    MpdSettings -> Maybe MpdAudioDuration
audioDuration :: Prelude.Maybe MpdAudioDuration,
    -- | Ignore this setting unless you have SCTE-35 markers in your input video
    -- file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that
    -- appear in your input to also appear in this output. Choose None (NONE)
    -- if you don\'t want those SCTE-35 markers in this output.
    MpdSettings -> Maybe MpdScte35Source
scte35Source :: Prelude.Maybe MpdScte35Source,
    -- | Optional. Choose Include (INCLUDE) to have MediaConvert mark up your
    -- DASH manifest with elements for embedded 608 captions. This markup
    -- isn\'t generally required, but some video players require it to discover
    -- and play embedded 608 captions. Keep the default value, Exclude
    -- (EXCLUDE), to leave these elements out. When you enable this setting,
    -- this is the markup that MediaConvert includes in your manifest:
    MpdSettings -> Maybe MpdAccessibilityCaptionHints
accessibilityCaptionHints :: Prelude.Maybe MpdAccessibilityCaptionHints,
    -- | Use this setting only in DASH output groups that include sidecar TTML or
    -- IMSC captions. You specify sidecar captions in a separate output from
    -- your audio and video. Choose Raw (RAW) for captions in a single XML file
    -- in a raw container. Choose Fragmented MPEG-4 (FRAGMENTED_MP4) for
    -- captions in XML format contained within fragmented MP4 files. This set
    -- of fragmented MP4 files is separate from your video and audio fragmented
    -- MP4 files.
    MpdSettings -> Maybe MpdCaptionContainerType
captionContainerType :: Prelude.Maybe MpdCaptionContainerType
  }
  deriving (MpdSettings -> MpdSettings -> Bool
(MpdSettings -> MpdSettings -> Bool)
-> (MpdSettings -> MpdSettings -> Bool) -> Eq MpdSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MpdSettings -> MpdSettings -> Bool
$c/= :: MpdSettings -> MpdSettings -> Bool
== :: MpdSettings -> MpdSettings -> Bool
$c== :: MpdSettings -> MpdSettings -> Bool
Prelude.Eq, ReadPrec [MpdSettings]
ReadPrec MpdSettings
Int -> ReadS MpdSettings
ReadS [MpdSettings]
(Int -> ReadS MpdSettings)
-> ReadS [MpdSettings]
-> ReadPrec MpdSettings
-> ReadPrec [MpdSettings]
-> Read MpdSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MpdSettings]
$creadListPrec :: ReadPrec [MpdSettings]
readPrec :: ReadPrec MpdSettings
$creadPrec :: ReadPrec MpdSettings
readList :: ReadS [MpdSettings]
$creadList :: ReadS [MpdSettings]
readsPrec :: Int -> ReadS MpdSettings
$creadsPrec :: Int -> ReadS MpdSettings
Prelude.Read, Int -> MpdSettings -> ShowS
[MpdSettings] -> ShowS
MpdSettings -> String
(Int -> MpdSettings -> ShowS)
-> (MpdSettings -> String)
-> ([MpdSettings] -> ShowS)
-> Show MpdSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MpdSettings] -> ShowS
$cshowList :: [MpdSettings] -> ShowS
show :: MpdSettings -> String
$cshow :: MpdSettings -> String
showsPrec :: Int -> MpdSettings -> ShowS
$cshowsPrec :: Int -> MpdSettings -> ShowS
Prelude.Show, (forall x. MpdSettings -> Rep MpdSettings x)
-> (forall x. Rep MpdSettings x -> MpdSettings)
-> Generic MpdSettings
forall x. Rep MpdSettings x -> MpdSettings
forall x. MpdSettings -> Rep MpdSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MpdSettings x -> MpdSettings
$cfrom :: forall x. MpdSettings -> Rep MpdSettings x
Prelude.Generic)

-- |
-- Create a value of 'MpdSettings' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'scte35Esam', 'mpdSettings_scte35Esam' - Use this setting only when you specify SCTE-35 markers from ESAM. Choose
-- INSERT to put SCTE-35 markers in this output at the insertion points
-- that you specify in an ESAM XML document. Provide the document in the
-- setting SCC XML (sccXml).
--
-- 'audioDuration', 'mpdSettings_audioDuration' - Specify this setting only when your output will be consumed by a
-- downstream repackaging workflow that is sensitive to very small duration
-- differences between video and audio. For this situation, choose Match
-- video duration (MATCH_VIDEO_DURATION). In all other cases, keep the
-- default value, Default codec duration (DEFAULT_CODEC_DURATION). When you
-- choose Match video duration, MediaConvert pads the output audio streams
-- with silence or trims them to ensure that the total duration of each
-- audio stream is at least as long as the total duration of the video
-- stream. After padding or trimming, the audio stream duration is no more
-- than one frame longer than the video stream. MediaConvert applies audio
-- padding or trimming only to the end of the last segment of the output.
-- For unsegmented outputs, MediaConvert adds padding only to the end of
-- the file. When you keep the default value, any minor discrepancies
-- between audio and video duration will depend on your output audio codec.
--
-- 'scte35Source', 'mpdSettings_scte35Source' - Ignore this setting unless you have SCTE-35 markers in your input video
-- file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that
-- appear in your input to also appear in this output. Choose None (NONE)
-- if you don\'t want those SCTE-35 markers in this output.
--
-- 'accessibilityCaptionHints', 'mpdSettings_accessibilityCaptionHints' - Optional. Choose Include (INCLUDE) to have MediaConvert mark up your
-- DASH manifest with elements for embedded 608 captions. This markup
-- isn\'t generally required, but some video players require it to discover
-- and play embedded 608 captions. Keep the default value, Exclude
-- (EXCLUDE), to leave these elements out. When you enable this setting,
-- this is the markup that MediaConvert includes in your manifest:
--
-- 'captionContainerType', 'mpdSettings_captionContainerType' - Use this setting only in DASH output groups that include sidecar TTML or
-- IMSC captions. You specify sidecar captions in a separate output from
-- your audio and video. Choose Raw (RAW) for captions in a single XML file
-- in a raw container. Choose Fragmented MPEG-4 (FRAGMENTED_MP4) for
-- captions in XML format contained within fragmented MP4 files. This set
-- of fragmented MP4 files is separate from your video and audio fragmented
-- MP4 files.
newMpdSettings ::
  MpdSettings
newMpdSettings :: MpdSettings
newMpdSettings =
  MpdSettings' :: Maybe MpdScte35Esam
-> Maybe MpdAudioDuration
-> Maybe MpdScte35Source
-> Maybe MpdAccessibilityCaptionHints
-> Maybe MpdCaptionContainerType
-> MpdSettings
MpdSettings'
    { $sel:scte35Esam:MpdSettings' :: Maybe MpdScte35Esam
scte35Esam = Maybe MpdScte35Esam
forall a. Maybe a
Prelude.Nothing,
      $sel:audioDuration:MpdSettings' :: Maybe MpdAudioDuration
audioDuration = Maybe MpdAudioDuration
forall a. Maybe a
Prelude.Nothing,
      $sel:scte35Source:MpdSettings' :: Maybe MpdScte35Source
scte35Source = Maybe MpdScte35Source
forall a. Maybe a
Prelude.Nothing,
      $sel:accessibilityCaptionHints:MpdSettings' :: Maybe MpdAccessibilityCaptionHints
accessibilityCaptionHints = Maybe MpdAccessibilityCaptionHints
forall a. Maybe a
Prelude.Nothing,
      $sel:captionContainerType:MpdSettings' :: Maybe MpdCaptionContainerType
captionContainerType = Maybe MpdCaptionContainerType
forall a. Maybe a
Prelude.Nothing
    }

-- | Use this setting only when you specify SCTE-35 markers from ESAM. Choose
-- INSERT to put SCTE-35 markers in this output at the insertion points
-- that you specify in an ESAM XML document. Provide the document in the
-- setting SCC XML (sccXml).
mpdSettings_scte35Esam :: Lens.Lens' MpdSettings (Prelude.Maybe MpdScte35Esam)
mpdSettings_scte35Esam :: (Maybe MpdScte35Esam -> f (Maybe MpdScte35Esam))
-> MpdSettings -> f MpdSettings
mpdSettings_scte35Esam = (MpdSettings -> Maybe MpdScte35Esam)
-> (MpdSettings -> Maybe MpdScte35Esam -> MpdSettings)
-> Lens
     MpdSettings MpdSettings (Maybe MpdScte35Esam) (Maybe MpdScte35Esam)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MpdSettings' {Maybe MpdScte35Esam
scte35Esam :: Maybe MpdScte35Esam
$sel:scte35Esam:MpdSettings' :: MpdSettings -> Maybe MpdScte35Esam
scte35Esam} -> Maybe MpdScte35Esam
scte35Esam) (\s :: MpdSettings
s@MpdSettings' {} Maybe MpdScte35Esam
a -> MpdSettings
s {$sel:scte35Esam:MpdSettings' :: Maybe MpdScte35Esam
scte35Esam = Maybe MpdScte35Esam
a} :: MpdSettings)

-- | Specify this setting only when your output will be consumed by a
-- downstream repackaging workflow that is sensitive to very small duration
-- differences between video and audio. For this situation, choose Match
-- video duration (MATCH_VIDEO_DURATION). In all other cases, keep the
-- default value, Default codec duration (DEFAULT_CODEC_DURATION). When you
-- choose Match video duration, MediaConvert pads the output audio streams
-- with silence or trims them to ensure that the total duration of each
-- audio stream is at least as long as the total duration of the video
-- stream. After padding or trimming, the audio stream duration is no more
-- than one frame longer than the video stream. MediaConvert applies audio
-- padding or trimming only to the end of the last segment of the output.
-- For unsegmented outputs, MediaConvert adds padding only to the end of
-- the file. When you keep the default value, any minor discrepancies
-- between audio and video duration will depend on your output audio codec.
mpdSettings_audioDuration :: Lens.Lens' MpdSettings (Prelude.Maybe MpdAudioDuration)
mpdSettings_audioDuration :: (Maybe MpdAudioDuration -> f (Maybe MpdAudioDuration))
-> MpdSettings -> f MpdSettings
mpdSettings_audioDuration = (MpdSettings -> Maybe MpdAudioDuration)
-> (MpdSettings -> Maybe MpdAudioDuration -> MpdSettings)
-> Lens
     MpdSettings
     MpdSettings
     (Maybe MpdAudioDuration)
     (Maybe MpdAudioDuration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MpdSettings' {Maybe MpdAudioDuration
audioDuration :: Maybe MpdAudioDuration
$sel:audioDuration:MpdSettings' :: MpdSettings -> Maybe MpdAudioDuration
audioDuration} -> Maybe MpdAudioDuration
audioDuration) (\s :: MpdSettings
s@MpdSettings' {} Maybe MpdAudioDuration
a -> MpdSettings
s {$sel:audioDuration:MpdSettings' :: Maybe MpdAudioDuration
audioDuration = Maybe MpdAudioDuration
a} :: MpdSettings)

-- | Ignore this setting unless you have SCTE-35 markers in your input video
-- file. Choose Passthrough (PASSTHROUGH) if you want SCTE-35 markers that
-- appear in your input to also appear in this output. Choose None (NONE)
-- if you don\'t want those SCTE-35 markers in this output.
mpdSettings_scte35Source :: Lens.Lens' MpdSettings (Prelude.Maybe MpdScte35Source)
mpdSettings_scte35Source :: (Maybe MpdScte35Source -> f (Maybe MpdScte35Source))
-> MpdSettings -> f MpdSettings
mpdSettings_scte35Source = (MpdSettings -> Maybe MpdScte35Source)
-> (MpdSettings -> Maybe MpdScte35Source -> MpdSettings)
-> Lens
     MpdSettings
     MpdSettings
     (Maybe MpdScte35Source)
     (Maybe MpdScte35Source)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MpdSettings' {Maybe MpdScte35Source
scte35Source :: Maybe MpdScte35Source
$sel:scte35Source:MpdSettings' :: MpdSettings -> Maybe MpdScte35Source
scte35Source} -> Maybe MpdScte35Source
scte35Source) (\s :: MpdSettings
s@MpdSettings' {} Maybe MpdScte35Source
a -> MpdSettings
s {$sel:scte35Source:MpdSettings' :: Maybe MpdScte35Source
scte35Source = Maybe MpdScte35Source
a} :: MpdSettings)

-- | Optional. Choose Include (INCLUDE) to have MediaConvert mark up your
-- DASH manifest with elements for embedded 608 captions. This markup
-- isn\'t generally required, but some video players require it to discover
-- and play embedded 608 captions. Keep the default value, Exclude
-- (EXCLUDE), to leave these elements out. When you enable this setting,
-- this is the markup that MediaConvert includes in your manifest:
mpdSettings_accessibilityCaptionHints :: Lens.Lens' MpdSettings (Prelude.Maybe MpdAccessibilityCaptionHints)
mpdSettings_accessibilityCaptionHints :: (Maybe MpdAccessibilityCaptionHints
 -> f (Maybe MpdAccessibilityCaptionHints))
-> MpdSettings -> f MpdSettings
mpdSettings_accessibilityCaptionHints = (MpdSettings -> Maybe MpdAccessibilityCaptionHints)
-> (MpdSettings
    -> Maybe MpdAccessibilityCaptionHints -> MpdSettings)
-> Lens
     MpdSettings
     MpdSettings
     (Maybe MpdAccessibilityCaptionHints)
     (Maybe MpdAccessibilityCaptionHints)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MpdSettings' {Maybe MpdAccessibilityCaptionHints
accessibilityCaptionHints :: Maybe MpdAccessibilityCaptionHints
$sel:accessibilityCaptionHints:MpdSettings' :: MpdSettings -> Maybe MpdAccessibilityCaptionHints
accessibilityCaptionHints} -> Maybe MpdAccessibilityCaptionHints
accessibilityCaptionHints) (\s :: MpdSettings
s@MpdSettings' {} Maybe MpdAccessibilityCaptionHints
a -> MpdSettings
s {$sel:accessibilityCaptionHints:MpdSettings' :: Maybe MpdAccessibilityCaptionHints
accessibilityCaptionHints = Maybe MpdAccessibilityCaptionHints
a} :: MpdSettings)

-- | Use this setting only in DASH output groups that include sidecar TTML or
-- IMSC captions. You specify sidecar captions in a separate output from
-- your audio and video. Choose Raw (RAW) for captions in a single XML file
-- in a raw container. Choose Fragmented MPEG-4 (FRAGMENTED_MP4) for
-- captions in XML format contained within fragmented MP4 files. This set
-- of fragmented MP4 files is separate from your video and audio fragmented
-- MP4 files.
mpdSettings_captionContainerType :: Lens.Lens' MpdSettings (Prelude.Maybe MpdCaptionContainerType)
mpdSettings_captionContainerType :: (Maybe MpdCaptionContainerType
 -> f (Maybe MpdCaptionContainerType))
-> MpdSettings -> f MpdSettings
mpdSettings_captionContainerType = (MpdSettings -> Maybe MpdCaptionContainerType)
-> (MpdSettings -> Maybe MpdCaptionContainerType -> MpdSettings)
-> Lens
     MpdSettings
     MpdSettings
     (Maybe MpdCaptionContainerType)
     (Maybe MpdCaptionContainerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MpdSettings' {Maybe MpdCaptionContainerType
captionContainerType :: Maybe MpdCaptionContainerType
$sel:captionContainerType:MpdSettings' :: MpdSettings -> Maybe MpdCaptionContainerType
captionContainerType} -> Maybe MpdCaptionContainerType
captionContainerType) (\s :: MpdSettings
s@MpdSettings' {} Maybe MpdCaptionContainerType
a -> MpdSettings
s {$sel:captionContainerType:MpdSettings' :: Maybe MpdCaptionContainerType
captionContainerType = Maybe MpdCaptionContainerType
a} :: MpdSettings)

instance Core.FromJSON MpdSettings where
  parseJSON :: Value -> Parser MpdSettings
parseJSON =
    String
-> (Object -> Parser MpdSettings) -> Value -> Parser MpdSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MpdSettings"
      ( \Object
x ->
          Maybe MpdScte35Esam
-> Maybe MpdAudioDuration
-> Maybe MpdScte35Source
-> Maybe MpdAccessibilityCaptionHints
-> Maybe MpdCaptionContainerType
-> MpdSettings
MpdSettings'
            (Maybe MpdScte35Esam
 -> Maybe MpdAudioDuration
 -> Maybe MpdScte35Source
 -> Maybe MpdAccessibilityCaptionHints
 -> Maybe MpdCaptionContainerType
 -> MpdSettings)
-> Parser (Maybe MpdScte35Esam)
-> Parser
     (Maybe MpdAudioDuration
      -> Maybe MpdScte35Source
      -> Maybe MpdAccessibilityCaptionHints
      -> Maybe MpdCaptionContainerType
      -> MpdSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MpdScte35Esam)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scte35Esam")
            Parser
  (Maybe MpdAudioDuration
   -> Maybe MpdScte35Source
   -> Maybe MpdAccessibilityCaptionHints
   -> Maybe MpdCaptionContainerType
   -> MpdSettings)
-> Parser (Maybe MpdAudioDuration)
-> Parser
     (Maybe MpdScte35Source
      -> Maybe MpdAccessibilityCaptionHints
      -> Maybe MpdCaptionContainerType
      -> MpdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MpdAudioDuration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioDuration")
            Parser
  (Maybe MpdScte35Source
   -> Maybe MpdAccessibilityCaptionHints
   -> Maybe MpdCaptionContainerType
   -> MpdSettings)
-> Parser (Maybe MpdScte35Source)
-> Parser
     (Maybe MpdAccessibilityCaptionHints
      -> Maybe MpdCaptionContainerType -> MpdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MpdScte35Source)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scte35Source")
            Parser
  (Maybe MpdAccessibilityCaptionHints
   -> Maybe MpdCaptionContainerType -> MpdSettings)
-> Parser (Maybe MpdAccessibilityCaptionHints)
-> Parser (Maybe MpdCaptionContainerType -> MpdSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MpdAccessibilityCaptionHints)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"accessibilityCaptionHints")
            Parser (Maybe MpdCaptionContainerType -> MpdSettings)
-> Parser (Maybe MpdCaptionContainerType) -> Parser MpdSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MpdCaptionContainerType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"captionContainerType")
      )

instance Prelude.Hashable MpdSettings

instance Prelude.NFData MpdSettings

instance Core.ToJSON MpdSettings where
  toJSON :: MpdSettings -> Value
toJSON MpdSettings' {Maybe MpdAccessibilityCaptionHints
Maybe MpdAudioDuration
Maybe MpdCaptionContainerType
Maybe MpdScte35Esam
Maybe MpdScte35Source
captionContainerType :: Maybe MpdCaptionContainerType
accessibilityCaptionHints :: Maybe MpdAccessibilityCaptionHints
scte35Source :: Maybe MpdScte35Source
audioDuration :: Maybe MpdAudioDuration
scte35Esam :: Maybe MpdScte35Esam
$sel:captionContainerType:MpdSettings' :: MpdSettings -> Maybe MpdCaptionContainerType
$sel:accessibilityCaptionHints:MpdSettings' :: MpdSettings -> Maybe MpdAccessibilityCaptionHints
$sel:scte35Source:MpdSettings' :: MpdSettings -> Maybe MpdScte35Source
$sel:audioDuration:MpdSettings' :: MpdSettings -> Maybe MpdAudioDuration
$sel:scte35Esam:MpdSettings' :: MpdSettings -> Maybe MpdScte35Esam
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"scte35Esam" Text -> MpdScte35Esam -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MpdScte35Esam -> Pair) -> Maybe MpdScte35Esam -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MpdScte35Esam
scte35Esam,
            (Text
"audioDuration" Text -> MpdAudioDuration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MpdAudioDuration -> Pair) -> Maybe MpdAudioDuration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MpdAudioDuration
audioDuration,
            (Text
"scte35Source" Text -> MpdScte35Source -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MpdScte35Source -> Pair) -> Maybe MpdScte35Source -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MpdScte35Source
scte35Source,
            (Text
"accessibilityCaptionHints" Text -> MpdAccessibilityCaptionHints -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MpdAccessibilityCaptionHints -> Pair)
-> Maybe MpdAccessibilityCaptionHints -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MpdAccessibilityCaptionHints
accessibilityCaptionHints,
            (Text
"captionContainerType" Text -> MpdCaptionContainerType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MpdCaptionContainerType -> Pair)
-> Maybe MpdCaptionContainerType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MpdCaptionContainerType
captionContainerType
          ]
      )