{-# 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.DetectionFilter 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 DetectionFilter = DetectionFilter'
{
DetectionFilter -> Maybe Double
minBoundingBoxHeight :: Prelude.Maybe Prelude.Double,
DetectionFilter -> Maybe Double
minBoundingBoxWidth :: Prelude.Maybe Prelude.Double,
DetectionFilter -> Maybe Double
minConfidence :: Prelude.Maybe Prelude.Double
}
deriving (DetectionFilter -> DetectionFilter -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectionFilter -> DetectionFilter -> Bool
$c/= :: DetectionFilter -> DetectionFilter -> Bool
== :: DetectionFilter -> DetectionFilter -> Bool
$c== :: DetectionFilter -> DetectionFilter -> Bool
Prelude.Eq, ReadPrec [DetectionFilter]
ReadPrec DetectionFilter
Int -> ReadS DetectionFilter
ReadS [DetectionFilter]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectionFilter]
$creadListPrec :: ReadPrec [DetectionFilter]
readPrec :: ReadPrec DetectionFilter
$creadPrec :: ReadPrec DetectionFilter
readList :: ReadS [DetectionFilter]
$creadList :: ReadS [DetectionFilter]
readsPrec :: Int -> ReadS DetectionFilter
$creadsPrec :: Int -> ReadS DetectionFilter
Prelude.Read, Int -> DetectionFilter -> ShowS
[DetectionFilter] -> ShowS
DetectionFilter -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectionFilter] -> ShowS
$cshowList :: [DetectionFilter] -> ShowS
show :: DetectionFilter -> String
$cshow :: DetectionFilter -> String
showsPrec :: Int -> DetectionFilter -> ShowS
$cshowsPrec :: Int -> DetectionFilter -> ShowS
Prelude.Show, forall x. Rep DetectionFilter x -> DetectionFilter
forall x. DetectionFilter -> Rep DetectionFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DetectionFilter x -> DetectionFilter
$cfrom :: forall x. DetectionFilter -> Rep DetectionFilter x
Prelude.Generic)
newDetectionFilter ::
DetectionFilter
newDetectionFilter :: DetectionFilter
newDetectionFilter =
DetectionFilter'
{ $sel:minBoundingBoxHeight:DetectionFilter' :: Maybe Double
minBoundingBoxHeight =
forall a. Maybe a
Prelude.Nothing,
$sel:minBoundingBoxWidth:DetectionFilter' :: Maybe Double
minBoundingBoxWidth = forall a. Maybe a
Prelude.Nothing,
$sel:minConfidence:DetectionFilter' :: Maybe Double
minConfidence = forall a. Maybe a
Prelude.Nothing
}
detectionFilter_minBoundingBoxHeight :: Lens.Lens' DetectionFilter (Prelude.Maybe Prelude.Double)
detectionFilter_minBoundingBoxHeight :: Lens' DetectionFilter (Maybe Double)
detectionFilter_minBoundingBoxHeight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectionFilter' {Maybe Double
minBoundingBoxHeight :: Maybe Double
$sel:minBoundingBoxHeight:DetectionFilter' :: DetectionFilter -> Maybe Double
minBoundingBoxHeight} -> Maybe Double
minBoundingBoxHeight) (\s :: DetectionFilter
s@DetectionFilter' {} Maybe Double
a -> DetectionFilter
s {$sel:minBoundingBoxHeight:DetectionFilter' :: Maybe Double
minBoundingBoxHeight = Maybe Double
a} :: DetectionFilter)
detectionFilter_minBoundingBoxWidth :: Lens.Lens' DetectionFilter (Prelude.Maybe Prelude.Double)
detectionFilter_minBoundingBoxWidth :: Lens' DetectionFilter (Maybe Double)
detectionFilter_minBoundingBoxWidth = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectionFilter' {Maybe Double
minBoundingBoxWidth :: Maybe Double
$sel:minBoundingBoxWidth:DetectionFilter' :: DetectionFilter -> Maybe Double
minBoundingBoxWidth} -> Maybe Double
minBoundingBoxWidth) (\s :: DetectionFilter
s@DetectionFilter' {} Maybe Double
a -> DetectionFilter
s {$sel:minBoundingBoxWidth:DetectionFilter' :: Maybe Double
minBoundingBoxWidth = Maybe Double
a} :: DetectionFilter)
detectionFilter_minConfidence :: Lens.Lens' DetectionFilter (Prelude.Maybe Prelude.Double)
detectionFilter_minConfidence :: Lens' DetectionFilter (Maybe Double)
detectionFilter_minConfidence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectionFilter' {Maybe Double
minConfidence :: Maybe Double
$sel:minConfidence:DetectionFilter' :: DetectionFilter -> Maybe Double
minConfidence} -> Maybe Double
minConfidence) (\s :: DetectionFilter
s@DetectionFilter' {} Maybe Double
a -> DetectionFilter
s {$sel:minConfidence:DetectionFilter' :: Maybe Double
minConfidence = Maybe Double
a} :: DetectionFilter)
instance Prelude.Hashable DetectionFilter where
hashWithSalt :: Int -> DetectionFilter -> Int
hashWithSalt Int
_salt DetectionFilter' {Maybe Double
minConfidence :: Maybe Double
minBoundingBoxWidth :: Maybe Double
minBoundingBoxHeight :: Maybe Double
$sel:minConfidence:DetectionFilter' :: DetectionFilter -> Maybe Double
$sel:minBoundingBoxWidth:DetectionFilter' :: DetectionFilter -> Maybe Double
$sel:minBoundingBoxHeight:DetectionFilter' :: DetectionFilter -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
minBoundingBoxHeight
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
minBoundingBoxWidth
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
minConfidence
instance Prelude.NFData DetectionFilter where
rnf :: DetectionFilter -> ()
rnf DetectionFilter' {Maybe Double
minConfidence :: Maybe Double
minBoundingBoxWidth :: Maybe Double
minBoundingBoxHeight :: Maybe Double
$sel:minConfidence:DetectionFilter' :: DetectionFilter -> Maybe Double
$sel:minBoundingBoxWidth:DetectionFilter' :: DetectionFilter -> Maybe Double
$sel:minBoundingBoxHeight:DetectionFilter' :: DetectionFilter -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
minBoundingBoxHeight
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
minBoundingBoxWidth
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
minConfidence
instance Data.ToJSON DetectionFilter where
toJSON :: DetectionFilter -> Value
toJSON DetectionFilter' {Maybe Double
minConfidence :: Maybe Double
minBoundingBoxWidth :: Maybe Double
minBoundingBoxHeight :: Maybe Double
$sel:minConfidence:DetectionFilter' :: DetectionFilter -> Maybe Double
$sel:minBoundingBoxWidth:DetectionFilter' :: DetectionFilter -> Maybe Double
$sel:minBoundingBoxHeight:DetectionFilter' :: DetectionFilter -> Maybe Double
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"MinBoundingBoxHeight" 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
minBoundingBoxHeight,
(Key
"MinBoundingBoxWidth" 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
minBoundingBoxWidth,
(Key
"MinConfidence" 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
minConfidence
]
)