{-# 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.Lens as Lens
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
(ComparedSourceImageFace -> ComparedSourceImageFace -> Bool)
-> (ComparedSourceImageFace -> ComparedSourceImageFace -> Bool)
-> Eq ComparedSourceImageFace
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]
(Int -> ReadS ComparedSourceImageFace)
-> ReadS [ComparedSourceImageFace]
-> ReadPrec ComparedSourceImageFace
-> ReadPrec [ComparedSourceImageFace]
-> Read 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
(Int -> ComparedSourceImageFace -> ShowS)
-> (ComparedSourceImageFace -> String)
-> ([ComparedSourceImageFace] -> ShowS)
-> Show ComparedSourceImageFace
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.
ComparedSourceImageFace -> Rep ComparedSourceImageFace x)
-> (forall x.
Rep ComparedSourceImageFace x -> ComparedSourceImageFace)
-> Generic ComparedSourceImageFace
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' :: Maybe BoundingBox -> Maybe Double -> ComparedSourceImageFace
ComparedSourceImageFace'
{ $sel:boundingBox:ComparedSourceImageFace' :: Maybe BoundingBox
boundingBox =
Maybe BoundingBox
forall a. Maybe a
Prelude.Nothing,
$sel:confidence:ComparedSourceImageFace' :: Maybe Double
confidence = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
comparedSourceImageFace_boundingBox :: Lens.Lens' ComparedSourceImageFace (Prelude.Maybe BoundingBox)
comparedSourceImageFace_boundingBox :: (Maybe BoundingBox -> f (Maybe BoundingBox))
-> ComparedSourceImageFace -> f ComparedSourceImageFace
comparedSourceImageFace_boundingBox = (ComparedSourceImageFace -> Maybe BoundingBox)
-> (ComparedSourceImageFace
-> Maybe BoundingBox -> ComparedSourceImageFace)
-> Lens
ComparedSourceImageFace
ComparedSourceImageFace
(Maybe BoundingBox)
(Maybe 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 :: (Maybe Double -> f (Maybe Double))
-> ComparedSourceImageFace -> f ComparedSourceImageFace
comparedSourceImageFace_confidence = (ComparedSourceImageFace -> Maybe Double)
-> (ComparedSourceImageFace
-> Maybe Double -> ComparedSourceImageFace)
-> Lens
ComparedSourceImageFace
ComparedSourceImageFace
(Maybe Double)
(Maybe Double)
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 Core.FromJSON ComparedSourceImageFace where
parseJSON :: Value -> Parser ComparedSourceImageFace
parseJSON =
String
-> (Object -> Parser ComparedSourceImageFace)
-> Value
-> Parser ComparedSourceImageFace
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ComparedSourceImageFace"
( \Object
x ->
Maybe BoundingBox -> Maybe Double -> ComparedSourceImageFace
ComparedSourceImageFace'
(Maybe BoundingBox -> Maybe Double -> ComparedSourceImageFace)
-> Parser (Maybe BoundingBox)
-> Parser (Maybe Double -> ComparedSourceImageFace)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe BoundingBox)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BoundingBox")
Parser (Maybe Double -> ComparedSourceImageFace)
-> Parser (Maybe Double) -> Parser ComparedSourceImageFace
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Confidence")
)
instance Prelude.Hashable ComparedSourceImageFace
instance Prelude.NFData ComparedSourceImageFace