{-# 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.FaceDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.Types.AgeRange
import Amazonka.Rekognition.Types.Beard
import Amazonka.Rekognition.Types.BoundingBox
import Amazonka.Rekognition.Types.Emotion
import Amazonka.Rekognition.Types.EyeOpen
import Amazonka.Rekognition.Types.Eyeglasses
import Amazonka.Rekognition.Types.Gender
import Amazonka.Rekognition.Types.ImageQuality
import Amazonka.Rekognition.Types.Landmark
import Amazonka.Rekognition.Types.MouthOpen
import Amazonka.Rekognition.Types.Mustache
import Amazonka.Rekognition.Types.Pose
import Amazonka.Rekognition.Types.Smile
import Amazonka.Rekognition.Types.Sunglasses
data FaceDetail = FaceDetail'
{
FaceDetail -> Maybe AgeRange
ageRange :: Prelude.Maybe AgeRange,
FaceDetail -> Maybe Sunglasses
sunglasses :: Prelude.Maybe Sunglasses,
FaceDetail -> Maybe MouthOpen
mouthOpen :: Prelude.Maybe MouthOpen,
FaceDetail -> Maybe BoundingBox
boundingBox :: Prelude.Maybe BoundingBox,
FaceDetail -> Maybe [Emotion]
emotions :: Prelude.Maybe [Emotion],
FaceDetail -> Maybe EyeOpen
eyesOpen :: Prelude.Maybe EyeOpen,
FaceDetail -> Maybe Pose
pose :: Prelude.Maybe Pose,
FaceDetail -> Maybe Double
confidence :: Prelude.Maybe Prelude.Double,
FaceDetail -> Maybe Gender
gender :: Prelude.Maybe Gender,
FaceDetail -> Maybe ImageQuality
quality :: Prelude.Maybe ImageQuality,
FaceDetail -> Maybe Eyeglasses
eyeglasses :: Prelude.Maybe Eyeglasses,
FaceDetail -> Maybe Beard
beard :: Prelude.Maybe Beard,
FaceDetail -> Maybe Mustache
mustache :: Prelude.Maybe Mustache,
FaceDetail -> Maybe Smile
smile :: Prelude.Maybe Smile,
FaceDetail -> Maybe [Landmark]
landmarks :: Prelude.Maybe [Landmark]
}
deriving (FaceDetail -> FaceDetail -> Bool
(FaceDetail -> FaceDetail -> Bool)
-> (FaceDetail -> FaceDetail -> Bool) -> Eq FaceDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FaceDetail -> FaceDetail -> Bool
$c/= :: FaceDetail -> FaceDetail -> Bool
== :: FaceDetail -> FaceDetail -> Bool
$c== :: FaceDetail -> FaceDetail -> Bool
Prelude.Eq, ReadPrec [FaceDetail]
ReadPrec FaceDetail
Int -> ReadS FaceDetail
ReadS [FaceDetail]
(Int -> ReadS FaceDetail)
-> ReadS [FaceDetail]
-> ReadPrec FaceDetail
-> ReadPrec [FaceDetail]
-> Read FaceDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FaceDetail]
$creadListPrec :: ReadPrec [FaceDetail]
readPrec :: ReadPrec FaceDetail
$creadPrec :: ReadPrec FaceDetail
readList :: ReadS [FaceDetail]
$creadList :: ReadS [FaceDetail]
readsPrec :: Int -> ReadS FaceDetail
$creadsPrec :: Int -> ReadS FaceDetail
Prelude.Read, Int -> FaceDetail -> ShowS
[FaceDetail] -> ShowS
FaceDetail -> String
(Int -> FaceDetail -> ShowS)
-> (FaceDetail -> String)
-> ([FaceDetail] -> ShowS)
-> Show FaceDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FaceDetail] -> ShowS
$cshowList :: [FaceDetail] -> ShowS
show :: FaceDetail -> String
$cshow :: FaceDetail -> String
showsPrec :: Int -> FaceDetail -> ShowS
$cshowsPrec :: Int -> FaceDetail -> ShowS
Prelude.Show, (forall x. FaceDetail -> Rep FaceDetail x)
-> (forall x. Rep FaceDetail x -> FaceDetail) -> Generic FaceDetail
forall x. Rep FaceDetail x -> FaceDetail
forall x. FaceDetail -> Rep FaceDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FaceDetail x -> FaceDetail
$cfrom :: forall x. FaceDetail -> Rep FaceDetail x
Prelude.Generic)
newFaceDetail ::
FaceDetail
newFaceDetail :: FaceDetail
newFaceDetail =
FaceDetail' :: Maybe AgeRange
-> Maybe Sunglasses
-> Maybe MouthOpen
-> Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail
FaceDetail'
{ $sel:ageRange:FaceDetail' :: Maybe AgeRange
ageRange = Maybe AgeRange
forall a. Maybe a
Prelude.Nothing,
$sel:sunglasses:FaceDetail' :: Maybe Sunglasses
sunglasses = Maybe Sunglasses
forall a. Maybe a
Prelude.Nothing,
$sel:mouthOpen:FaceDetail' :: Maybe MouthOpen
mouthOpen = Maybe MouthOpen
forall a. Maybe a
Prelude.Nothing,
$sel:boundingBox:FaceDetail' :: Maybe BoundingBox
boundingBox = Maybe BoundingBox
forall a. Maybe a
Prelude.Nothing,
$sel:emotions:FaceDetail' :: Maybe [Emotion]
emotions = Maybe [Emotion]
forall a. Maybe a
Prelude.Nothing,
$sel:eyesOpen:FaceDetail' :: Maybe EyeOpen
eyesOpen = Maybe EyeOpen
forall a. Maybe a
Prelude.Nothing,
$sel:pose:FaceDetail' :: Maybe Pose
pose = Maybe Pose
forall a. Maybe a
Prelude.Nothing,
$sel:confidence:FaceDetail' :: Maybe Double
confidence = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:gender:FaceDetail' :: Maybe Gender
gender = Maybe Gender
forall a. Maybe a
Prelude.Nothing,
$sel:quality:FaceDetail' :: Maybe ImageQuality
quality = Maybe ImageQuality
forall a. Maybe a
Prelude.Nothing,
$sel:eyeglasses:FaceDetail' :: Maybe Eyeglasses
eyeglasses = Maybe Eyeglasses
forall a. Maybe a
Prelude.Nothing,
$sel:beard:FaceDetail' :: Maybe Beard
beard = Maybe Beard
forall a. Maybe a
Prelude.Nothing,
$sel:mustache:FaceDetail' :: Maybe Mustache
mustache = Maybe Mustache
forall a. Maybe a
Prelude.Nothing,
$sel:smile:FaceDetail' :: Maybe Smile
smile = Maybe Smile
forall a. Maybe a
Prelude.Nothing,
$sel:landmarks:FaceDetail' :: Maybe [Landmark]
landmarks = Maybe [Landmark]
forall a. Maybe a
Prelude.Nothing
}
faceDetail_ageRange :: Lens.Lens' FaceDetail (Prelude.Maybe AgeRange)
faceDetail_ageRange :: (Maybe AgeRange -> f (Maybe AgeRange))
-> FaceDetail -> f FaceDetail
faceDetail_ageRange = (FaceDetail -> Maybe AgeRange)
-> (FaceDetail -> Maybe AgeRange -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe AgeRange) (Maybe AgeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe AgeRange
ageRange :: Maybe AgeRange
$sel:ageRange:FaceDetail' :: FaceDetail -> Maybe AgeRange
ageRange} -> Maybe AgeRange
ageRange) (\s :: FaceDetail
s@FaceDetail' {} Maybe AgeRange
a -> FaceDetail
s {$sel:ageRange:FaceDetail' :: Maybe AgeRange
ageRange = Maybe AgeRange
a} :: FaceDetail)
faceDetail_sunglasses :: Lens.Lens' FaceDetail (Prelude.Maybe Sunglasses)
faceDetail_sunglasses :: (Maybe Sunglasses -> f (Maybe Sunglasses))
-> FaceDetail -> f FaceDetail
faceDetail_sunglasses = (FaceDetail -> Maybe Sunglasses)
-> (FaceDetail -> Maybe Sunglasses -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe Sunglasses) (Maybe Sunglasses)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe Sunglasses
sunglasses :: Maybe Sunglasses
$sel:sunglasses:FaceDetail' :: FaceDetail -> Maybe Sunglasses
sunglasses} -> Maybe Sunglasses
sunglasses) (\s :: FaceDetail
s@FaceDetail' {} Maybe Sunglasses
a -> FaceDetail
s {$sel:sunglasses:FaceDetail' :: Maybe Sunglasses
sunglasses = Maybe Sunglasses
a} :: FaceDetail)
faceDetail_mouthOpen :: Lens.Lens' FaceDetail (Prelude.Maybe MouthOpen)
faceDetail_mouthOpen :: (Maybe MouthOpen -> f (Maybe MouthOpen))
-> FaceDetail -> f FaceDetail
faceDetail_mouthOpen = (FaceDetail -> Maybe MouthOpen)
-> (FaceDetail -> Maybe MouthOpen -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe MouthOpen) (Maybe MouthOpen)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe MouthOpen
mouthOpen :: Maybe MouthOpen
$sel:mouthOpen:FaceDetail' :: FaceDetail -> Maybe MouthOpen
mouthOpen} -> Maybe MouthOpen
mouthOpen) (\s :: FaceDetail
s@FaceDetail' {} Maybe MouthOpen
a -> FaceDetail
s {$sel:mouthOpen:FaceDetail' :: Maybe MouthOpen
mouthOpen = Maybe MouthOpen
a} :: FaceDetail)
faceDetail_boundingBox :: Lens.Lens' FaceDetail (Prelude.Maybe BoundingBox)
faceDetail_boundingBox :: (Maybe BoundingBox -> f (Maybe BoundingBox))
-> FaceDetail -> f FaceDetail
faceDetail_boundingBox = (FaceDetail -> Maybe BoundingBox)
-> (FaceDetail -> Maybe BoundingBox -> FaceDetail)
-> Lens
FaceDetail FaceDetail (Maybe BoundingBox) (Maybe BoundingBox)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe BoundingBox
boundingBox :: Maybe BoundingBox
$sel:boundingBox:FaceDetail' :: FaceDetail -> Maybe BoundingBox
boundingBox} -> Maybe BoundingBox
boundingBox) (\s :: FaceDetail
s@FaceDetail' {} Maybe BoundingBox
a -> FaceDetail
s {$sel:boundingBox:FaceDetail' :: Maybe BoundingBox
boundingBox = Maybe BoundingBox
a} :: FaceDetail)
faceDetail_emotions :: Lens.Lens' FaceDetail (Prelude.Maybe [Emotion])
faceDetail_emotions :: (Maybe [Emotion] -> f (Maybe [Emotion]))
-> FaceDetail -> f FaceDetail
faceDetail_emotions = (FaceDetail -> Maybe [Emotion])
-> (FaceDetail -> Maybe [Emotion] -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe [Emotion]) (Maybe [Emotion])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe [Emotion]
emotions :: Maybe [Emotion]
$sel:emotions:FaceDetail' :: FaceDetail -> Maybe [Emotion]
emotions} -> Maybe [Emotion]
emotions) (\s :: FaceDetail
s@FaceDetail' {} Maybe [Emotion]
a -> FaceDetail
s {$sel:emotions:FaceDetail' :: Maybe [Emotion]
emotions = Maybe [Emotion]
a} :: FaceDetail) ((Maybe [Emotion] -> f (Maybe [Emotion]))
-> FaceDetail -> f FaceDetail)
-> ((Maybe [Emotion] -> f (Maybe [Emotion]))
-> Maybe [Emotion] -> f (Maybe [Emotion]))
-> (Maybe [Emotion] -> f (Maybe [Emotion]))
-> FaceDetail
-> f FaceDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Emotion] [Emotion] [Emotion] [Emotion]
-> Iso
(Maybe [Emotion])
(Maybe [Emotion])
(Maybe [Emotion])
(Maybe [Emotion])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Emotion] [Emotion] [Emotion] [Emotion]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
faceDetail_eyesOpen :: Lens.Lens' FaceDetail (Prelude.Maybe EyeOpen)
faceDetail_eyesOpen :: (Maybe EyeOpen -> f (Maybe EyeOpen)) -> FaceDetail -> f FaceDetail
faceDetail_eyesOpen = (FaceDetail -> Maybe EyeOpen)
-> (FaceDetail -> Maybe EyeOpen -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe EyeOpen) (Maybe EyeOpen)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe EyeOpen
eyesOpen :: Maybe EyeOpen
$sel:eyesOpen:FaceDetail' :: FaceDetail -> Maybe EyeOpen
eyesOpen} -> Maybe EyeOpen
eyesOpen) (\s :: FaceDetail
s@FaceDetail' {} Maybe EyeOpen
a -> FaceDetail
s {$sel:eyesOpen:FaceDetail' :: Maybe EyeOpen
eyesOpen = Maybe EyeOpen
a} :: FaceDetail)
faceDetail_pose :: Lens.Lens' FaceDetail (Prelude.Maybe Pose)
faceDetail_pose :: (Maybe Pose -> f (Maybe Pose)) -> FaceDetail -> f FaceDetail
faceDetail_pose = (FaceDetail -> Maybe Pose)
-> (FaceDetail -> Maybe Pose -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe Pose) (Maybe Pose)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe Pose
pose :: Maybe Pose
$sel:pose:FaceDetail' :: FaceDetail -> Maybe Pose
pose} -> Maybe Pose
pose) (\s :: FaceDetail
s@FaceDetail' {} Maybe Pose
a -> FaceDetail
s {$sel:pose:FaceDetail' :: Maybe Pose
pose = Maybe Pose
a} :: FaceDetail)
faceDetail_confidence :: Lens.Lens' FaceDetail (Prelude.Maybe Prelude.Double)
faceDetail_confidence :: (Maybe Double -> f (Maybe Double)) -> FaceDetail -> f FaceDetail
faceDetail_confidence = (FaceDetail -> Maybe Double)
-> (FaceDetail -> Maybe Double -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe Double
confidence :: Maybe Double
$sel:confidence:FaceDetail' :: FaceDetail -> Maybe Double
confidence} -> Maybe Double
confidence) (\s :: FaceDetail
s@FaceDetail' {} Maybe Double
a -> FaceDetail
s {$sel:confidence:FaceDetail' :: Maybe Double
confidence = Maybe Double
a} :: FaceDetail)
faceDetail_gender :: Lens.Lens' FaceDetail (Prelude.Maybe Gender)
faceDetail_gender :: (Maybe Gender -> f (Maybe Gender)) -> FaceDetail -> f FaceDetail
faceDetail_gender = (FaceDetail -> Maybe Gender)
-> (FaceDetail -> Maybe Gender -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe Gender) (Maybe Gender)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe Gender
gender :: Maybe Gender
$sel:gender:FaceDetail' :: FaceDetail -> Maybe Gender
gender} -> Maybe Gender
gender) (\s :: FaceDetail
s@FaceDetail' {} Maybe Gender
a -> FaceDetail
s {$sel:gender:FaceDetail' :: Maybe Gender
gender = Maybe Gender
a} :: FaceDetail)
faceDetail_quality :: Lens.Lens' FaceDetail (Prelude.Maybe ImageQuality)
faceDetail_quality :: (Maybe ImageQuality -> f (Maybe ImageQuality))
-> FaceDetail -> f FaceDetail
faceDetail_quality = (FaceDetail -> Maybe ImageQuality)
-> (FaceDetail -> Maybe ImageQuality -> FaceDetail)
-> Lens
FaceDetail FaceDetail (Maybe ImageQuality) (Maybe ImageQuality)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe ImageQuality
quality :: Maybe ImageQuality
$sel:quality:FaceDetail' :: FaceDetail -> Maybe ImageQuality
quality} -> Maybe ImageQuality
quality) (\s :: FaceDetail
s@FaceDetail' {} Maybe ImageQuality
a -> FaceDetail
s {$sel:quality:FaceDetail' :: Maybe ImageQuality
quality = Maybe ImageQuality
a} :: FaceDetail)
faceDetail_eyeglasses :: Lens.Lens' FaceDetail (Prelude.Maybe Eyeglasses)
faceDetail_eyeglasses :: (Maybe Eyeglasses -> f (Maybe Eyeglasses))
-> FaceDetail -> f FaceDetail
faceDetail_eyeglasses = (FaceDetail -> Maybe Eyeglasses)
-> (FaceDetail -> Maybe Eyeglasses -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe Eyeglasses) (Maybe Eyeglasses)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe Eyeglasses
eyeglasses :: Maybe Eyeglasses
$sel:eyeglasses:FaceDetail' :: FaceDetail -> Maybe Eyeglasses
eyeglasses} -> Maybe Eyeglasses
eyeglasses) (\s :: FaceDetail
s@FaceDetail' {} Maybe Eyeglasses
a -> FaceDetail
s {$sel:eyeglasses:FaceDetail' :: Maybe Eyeglasses
eyeglasses = Maybe Eyeglasses
a} :: FaceDetail)
faceDetail_beard :: Lens.Lens' FaceDetail (Prelude.Maybe Beard)
faceDetail_beard :: (Maybe Beard -> f (Maybe Beard)) -> FaceDetail -> f FaceDetail
faceDetail_beard = (FaceDetail -> Maybe Beard)
-> (FaceDetail -> Maybe Beard -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe Beard) (Maybe Beard)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe Beard
beard :: Maybe Beard
$sel:beard:FaceDetail' :: FaceDetail -> Maybe Beard
beard} -> Maybe Beard
beard) (\s :: FaceDetail
s@FaceDetail' {} Maybe Beard
a -> FaceDetail
s {$sel:beard:FaceDetail' :: Maybe Beard
beard = Maybe Beard
a} :: FaceDetail)
faceDetail_mustache :: Lens.Lens' FaceDetail (Prelude.Maybe Mustache)
faceDetail_mustache :: (Maybe Mustache -> f (Maybe Mustache))
-> FaceDetail -> f FaceDetail
faceDetail_mustache = (FaceDetail -> Maybe Mustache)
-> (FaceDetail -> Maybe Mustache -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe Mustache) (Maybe Mustache)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe Mustache
mustache :: Maybe Mustache
$sel:mustache:FaceDetail' :: FaceDetail -> Maybe Mustache
mustache} -> Maybe Mustache
mustache) (\s :: FaceDetail
s@FaceDetail' {} Maybe Mustache
a -> FaceDetail
s {$sel:mustache:FaceDetail' :: Maybe Mustache
mustache = Maybe Mustache
a} :: FaceDetail)
faceDetail_smile :: Lens.Lens' FaceDetail (Prelude.Maybe Smile)
faceDetail_smile :: (Maybe Smile -> f (Maybe Smile)) -> FaceDetail -> f FaceDetail
faceDetail_smile = (FaceDetail -> Maybe Smile)
-> (FaceDetail -> Maybe Smile -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe Smile) (Maybe Smile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe Smile
smile :: Maybe Smile
$sel:smile:FaceDetail' :: FaceDetail -> Maybe Smile
smile} -> Maybe Smile
smile) (\s :: FaceDetail
s@FaceDetail' {} Maybe Smile
a -> FaceDetail
s {$sel:smile:FaceDetail' :: Maybe Smile
smile = Maybe Smile
a} :: FaceDetail)
faceDetail_landmarks :: Lens.Lens' FaceDetail (Prelude.Maybe [Landmark])
faceDetail_landmarks :: (Maybe [Landmark] -> f (Maybe [Landmark]))
-> FaceDetail -> f FaceDetail
faceDetail_landmarks = (FaceDetail -> Maybe [Landmark])
-> (FaceDetail -> Maybe [Landmark] -> FaceDetail)
-> Lens FaceDetail FaceDetail (Maybe [Landmark]) (Maybe [Landmark])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FaceDetail' {Maybe [Landmark]
landmarks :: Maybe [Landmark]
$sel:landmarks:FaceDetail' :: FaceDetail -> Maybe [Landmark]
landmarks} -> Maybe [Landmark]
landmarks) (\s :: FaceDetail
s@FaceDetail' {} Maybe [Landmark]
a -> FaceDetail
s {$sel:landmarks:FaceDetail' :: Maybe [Landmark]
landmarks = Maybe [Landmark]
a} :: FaceDetail) ((Maybe [Landmark] -> f (Maybe [Landmark]))
-> FaceDetail -> f FaceDetail)
-> ((Maybe [Landmark] -> f (Maybe [Landmark]))
-> Maybe [Landmark] -> f (Maybe [Landmark]))
-> (Maybe [Landmark] -> f (Maybe [Landmark]))
-> FaceDetail
-> f FaceDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Landmark] [Landmark] [Landmark] [Landmark]
-> Iso
(Maybe [Landmark])
(Maybe [Landmark])
(Maybe [Landmark])
(Maybe [Landmark])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Landmark] [Landmark] [Landmark] [Landmark]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON FaceDetail where
parseJSON :: Value -> Parser FaceDetail
parseJSON =
String
-> (Object -> Parser FaceDetail) -> Value -> Parser FaceDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FaceDetail"
( \Object
x ->
Maybe AgeRange
-> Maybe Sunglasses
-> Maybe MouthOpen
-> Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail
FaceDetail'
(Maybe AgeRange
-> Maybe Sunglasses
-> Maybe MouthOpen
-> Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe AgeRange)
-> Parser
(Maybe Sunglasses
-> Maybe MouthOpen
-> Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AgeRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AgeRange")
Parser
(Maybe Sunglasses
-> Maybe MouthOpen
-> Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe Sunglasses)
-> Parser
(Maybe MouthOpen
-> Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Sunglasses)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Sunglasses")
Parser
(Maybe MouthOpen
-> Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe MouthOpen)
-> Parser
(Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MouthOpen)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MouthOpen")
Parser
(Maybe BoundingBox
-> Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe BoundingBox)
-> Parser
(Maybe [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Applicative f => 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 [Emotion]
-> Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe [Emotion])
-> Parser
(Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Emotion]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Emotions" Parser (Maybe (Maybe [Emotion]))
-> Maybe [Emotion] -> Parser (Maybe [Emotion])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Emotion]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe EyeOpen
-> Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe EyeOpen)
-> Parser
(Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EyeOpen)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EyesOpen")
Parser
(Maybe Pose
-> Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe Pose)
-> Parser
(Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Pose)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Pose")
Parser
(Maybe Double
-> Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe Double)
-> Parser
(Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
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")
Parser
(Maybe Gender
-> Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe Gender)
-> Parser
(Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Gender)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Gender")
Parser
(Maybe ImageQuality
-> Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe ImageQuality)
-> Parser
(Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageQuality)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Quality")
Parser
(Maybe Eyeglasses
-> Maybe Beard
-> Maybe Mustache
-> Maybe Smile
-> Maybe [Landmark]
-> FaceDetail)
-> Parser (Maybe Eyeglasses)
-> Parser
(Maybe Beard
-> Maybe Mustache -> Maybe Smile -> Maybe [Landmark] -> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Eyeglasses)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Eyeglasses")
Parser
(Maybe Beard
-> Maybe Mustache -> Maybe Smile -> Maybe [Landmark] -> FaceDetail)
-> Parser (Maybe Beard)
-> Parser
(Maybe Mustache -> Maybe Smile -> Maybe [Landmark] -> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Beard)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Beard")
Parser
(Maybe Mustache -> Maybe Smile -> Maybe [Landmark] -> FaceDetail)
-> Parser (Maybe Mustache)
-> Parser (Maybe Smile -> Maybe [Landmark] -> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Mustache)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Mustache")
Parser (Maybe Smile -> Maybe [Landmark] -> FaceDetail)
-> Parser (Maybe Smile) -> Parser (Maybe [Landmark] -> FaceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Smile)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Smile")
Parser (Maybe [Landmark] -> FaceDetail)
-> Parser (Maybe [Landmark]) -> Parser FaceDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Landmark]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Landmarks" Parser (Maybe (Maybe [Landmark]))
-> Maybe [Landmark] -> Parser (Maybe [Landmark])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Landmark]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable FaceDetail
instance Prelude.NFData FaceDetail