{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Hdr10Settings = Hdr10Settings'
{
Hdr10Settings -> Maybe Natural
maxCll :: Prelude.Maybe Prelude.Natural,
Hdr10Settings -> Maybe Natural
maxFall :: Prelude.Maybe Prelude.Natural
}
deriving (Hdr10Settings -> Hdr10Settings -> Bool
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]
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
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. 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'
{ $sel:maxCll:Hdr10Settings' :: Maybe Natural
maxCll = forall a. Maybe a
Prelude.Nothing,
$sel:maxFall:Hdr10Settings' :: Maybe Natural
maxFall = forall a. Maybe a
Prelude.Nothing
}
hdr10Settings_maxCll :: Lens.Lens' Hdr10Settings (Prelude.Maybe Prelude.Natural)
hdr10Settings_maxCll :: Lens' Hdr10Settings (Maybe Natural)
hdr10Settings_maxCll = 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)
hdr10Settings_maxFall :: Lens.Lens' Hdr10Settings (Prelude.Maybe Prelude.Natural)
hdr10Settings_maxFall :: Lens' Hdr10Settings (Maybe Natural)
hdr10Settings_maxFall = 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)
instance Data.FromJSON Hdr10Settings where
parseJSON :: Value -> Parser Hdr10Settings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Hdr10Settings"
( \Object
x ->
Maybe Natural -> Maybe Natural -> Hdr10Settings
Hdr10Settings'
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
"maxCll")
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
"maxFall")
)
instance Prelude.Hashable Hdr10Settings where
hashWithSalt :: Int -> Hdr10Settings -> Int
hashWithSalt Int
_salt Hdr10Settings' {Maybe Natural
maxFall :: Maybe Natural
maxCll :: Maybe Natural
$sel:maxFall:Hdr10Settings' :: Hdr10Settings -> Maybe Natural
$sel:maxCll:Hdr10Settings' :: Hdr10Settings -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxCll
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxFall
instance Prelude.NFData Hdr10Settings where
rnf :: Hdr10Settings -> ()
rnf Hdr10Settings' {Maybe Natural
maxFall :: Maybe Natural
maxCll :: Maybe Natural
$sel:maxFall:Hdr10Settings' :: Hdr10Settings -> Maybe Natural
$sel:maxCll:Hdr10Settings' :: Hdr10Settings -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxCll
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxFall
instance Data.ToJSON Hdr10Settings where
toJSON :: Hdr10Settings -> Value
toJSON Hdr10Settings' {Maybe Natural
maxFall :: Maybe Natural
maxCll :: Maybe Natural
$sel:maxFall:Hdr10Settings' :: Hdr10Settings -> Maybe Natural
$sel:maxCll:Hdr10Settings' :: Hdr10Settings -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"maxCll" 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 Natural
maxCll,
(Key
"maxFall" 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 Natural
maxFall
]
)