{-# 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.Eyeglasses where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Eyeglasses = Eyeglasses'
{
Eyeglasses -> Maybe Bool
value :: Prelude.Maybe Prelude.Bool,
Eyeglasses -> Maybe Double
confidence :: Prelude.Maybe Prelude.Double
}
deriving (Eyeglasses -> Eyeglasses -> Bool
(Eyeglasses -> Eyeglasses -> Bool)
-> (Eyeglasses -> Eyeglasses -> Bool) -> Eq Eyeglasses
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Eyeglasses -> Eyeglasses -> Bool
$c/= :: Eyeglasses -> Eyeglasses -> Bool
== :: Eyeglasses -> Eyeglasses -> Bool
$c== :: Eyeglasses -> Eyeglasses -> Bool
Prelude.Eq, ReadPrec [Eyeglasses]
ReadPrec Eyeglasses
Int -> ReadS Eyeglasses
ReadS [Eyeglasses]
(Int -> ReadS Eyeglasses)
-> ReadS [Eyeglasses]
-> ReadPrec Eyeglasses
-> ReadPrec [Eyeglasses]
-> Read Eyeglasses
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Eyeglasses]
$creadListPrec :: ReadPrec [Eyeglasses]
readPrec :: ReadPrec Eyeglasses
$creadPrec :: ReadPrec Eyeglasses
readList :: ReadS [Eyeglasses]
$creadList :: ReadS [Eyeglasses]
readsPrec :: Int -> ReadS Eyeglasses
$creadsPrec :: Int -> ReadS Eyeglasses
Prelude.Read, Int -> Eyeglasses -> ShowS
[Eyeglasses] -> ShowS
Eyeglasses -> String
(Int -> Eyeglasses -> ShowS)
-> (Eyeglasses -> String)
-> ([Eyeglasses] -> ShowS)
-> Show Eyeglasses
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Eyeglasses] -> ShowS
$cshowList :: [Eyeglasses] -> ShowS
show :: Eyeglasses -> String
$cshow :: Eyeglasses -> String
showsPrec :: Int -> Eyeglasses -> ShowS
$cshowsPrec :: Int -> Eyeglasses -> ShowS
Prelude.Show, (forall x. Eyeglasses -> Rep Eyeglasses x)
-> (forall x. Rep Eyeglasses x -> Eyeglasses) -> Generic Eyeglasses
forall x. Rep Eyeglasses x -> Eyeglasses
forall x. Eyeglasses -> Rep Eyeglasses x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Eyeglasses x -> Eyeglasses
$cfrom :: forall x. Eyeglasses -> Rep Eyeglasses x
Prelude.Generic)
newEyeglasses ::
Eyeglasses
newEyeglasses :: Eyeglasses
newEyeglasses =
Eyeglasses' :: Maybe Bool -> Maybe Double -> Eyeglasses
Eyeglasses'
{ $sel:value:Eyeglasses' :: Maybe Bool
value = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:confidence:Eyeglasses' :: Maybe Double
confidence = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
eyeglasses_value :: Lens.Lens' Eyeglasses (Prelude.Maybe Prelude.Bool)
eyeglasses_value :: (Maybe Bool -> f (Maybe Bool)) -> Eyeglasses -> f Eyeglasses
eyeglasses_value = (Eyeglasses -> Maybe Bool)
-> (Eyeglasses -> Maybe Bool -> Eyeglasses)
-> Lens Eyeglasses Eyeglasses (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Eyeglasses' {Maybe Bool
value :: Maybe Bool
$sel:value:Eyeglasses' :: Eyeglasses -> Maybe Bool
value} -> Maybe Bool
value) (\s :: Eyeglasses
s@Eyeglasses' {} Maybe Bool
a -> Eyeglasses
s {$sel:value:Eyeglasses' :: Maybe Bool
value = Maybe Bool
a} :: Eyeglasses)
eyeglasses_confidence :: Lens.Lens' Eyeglasses (Prelude.Maybe Prelude.Double)
eyeglasses_confidence :: (Maybe Double -> f (Maybe Double)) -> Eyeglasses -> f Eyeglasses
eyeglasses_confidence = (Eyeglasses -> Maybe Double)
-> (Eyeglasses -> Maybe Double -> Eyeglasses)
-> Lens Eyeglasses Eyeglasses (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Eyeglasses' {Maybe Double
confidence :: Maybe Double
$sel:confidence:Eyeglasses' :: Eyeglasses -> Maybe Double
confidence} -> Maybe Double
confidence) (\s :: Eyeglasses
s@Eyeglasses' {} Maybe Double
a -> Eyeglasses
s {$sel:confidence:Eyeglasses' :: Maybe Double
confidence = Maybe Double
a} :: Eyeglasses)
instance Core.FromJSON Eyeglasses where
parseJSON :: Value -> Parser Eyeglasses
parseJSON =
String
-> (Object -> Parser Eyeglasses) -> Value -> Parser Eyeglasses
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Eyeglasses"
( \Object
x ->
Maybe Bool -> Maybe Double -> Eyeglasses
Eyeglasses'
(Maybe Bool -> Maybe Double -> Eyeglasses)
-> Parser (Maybe Bool) -> Parser (Maybe Double -> Eyeglasses)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Value")
Parser (Maybe Double -> Eyeglasses)
-> Parser (Maybe Double) -> Parser Eyeglasses
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 Eyeglasses
instance Prelude.NFData Eyeglasses