{-# 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.ComparedSourceImageFace 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
data ComparedSourceImageFace = ComparedSourceImageFace'
{
ComparedSourceImageFace -> Maybe BoundingBox
boundingBox :: Prelude.Maybe BoundingBox,
ComparedSourceImageFace -> Maybe Double
confidence :: Prelude.Maybe Prelude.Double
}
deriving (ComparedSourceImageFace -> ComparedSourceImageFace -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComparedSourceImageFace -> ComparedSourceImageFace -> Bool
$c/= :: ComparedSourceImageFace -> ComparedSourceImageFace -> Bool
== :: ComparedSourceImageFace -> ComparedSourceImageFace -> Bool
$c== :: ComparedSourceImageFace -> ComparedSourceImageFace -> Bool
Prelude.Eq, ReadPrec [ComparedSourceImageFace]
ReadPrec ComparedSourceImageFace
Int -> ReadS ComparedSourceImageFace
ReadS [ComparedSourceImageFace]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComparedSourceImageFace]
$creadListPrec :: ReadPrec [ComparedSourceImageFace]
readPrec :: ReadPrec ComparedSourceImageFace
$creadPrec :: ReadPrec ComparedSourceImageFace
readList :: ReadS [ComparedSourceImageFace]
$creadList :: ReadS [ComparedSourceImageFace]
readsPrec :: Int -> ReadS ComparedSourceImageFace
$creadsPrec :: Int -> ReadS ComparedSourceImageFace
Prelude.Read, Int -> ComparedSourceImageFace -> ShowS
[ComparedSourceImageFace] -> ShowS
ComparedSourceImageFace -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComparedSourceImageFace] -> ShowS
$cshowList :: [ComparedSourceImageFace] -> ShowS
show :: ComparedSourceImageFace -> String
$cshow :: ComparedSourceImageFace -> String
showsPrec :: Int -> ComparedSourceImageFace -> ShowS
$cshowsPrec :: Int -> ComparedSourceImageFace -> ShowS
Prelude.Show, forall x. Rep ComparedSourceImageFace x -> ComparedSourceImageFace
forall x. ComparedSourceImageFace -> Rep ComparedSourceImageFace x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComparedSourceImageFace x -> ComparedSourceImageFace
$cfrom :: forall x. ComparedSourceImageFace -> Rep ComparedSourceImageFace x
Prelude.Generic)
newComparedSourceImageFace ::
ComparedSourceImageFace
newComparedSourceImageFace :: ComparedSourceImageFace
newComparedSourceImageFace =
ComparedSourceImageFace'
{ $sel:boundingBox:ComparedSourceImageFace' :: Maybe BoundingBox
boundingBox =
forall a. Maybe a
Prelude.Nothing,
$sel:confidence:ComparedSourceImageFace' :: Maybe Double
confidence = forall a. Maybe a
Prelude.Nothing
}
comparedSourceImageFace_boundingBox :: Lens.Lens' ComparedSourceImageFace (Prelude.Maybe BoundingBox)
comparedSourceImageFace_boundingBox :: Lens' ComparedSourceImageFace (Maybe BoundingBox)
comparedSourceImageFace_boundingBox = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComparedSourceImageFace' {Maybe BoundingBox
boundingBox :: Maybe BoundingBox
$sel:boundingBox:ComparedSourceImageFace' :: ComparedSourceImageFace -> Maybe BoundingBox
boundingBox} -> Maybe BoundingBox
boundingBox) (\s :: ComparedSourceImageFace
s@ComparedSourceImageFace' {} Maybe BoundingBox
a -> ComparedSourceImageFace
s {$sel:boundingBox:ComparedSourceImageFace' :: Maybe BoundingBox
boundingBox = Maybe BoundingBox
a} :: ComparedSourceImageFace)
comparedSourceImageFace_confidence :: Lens.Lens' ComparedSourceImageFace (Prelude.Maybe Prelude.Double)
comparedSourceImageFace_confidence :: Lens' ComparedSourceImageFace (Maybe Double)
comparedSourceImageFace_confidence = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComparedSourceImageFace' {Maybe Double
confidence :: Maybe Double
$sel:confidence:ComparedSourceImageFace' :: ComparedSourceImageFace -> Maybe Double
confidence} -> Maybe Double
confidence) (\s :: ComparedSourceImageFace
s@ComparedSourceImageFace' {} Maybe Double
a -> ComparedSourceImageFace
s {$sel:confidence:ComparedSourceImageFace' :: Maybe Double
confidence = Maybe Double
a} :: ComparedSourceImageFace)
instance Data.FromJSON ComparedSourceImageFace where
parseJSON :: Value -> Parser ComparedSourceImageFace
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ComparedSourceImageFace"
( \Object
x ->
Maybe BoundingBox -> Maybe Double -> ComparedSourceImageFace
ComparedSourceImageFace'
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")
)
instance Prelude.Hashable ComparedSourceImageFace where
hashWithSalt :: Int -> ComparedSourceImageFace -> Int
hashWithSalt Int
_salt ComparedSourceImageFace' {Maybe Double
Maybe BoundingBox
confidence :: Maybe Double
boundingBox :: Maybe BoundingBox
$sel:confidence:ComparedSourceImageFace' :: ComparedSourceImageFace -> Maybe Double
$sel:boundingBox:ComparedSourceImageFace' :: ComparedSourceImageFace -> 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
instance Prelude.NFData ComparedSourceImageFace where
rnf :: ComparedSourceImageFace -> ()
rnf ComparedSourceImageFace' {Maybe Double
Maybe BoundingBox
confidence :: Maybe Double
boundingBox :: Maybe BoundingBox
$sel:confidence:ComparedSourceImageFace' :: ComparedSourceImageFace -> Maybe Double
$sel:boundingBox:ComparedSourceImageFace' :: ComparedSourceImageFace -> 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