{-# 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.EquipmentDetection 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
import Amazonka.Rekognition.Types.BoundingBox
import Amazonka.Rekognition.Types.CoversBodyPart
import Amazonka.Rekognition.Types.ProtectiveEquipmentType
data EquipmentDetection = EquipmentDetection'
{
EquipmentDetection -> Maybe BoundingBox
boundingBox :: Prelude.Maybe BoundingBox,
EquipmentDetection -> Maybe Double
confidence :: Prelude.Maybe Prelude.Double,
EquipmentDetection -> Maybe CoversBodyPart
coversBodyPart :: Prelude.Maybe CoversBodyPart,
EquipmentDetection -> Maybe ProtectiveEquipmentType
type' :: Prelude.Maybe ProtectiveEquipmentType
}
deriving (EquipmentDetection -> EquipmentDetection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EquipmentDetection -> EquipmentDetection -> Bool
$c/= :: EquipmentDetection -> EquipmentDetection -> Bool
== :: EquipmentDetection -> EquipmentDetection -> Bool
$c== :: EquipmentDetection -> EquipmentDetection -> Bool
Prelude.Eq, ReadPrec [EquipmentDetection]
ReadPrec EquipmentDetection
Int -> ReadS EquipmentDetection
ReadS [EquipmentDetection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EquipmentDetection]
$creadListPrec :: ReadPrec [EquipmentDetection]
readPrec :: ReadPrec EquipmentDetection
$creadPrec :: ReadPrec EquipmentDetection
readList :: ReadS [EquipmentDetection]
$creadList :: ReadS [EquipmentDetection]
readsPrec :: Int -> ReadS EquipmentDetection
$creadsPrec :: Int -> ReadS EquipmentDetection
Prelude.Read, Int -> EquipmentDetection -> ShowS
[EquipmentDetection] -> ShowS
EquipmentDetection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EquipmentDetection] -> ShowS
$cshowList :: [EquipmentDetection] -> ShowS
show :: EquipmentDetection -> String
$cshow :: EquipmentDetection -> String
showsPrec :: Int -> EquipmentDetection -> ShowS
$cshowsPrec :: Int -> EquipmentDetection -> ShowS
Prelude.Show, forall x. Rep EquipmentDetection x -> EquipmentDetection
forall x. EquipmentDetection -> Rep EquipmentDetection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EquipmentDetection x -> EquipmentDetection
$cfrom :: forall x. EquipmentDetection -> Rep EquipmentDetection x
Prelude.Generic)
newEquipmentDetection ::
EquipmentDetection
newEquipmentDetection :: EquipmentDetection
newEquipmentDetection =
EquipmentDetection'
{ $sel:boundingBox:EquipmentDetection' :: Maybe BoundingBox
boundingBox = forall a. Maybe a
Prelude.Nothing,
$sel:confidence:EquipmentDetection' :: Maybe Double
confidence = forall a. Maybe a
Prelude.Nothing,
$sel:coversBodyPart:EquipmentDetection' :: Maybe CoversBodyPart
coversBodyPart = forall a. Maybe a
Prelude.Nothing,
$sel:type':EquipmentDetection' :: Maybe ProtectiveEquipmentType
type' = forall a. Maybe a
Prelude.Nothing
}
equipmentDetection_boundingBox :: Lens.Lens' EquipmentDetection (Prelude.Maybe BoundingBox)
equipmentDetection_boundingBox :: Lens' EquipmentDetection (Maybe BoundingBox)
equipmentDetection_boundingBox = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EquipmentDetection' {Maybe BoundingBox
boundingBox :: Maybe BoundingBox
$sel:boundingBox:EquipmentDetection' :: EquipmentDetection -> Maybe BoundingBox
boundingBox} -> Maybe BoundingBox
boundingBox) (\s :: EquipmentDetection
s@EquipmentDetection' {} Maybe BoundingBox
a -> EquipmentDetection
s {$sel:boundingBox:EquipmentDetection' :: Maybe BoundingBox
boundingBox = Maybe BoundingBox
a} :: EquipmentDetection)
equipmentDetection_confidence :: Lens.Lens' EquipmentDetection (Prelude.Maybe Prelude.Double)
equipmentDetection_confidence :: Lens' EquipmentDetection (Maybe Double)
equipmentDetection_confidence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EquipmentDetection' {Maybe Double
confidence :: Maybe Double
$sel:confidence:EquipmentDetection' :: EquipmentDetection -> Maybe Double
confidence} -> Maybe Double
confidence) (\s :: EquipmentDetection
s@EquipmentDetection' {} Maybe Double
a -> EquipmentDetection
s {$sel:confidence:EquipmentDetection' :: Maybe Double
confidence = Maybe Double
a} :: EquipmentDetection)
equipmentDetection_coversBodyPart :: Lens.Lens' EquipmentDetection (Prelude.Maybe CoversBodyPart)
equipmentDetection_coversBodyPart :: Lens' EquipmentDetection (Maybe CoversBodyPart)
equipmentDetection_coversBodyPart = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EquipmentDetection' {Maybe CoversBodyPart
coversBodyPart :: Maybe CoversBodyPart
$sel:coversBodyPart:EquipmentDetection' :: EquipmentDetection -> Maybe CoversBodyPart
coversBodyPart} -> Maybe CoversBodyPart
coversBodyPart) (\s :: EquipmentDetection
s@EquipmentDetection' {} Maybe CoversBodyPart
a -> EquipmentDetection
s {$sel:coversBodyPart:EquipmentDetection' :: Maybe CoversBodyPart
coversBodyPart = Maybe CoversBodyPart
a} :: EquipmentDetection)
equipmentDetection_type :: Lens.Lens' EquipmentDetection (Prelude.Maybe ProtectiveEquipmentType)
equipmentDetection_type :: Lens' EquipmentDetection (Maybe ProtectiveEquipmentType)
equipmentDetection_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EquipmentDetection' {Maybe ProtectiveEquipmentType
type' :: Maybe ProtectiveEquipmentType
$sel:type':EquipmentDetection' :: EquipmentDetection -> Maybe ProtectiveEquipmentType
type'} -> Maybe ProtectiveEquipmentType
type') (\s :: EquipmentDetection
s@EquipmentDetection' {} Maybe ProtectiveEquipmentType
a -> EquipmentDetection
s {$sel:type':EquipmentDetection' :: Maybe ProtectiveEquipmentType
type' = Maybe ProtectiveEquipmentType
a} :: EquipmentDetection)
instance Data.FromJSON EquipmentDetection where
parseJSON :: Value -> Parser EquipmentDetection
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EquipmentDetection"
( \Object
x ->
Maybe BoundingBox
-> Maybe Double
-> Maybe CoversBodyPart
-> Maybe ProtectiveEquipmentType
-> EquipmentDetection
EquipmentDetection'
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
"BoundingBox")
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
"Confidence")
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
"CoversBodyPart")
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
"Type")
)
instance Prelude.Hashable EquipmentDetection where
hashWithSalt :: Int -> EquipmentDetection -> Int
hashWithSalt Int
_salt EquipmentDetection' {Maybe Double
Maybe BoundingBox
Maybe CoversBodyPart
Maybe ProtectiveEquipmentType
type' :: Maybe ProtectiveEquipmentType
coversBodyPart :: Maybe CoversBodyPart
confidence :: Maybe Double
boundingBox :: Maybe BoundingBox
$sel:type':EquipmentDetection' :: EquipmentDetection -> Maybe ProtectiveEquipmentType
$sel:coversBodyPart:EquipmentDetection' :: EquipmentDetection -> Maybe CoversBodyPart
$sel:confidence:EquipmentDetection' :: EquipmentDetection -> Maybe Double
$sel:boundingBox:EquipmentDetection' :: EquipmentDetection -> Maybe BoundingBox
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BoundingBox
boundingBox
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
confidence
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CoversBodyPart
coversBodyPart
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProtectiveEquipmentType
type'
instance Prelude.NFData EquipmentDetection where
rnf :: EquipmentDetection -> ()
rnf EquipmentDetection' {Maybe Double
Maybe BoundingBox
Maybe CoversBodyPart
Maybe ProtectiveEquipmentType
type' :: Maybe ProtectiveEquipmentType
coversBodyPart :: Maybe CoversBodyPart
confidence :: Maybe Double
boundingBox :: Maybe BoundingBox
$sel:type':EquipmentDetection' :: EquipmentDetection -> Maybe ProtectiveEquipmentType
$sel:coversBodyPart:EquipmentDetection' :: EquipmentDetection -> Maybe CoversBodyPart
$sel:confidence:EquipmentDetection' :: EquipmentDetection -> Maybe Double
$sel:boundingBox:EquipmentDetection' :: EquipmentDetection -> Maybe BoundingBox
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe BoundingBox
boundingBox
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
confidence
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CoversBodyPart
coversBodyPart
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProtectiveEquipmentType
type'