{-# 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.MediaLive.Types.Fmp4HlsSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.Fmp4NielsenId3Behavior
import Amazonka.MediaLive.Types.Fmp4TimedMetadataBehavior
import qualified Amazonka.Prelude as Prelude
data Fmp4HlsSettings = Fmp4HlsSettings'
{
Fmp4HlsSettings -> Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior :: Prelude.Maybe Fmp4NielsenId3Behavior,
Fmp4HlsSettings -> Maybe Text
audioRenditionSets :: Prelude.Maybe Prelude.Text,
Fmp4HlsSettings -> Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior :: Prelude.Maybe Fmp4TimedMetadataBehavior
}
deriving (Fmp4HlsSettings -> Fmp4HlsSettings -> Bool
(Fmp4HlsSettings -> Fmp4HlsSettings -> Bool)
-> (Fmp4HlsSettings -> Fmp4HlsSettings -> Bool)
-> Eq Fmp4HlsSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Fmp4HlsSettings -> Fmp4HlsSettings -> Bool
$c/= :: Fmp4HlsSettings -> Fmp4HlsSettings -> Bool
== :: Fmp4HlsSettings -> Fmp4HlsSettings -> Bool
$c== :: Fmp4HlsSettings -> Fmp4HlsSettings -> Bool
Prelude.Eq, ReadPrec [Fmp4HlsSettings]
ReadPrec Fmp4HlsSettings
Int -> ReadS Fmp4HlsSettings
ReadS [Fmp4HlsSettings]
(Int -> ReadS Fmp4HlsSettings)
-> ReadS [Fmp4HlsSettings]
-> ReadPrec Fmp4HlsSettings
-> ReadPrec [Fmp4HlsSettings]
-> Read Fmp4HlsSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Fmp4HlsSettings]
$creadListPrec :: ReadPrec [Fmp4HlsSettings]
readPrec :: ReadPrec Fmp4HlsSettings
$creadPrec :: ReadPrec Fmp4HlsSettings
readList :: ReadS [Fmp4HlsSettings]
$creadList :: ReadS [Fmp4HlsSettings]
readsPrec :: Int -> ReadS Fmp4HlsSettings
$creadsPrec :: Int -> ReadS Fmp4HlsSettings
Prelude.Read, Int -> Fmp4HlsSettings -> ShowS
[Fmp4HlsSettings] -> ShowS
Fmp4HlsSettings -> String
(Int -> Fmp4HlsSettings -> ShowS)
-> (Fmp4HlsSettings -> String)
-> ([Fmp4HlsSettings] -> ShowS)
-> Show Fmp4HlsSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Fmp4HlsSettings] -> ShowS
$cshowList :: [Fmp4HlsSettings] -> ShowS
show :: Fmp4HlsSettings -> String
$cshow :: Fmp4HlsSettings -> String
showsPrec :: Int -> Fmp4HlsSettings -> ShowS
$cshowsPrec :: Int -> Fmp4HlsSettings -> ShowS
Prelude.Show, (forall x. Fmp4HlsSettings -> Rep Fmp4HlsSettings x)
-> (forall x. Rep Fmp4HlsSettings x -> Fmp4HlsSettings)
-> Generic Fmp4HlsSettings
forall x. Rep Fmp4HlsSettings x -> Fmp4HlsSettings
forall x. Fmp4HlsSettings -> Rep Fmp4HlsSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Fmp4HlsSettings x -> Fmp4HlsSettings
$cfrom :: forall x. Fmp4HlsSettings -> Rep Fmp4HlsSettings x
Prelude.Generic)
newFmp4HlsSettings ::
Fmp4HlsSettings
newFmp4HlsSettings :: Fmp4HlsSettings
newFmp4HlsSettings =
Fmp4HlsSettings' :: Maybe Fmp4NielsenId3Behavior
-> Maybe Text -> Maybe Fmp4TimedMetadataBehavior -> Fmp4HlsSettings
Fmp4HlsSettings'
{ $sel:nielsenId3Behavior:Fmp4HlsSettings' :: Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior =
Maybe Fmp4NielsenId3Behavior
forall a. Maybe a
Prelude.Nothing,
$sel:audioRenditionSets:Fmp4HlsSettings' :: Maybe Text
audioRenditionSets = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timedMetadataBehavior:Fmp4HlsSettings' :: Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior = Maybe Fmp4TimedMetadataBehavior
forall a. Maybe a
Prelude.Nothing
}
fmp4HlsSettings_nielsenId3Behavior :: Lens.Lens' Fmp4HlsSettings (Prelude.Maybe Fmp4NielsenId3Behavior)
fmp4HlsSettings_nielsenId3Behavior :: (Maybe Fmp4NielsenId3Behavior -> f (Maybe Fmp4NielsenId3Behavior))
-> Fmp4HlsSettings -> f Fmp4HlsSettings
fmp4HlsSettings_nielsenId3Behavior = (Fmp4HlsSettings -> Maybe Fmp4NielsenId3Behavior)
-> (Fmp4HlsSettings
-> Maybe Fmp4NielsenId3Behavior -> Fmp4HlsSettings)
-> Lens
Fmp4HlsSettings
Fmp4HlsSettings
(Maybe Fmp4NielsenId3Behavior)
(Maybe Fmp4NielsenId3Behavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmp4HlsSettings' {Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior :: Maybe Fmp4NielsenId3Behavior
$sel:nielsenId3Behavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior} -> Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior) (\s :: Fmp4HlsSettings
s@Fmp4HlsSettings' {} Maybe Fmp4NielsenId3Behavior
a -> Fmp4HlsSettings
s {$sel:nielsenId3Behavior:Fmp4HlsSettings' :: Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior = Maybe Fmp4NielsenId3Behavior
a} :: Fmp4HlsSettings)
fmp4HlsSettings_audioRenditionSets :: Lens.Lens' Fmp4HlsSettings (Prelude.Maybe Prelude.Text)
fmp4HlsSettings_audioRenditionSets :: (Maybe Text -> f (Maybe Text))
-> Fmp4HlsSettings -> f Fmp4HlsSettings
fmp4HlsSettings_audioRenditionSets = (Fmp4HlsSettings -> Maybe Text)
-> (Fmp4HlsSettings -> Maybe Text -> Fmp4HlsSettings)
-> Lens Fmp4HlsSettings Fmp4HlsSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmp4HlsSettings' {Maybe Text
audioRenditionSets :: Maybe Text
$sel:audioRenditionSets:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Text
audioRenditionSets} -> Maybe Text
audioRenditionSets) (\s :: Fmp4HlsSettings
s@Fmp4HlsSettings' {} Maybe Text
a -> Fmp4HlsSettings
s {$sel:audioRenditionSets:Fmp4HlsSettings' :: Maybe Text
audioRenditionSets = Maybe Text
a} :: Fmp4HlsSettings)
fmp4HlsSettings_timedMetadataBehavior :: Lens.Lens' Fmp4HlsSettings (Prelude.Maybe Fmp4TimedMetadataBehavior)
fmp4HlsSettings_timedMetadataBehavior :: (Maybe Fmp4TimedMetadataBehavior
-> f (Maybe Fmp4TimedMetadataBehavior))
-> Fmp4HlsSettings -> f Fmp4HlsSettings
fmp4HlsSettings_timedMetadataBehavior = (Fmp4HlsSettings -> Maybe Fmp4TimedMetadataBehavior)
-> (Fmp4HlsSettings
-> Maybe Fmp4TimedMetadataBehavior -> Fmp4HlsSettings)
-> Lens
Fmp4HlsSettings
Fmp4HlsSettings
(Maybe Fmp4TimedMetadataBehavior)
(Maybe Fmp4TimedMetadataBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Fmp4HlsSettings' {Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior :: Maybe Fmp4TimedMetadataBehavior
$sel:timedMetadataBehavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior} -> Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior) (\s :: Fmp4HlsSettings
s@Fmp4HlsSettings' {} Maybe Fmp4TimedMetadataBehavior
a -> Fmp4HlsSettings
s {$sel:timedMetadataBehavior:Fmp4HlsSettings' :: Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior = Maybe Fmp4TimedMetadataBehavior
a} :: Fmp4HlsSettings)
instance Core.FromJSON Fmp4HlsSettings where
parseJSON :: Value -> Parser Fmp4HlsSettings
parseJSON =
String
-> (Object -> Parser Fmp4HlsSettings)
-> Value
-> Parser Fmp4HlsSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Fmp4HlsSettings"
( \Object
x ->
Maybe Fmp4NielsenId3Behavior
-> Maybe Text -> Maybe Fmp4TimedMetadataBehavior -> Fmp4HlsSettings
Fmp4HlsSettings'
(Maybe Fmp4NielsenId3Behavior
-> Maybe Text
-> Maybe Fmp4TimedMetadataBehavior
-> Fmp4HlsSettings)
-> Parser (Maybe Fmp4NielsenId3Behavior)
-> Parser
(Maybe Text -> Maybe Fmp4TimedMetadataBehavior -> Fmp4HlsSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Fmp4NielsenId3Behavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nielsenId3Behavior")
Parser
(Maybe Text -> Maybe Fmp4TimedMetadataBehavior -> Fmp4HlsSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Fmp4TimedMetadataBehavior -> Fmp4HlsSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioRenditionSets")
Parser (Maybe Fmp4TimedMetadataBehavior -> Fmp4HlsSettings)
-> Parser (Maybe Fmp4TimedMetadataBehavior)
-> Parser Fmp4HlsSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Fmp4TimedMetadataBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timedMetadataBehavior")
)
instance Prelude.Hashable Fmp4HlsSettings
instance Prelude.NFData Fmp4HlsSettings
instance Core.ToJSON Fmp4HlsSettings where
toJSON :: Fmp4HlsSettings -> Value
toJSON Fmp4HlsSettings' {Maybe Text
Maybe Fmp4NielsenId3Behavior
Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior :: Maybe Fmp4TimedMetadataBehavior
audioRenditionSets :: Maybe Text
nielsenId3Behavior :: Maybe Fmp4NielsenId3Behavior
$sel:timedMetadataBehavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4TimedMetadataBehavior
$sel:audioRenditionSets:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Text
$sel:nielsenId3Behavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4NielsenId3Behavior
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"nielsenId3Behavior" Text -> Fmp4NielsenId3Behavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Fmp4NielsenId3Behavior -> Pair)
-> Maybe Fmp4NielsenId3Behavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior,
(Text
"audioRenditionSets" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
audioRenditionSets,
(Text
"timedMetadataBehavior" Text -> Fmp4TimedMetadataBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Fmp4TimedMetadataBehavior -> Pair)
-> Maybe Fmp4TimedMetadataBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior
]
)