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