{-# 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.VideoBlackFailoverSettings 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 VideoBlackFailoverSettings = VideoBlackFailoverSettings'
{
VideoBlackFailoverSettings -> Maybe Double
blackDetectThreshold :: Prelude.Maybe Prelude.Double,
VideoBlackFailoverSettings -> Maybe Natural
videoBlackThresholdMsec :: Prelude.Maybe Prelude.Natural
}
deriving (VideoBlackFailoverSettings -> VideoBlackFailoverSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoBlackFailoverSettings -> VideoBlackFailoverSettings -> Bool
$c/= :: VideoBlackFailoverSettings -> VideoBlackFailoverSettings -> Bool
== :: VideoBlackFailoverSettings -> VideoBlackFailoverSettings -> Bool
$c== :: VideoBlackFailoverSettings -> VideoBlackFailoverSettings -> Bool
Prelude.Eq, ReadPrec [VideoBlackFailoverSettings]
ReadPrec VideoBlackFailoverSettings
Int -> ReadS VideoBlackFailoverSettings
ReadS [VideoBlackFailoverSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VideoBlackFailoverSettings]
$creadListPrec :: ReadPrec [VideoBlackFailoverSettings]
readPrec :: ReadPrec VideoBlackFailoverSettings
$creadPrec :: ReadPrec VideoBlackFailoverSettings
readList :: ReadS [VideoBlackFailoverSettings]
$creadList :: ReadS [VideoBlackFailoverSettings]
readsPrec :: Int -> ReadS VideoBlackFailoverSettings
$creadsPrec :: Int -> ReadS VideoBlackFailoverSettings
Prelude.Read, Int -> VideoBlackFailoverSettings -> ShowS
[VideoBlackFailoverSettings] -> ShowS
VideoBlackFailoverSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoBlackFailoverSettings] -> ShowS
$cshowList :: [VideoBlackFailoverSettings] -> ShowS
show :: VideoBlackFailoverSettings -> String
$cshow :: VideoBlackFailoverSettings -> String
showsPrec :: Int -> VideoBlackFailoverSettings -> ShowS
$cshowsPrec :: Int -> VideoBlackFailoverSettings -> ShowS
Prelude.Show, forall x.
Rep VideoBlackFailoverSettings x -> VideoBlackFailoverSettings
forall x.
VideoBlackFailoverSettings -> Rep VideoBlackFailoverSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VideoBlackFailoverSettings x -> VideoBlackFailoverSettings
$cfrom :: forall x.
VideoBlackFailoverSettings -> Rep VideoBlackFailoverSettings x
Prelude.Generic)
newVideoBlackFailoverSettings ::
VideoBlackFailoverSettings
newVideoBlackFailoverSettings :: VideoBlackFailoverSettings
newVideoBlackFailoverSettings =
VideoBlackFailoverSettings'
{ $sel:blackDetectThreshold:VideoBlackFailoverSettings' :: Maybe Double
blackDetectThreshold =
forall a. Maybe a
Prelude.Nothing,
$sel:videoBlackThresholdMsec:VideoBlackFailoverSettings' :: Maybe Natural
videoBlackThresholdMsec = forall a. Maybe a
Prelude.Nothing
}
videoBlackFailoverSettings_blackDetectThreshold :: Lens.Lens' VideoBlackFailoverSettings (Prelude.Maybe Prelude.Double)
videoBlackFailoverSettings_blackDetectThreshold :: Lens' VideoBlackFailoverSettings (Maybe Double)
videoBlackFailoverSettings_blackDetectThreshold = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoBlackFailoverSettings' {Maybe Double
blackDetectThreshold :: Maybe Double
$sel:blackDetectThreshold:VideoBlackFailoverSettings' :: VideoBlackFailoverSettings -> Maybe Double
blackDetectThreshold} -> Maybe Double
blackDetectThreshold) (\s :: VideoBlackFailoverSettings
s@VideoBlackFailoverSettings' {} Maybe Double
a -> VideoBlackFailoverSettings
s {$sel:blackDetectThreshold:VideoBlackFailoverSettings' :: Maybe Double
blackDetectThreshold = Maybe Double
a} :: VideoBlackFailoverSettings)
videoBlackFailoverSettings_videoBlackThresholdMsec :: Lens.Lens' VideoBlackFailoverSettings (Prelude.Maybe Prelude.Natural)
videoBlackFailoverSettings_videoBlackThresholdMsec :: Lens' VideoBlackFailoverSettings (Maybe Natural)
videoBlackFailoverSettings_videoBlackThresholdMsec = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VideoBlackFailoverSettings' {Maybe Natural
videoBlackThresholdMsec :: Maybe Natural
$sel:videoBlackThresholdMsec:VideoBlackFailoverSettings' :: VideoBlackFailoverSettings -> Maybe Natural
videoBlackThresholdMsec} -> Maybe Natural
videoBlackThresholdMsec) (\s :: VideoBlackFailoverSettings
s@VideoBlackFailoverSettings' {} Maybe Natural
a -> VideoBlackFailoverSettings
s {$sel:videoBlackThresholdMsec:VideoBlackFailoverSettings' :: Maybe Natural
videoBlackThresholdMsec = Maybe Natural
a} :: VideoBlackFailoverSettings)
instance Data.FromJSON VideoBlackFailoverSettings where
parseJSON :: Value -> Parser VideoBlackFailoverSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VideoBlackFailoverSettings"
( \Object
x ->
Maybe Double -> Maybe Natural -> VideoBlackFailoverSettings
VideoBlackFailoverSettings'
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
"blackDetectThreshold")
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
"videoBlackThresholdMsec")
)
instance Prelude.Hashable VideoBlackFailoverSettings where
hashWithSalt :: Int -> VideoBlackFailoverSettings -> Int
hashWithSalt Int
_salt VideoBlackFailoverSettings' {Maybe Double
Maybe Natural
videoBlackThresholdMsec :: Maybe Natural
blackDetectThreshold :: Maybe Double
$sel:videoBlackThresholdMsec:VideoBlackFailoverSettings' :: VideoBlackFailoverSettings -> Maybe Natural
$sel:blackDetectThreshold:VideoBlackFailoverSettings' :: VideoBlackFailoverSettings -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
blackDetectThreshold
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
videoBlackThresholdMsec
instance Prelude.NFData VideoBlackFailoverSettings where
rnf :: VideoBlackFailoverSettings -> ()
rnf VideoBlackFailoverSettings' {Maybe Double
Maybe Natural
videoBlackThresholdMsec :: Maybe Natural
blackDetectThreshold :: Maybe Double
$sel:videoBlackThresholdMsec:VideoBlackFailoverSettings' :: VideoBlackFailoverSettings -> Maybe Natural
$sel:blackDetectThreshold:VideoBlackFailoverSettings' :: VideoBlackFailoverSettings -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
blackDetectThreshold
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
videoBlackThresholdMsec
instance Data.ToJSON VideoBlackFailoverSettings where
toJSON :: VideoBlackFailoverSettings -> Value
toJSON VideoBlackFailoverSettings' {Maybe Double
Maybe Natural
videoBlackThresholdMsec :: Maybe Natural
blackDetectThreshold :: Maybe Double
$sel:videoBlackThresholdMsec:VideoBlackFailoverSettings' :: VideoBlackFailoverSettings -> Maybe Natural
$sel:blackDetectThreshold:VideoBlackFailoverSettings' :: VideoBlackFailoverSettings -> Maybe Double
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"blackDetectThreshold" 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 Double
blackDetectThreshold,
(Key
"videoBlackThresholdMsec" 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
videoBlackThresholdMsec
]
)