{-# 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 #-}
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
data MpdSettings = MpdSettings'
{
MpdSettings -> Maybe MpdScte35Esam
scte35Esam :: Prelude.Maybe MpdScte35Esam,
MpdSettings -> Maybe MpdAudioDuration
audioDuration :: Prelude.Maybe MpdAudioDuration,
MpdSettings -> Maybe MpdScte35Source
scte35Source :: Prelude.Maybe MpdScte35Source,
MpdSettings -> Maybe MpdAccessibilityCaptionHints
accessibilityCaptionHints :: Prelude.Maybe MpdAccessibilityCaptionHints,
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)
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
}
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)
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)
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)
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)
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
]
)