{-# 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.Rekognition.Types.BlackFrame where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BlackFrame = BlackFrame'
{
BlackFrame -> Maybe Double
maxPixelThreshold :: Prelude.Maybe Prelude.Double,
BlackFrame -> Maybe Double
minCoveragePercentage :: Prelude.Maybe Prelude.Double
}
deriving (BlackFrame -> BlackFrame -> Bool
(BlackFrame -> BlackFrame -> Bool)
-> (BlackFrame -> BlackFrame -> Bool) -> Eq BlackFrame
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlackFrame -> BlackFrame -> Bool
$c/= :: BlackFrame -> BlackFrame -> Bool
== :: BlackFrame -> BlackFrame -> Bool
$c== :: BlackFrame -> BlackFrame -> Bool
Prelude.Eq, ReadPrec [BlackFrame]
ReadPrec BlackFrame
Int -> ReadS BlackFrame
ReadS [BlackFrame]
(Int -> ReadS BlackFrame)
-> ReadS [BlackFrame]
-> ReadPrec BlackFrame
-> ReadPrec [BlackFrame]
-> Read BlackFrame
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BlackFrame]
$creadListPrec :: ReadPrec [BlackFrame]
readPrec :: ReadPrec BlackFrame
$creadPrec :: ReadPrec BlackFrame
readList :: ReadS [BlackFrame]
$creadList :: ReadS [BlackFrame]
readsPrec :: Int -> ReadS BlackFrame
$creadsPrec :: Int -> ReadS BlackFrame
Prelude.Read, Int -> BlackFrame -> ShowS
[BlackFrame] -> ShowS
BlackFrame -> String
(Int -> BlackFrame -> ShowS)
-> (BlackFrame -> String)
-> ([BlackFrame] -> ShowS)
-> Show BlackFrame
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BlackFrame] -> ShowS
$cshowList :: [BlackFrame] -> ShowS
show :: BlackFrame -> String
$cshow :: BlackFrame -> String
showsPrec :: Int -> BlackFrame -> ShowS
$cshowsPrec :: Int -> BlackFrame -> ShowS
Prelude.Show, (forall x. BlackFrame -> Rep BlackFrame x)
-> (forall x. Rep BlackFrame x -> BlackFrame) -> Generic BlackFrame
forall x. Rep BlackFrame x -> BlackFrame
forall x. BlackFrame -> Rep BlackFrame x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BlackFrame x -> BlackFrame
$cfrom :: forall x. BlackFrame -> Rep BlackFrame x
Prelude.Generic)
newBlackFrame ::
BlackFrame
newBlackFrame :: BlackFrame
newBlackFrame =
BlackFrame' :: Maybe Double -> Maybe Double -> BlackFrame
BlackFrame'
{ $sel:maxPixelThreshold:BlackFrame' :: Maybe Double
maxPixelThreshold = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:minCoveragePercentage:BlackFrame' :: Maybe Double
minCoveragePercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
blackFrame_maxPixelThreshold :: Lens.Lens' BlackFrame (Prelude.Maybe Prelude.Double)
blackFrame_maxPixelThreshold :: (Maybe Double -> f (Maybe Double)) -> BlackFrame -> f BlackFrame
blackFrame_maxPixelThreshold = (BlackFrame -> Maybe Double)
-> (BlackFrame -> Maybe Double -> BlackFrame)
-> Lens BlackFrame BlackFrame (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlackFrame' {Maybe Double
maxPixelThreshold :: Maybe Double
$sel:maxPixelThreshold:BlackFrame' :: BlackFrame -> Maybe Double
maxPixelThreshold} -> Maybe Double
maxPixelThreshold) (\s :: BlackFrame
s@BlackFrame' {} Maybe Double
a -> BlackFrame
s {$sel:maxPixelThreshold:BlackFrame' :: Maybe Double
maxPixelThreshold = Maybe Double
a} :: BlackFrame)
blackFrame_minCoveragePercentage :: Lens.Lens' BlackFrame (Prelude.Maybe Prelude.Double)
blackFrame_minCoveragePercentage :: (Maybe Double -> f (Maybe Double)) -> BlackFrame -> f BlackFrame
blackFrame_minCoveragePercentage = (BlackFrame -> Maybe Double)
-> (BlackFrame -> Maybe Double -> BlackFrame)
-> Lens BlackFrame BlackFrame (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BlackFrame' {Maybe Double
minCoveragePercentage :: Maybe Double
$sel:minCoveragePercentage:BlackFrame' :: BlackFrame -> Maybe Double
minCoveragePercentage} -> Maybe Double
minCoveragePercentage) (\s :: BlackFrame
s@BlackFrame' {} Maybe Double
a -> BlackFrame
s {$sel:minCoveragePercentage:BlackFrame' :: Maybe Double
minCoveragePercentage = Maybe Double
a} :: BlackFrame)
instance Prelude.Hashable BlackFrame
instance Prelude.NFData BlackFrame
instance Core.ToJSON BlackFrame where
toJSON :: BlackFrame -> Value
toJSON BlackFrame' {Maybe Double
minCoveragePercentage :: Maybe Double
maxPixelThreshold :: Maybe Double
$sel:minCoveragePercentage:BlackFrame' :: BlackFrame -> Maybe Double
$sel:maxPixelThreshold:BlackFrame' :: BlackFrame -> Maybe Double
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MaxPixelThreshold" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
maxPixelThreshold,
(Text
"MinCoveragePercentage" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
minCoveragePercentage
]
)