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