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