{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.Fmp4NielsenId3Behavior
import Amazonka.MediaLive.Types.Fmp4TimedMetadataBehavior
import qualified Amazonka.Prelude as Prelude
data Fmp4HlsSettings = Fmp4HlsSettings'
{
Fmp4HlsSettings -> Maybe Text
audioRenditionSets :: Prelude.Maybe Prelude.Text,
Fmp4HlsSettings -> Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior :: Prelude.Maybe Fmp4NielsenId3Behavior,
Fmp4HlsSettings -> Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior :: Prelude.Maybe Fmp4TimedMetadataBehavior
}
deriving (Fmp4HlsSettings -> Fmp4HlsSettings -> Bool
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]
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
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. 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'
{ $sel:audioRenditionSets:Fmp4HlsSettings' :: Maybe Text
audioRenditionSets =
forall a. Maybe a
Prelude.Nothing,
$sel:nielsenId3Behavior:Fmp4HlsSettings' :: Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior = forall a. Maybe a
Prelude.Nothing,
$sel:timedMetadataBehavior:Fmp4HlsSettings' :: Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior = forall a. Maybe a
Prelude.Nothing
}
fmp4HlsSettings_audioRenditionSets :: Lens.Lens' Fmp4HlsSettings (Prelude.Maybe Prelude.Text)
fmp4HlsSettings_audioRenditionSets :: Lens' Fmp4HlsSettings (Maybe Text)
fmp4HlsSettings_audioRenditionSets = 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_nielsenId3Behavior :: Lens.Lens' Fmp4HlsSettings (Prelude.Maybe Fmp4NielsenId3Behavior)
fmp4HlsSettings_nielsenId3Behavior :: Lens' Fmp4HlsSettings (Maybe Fmp4NielsenId3Behavior)
fmp4HlsSettings_nielsenId3Behavior = 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_timedMetadataBehavior :: Lens.Lens' Fmp4HlsSettings (Prelude.Maybe Fmp4TimedMetadataBehavior)
fmp4HlsSettings_timedMetadataBehavior :: Lens' Fmp4HlsSettings (Maybe Fmp4TimedMetadataBehavior)
fmp4HlsSettings_timedMetadataBehavior = 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 Data.FromJSON Fmp4HlsSettings where
parseJSON :: Value -> Parser Fmp4HlsSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Fmp4HlsSettings"
( \Object
x ->
Maybe Text
-> Maybe Fmp4NielsenId3Behavior
-> Maybe Fmp4TimedMetadataBehavior
-> Fmp4HlsSettings
Fmp4HlsSettings'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"audioRenditionSets")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"nielsenId3Behavior")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"timedMetadataBehavior")
)
instance Prelude.Hashable Fmp4HlsSettings where
hashWithSalt :: Int -> Fmp4HlsSettings -> Int
hashWithSalt Int
_salt Fmp4HlsSettings' {Maybe Text
Maybe Fmp4NielsenId3Behavior
Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior :: Maybe Fmp4TimedMetadataBehavior
nielsenId3Behavior :: Maybe Fmp4NielsenId3Behavior
audioRenditionSets :: Maybe Text
$sel:timedMetadataBehavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4TimedMetadataBehavior
$sel:nielsenId3Behavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4NielsenId3Behavior
$sel:audioRenditionSets:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
audioRenditionSets
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior
instance Prelude.NFData Fmp4HlsSettings where
rnf :: Fmp4HlsSettings -> ()
rnf Fmp4HlsSettings' {Maybe Text
Maybe Fmp4NielsenId3Behavior
Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior :: Maybe Fmp4TimedMetadataBehavior
nielsenId3Behavior :: Maybe Fmp4NielsenId3Behavior
audioRenditionSets :: Maybe Text
$sel:timedMetadataBehavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4TimedMetadataBehavior
$sel:nielsenId3Behavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4NielsenId3Behavior
$sel:audioRenditionSets:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
audioRenditionSets
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior
instance Data.ToJSON Fmp4HlsSettings where
toJSON :: Fmp4HlsSettings -> Value
toJSON Fmp4HlsSettings' {Maybe Text
Maybe Fmp4NielsenId3Behavior
Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior :: Maybe Fmp4TimedMetadataBehavior
nielsenId3Behavior :: Maybe Fmp4NielsenId3Behavior
audioRenditionSets :: Maybe Text
$sel:timedMetadataBehavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4TimedMetadataBehavior
$sel:nielsenId3Behavior:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Fmp4NielsenId3Behavior
$sel:audioRenditionSets:Fmp4HlsSettings' :: Fmp4HlsSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"audioRenditionSets" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
audioRenditionSets,
(Key
"nielsenId3Behavior" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Fmp4NielsenId3Behavior
nielsenId3Behavior,
(Key
"timedMetadataBehavior" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Fmp4TimedMetadataBehavior
timedMetadataBehavior
]
)