{-# 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.ProjectDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.Types.ProjectStatus
data ProjectDescription = ProjectDescription'
{
ProjectDescription -> Maybe ProjectStatus
status :: Prelude.Maybe ProjectStatus,
ProjectDescription -> Maybe POSIX
creationTimestamp :: Prelude.Maybe Core.POSIX,
ProjectDescription -> Maybe Text
projectArn :: Prelude.Maybe Prelude.Text
}
deriving (ProjectDescription -> ProjectDescription -> Bool
(ProjectDescription -> ProjectDescription -> Bool)
-> (ProjectDescription -> ProjectDescription -> Bool)
-> Eq ProjectDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectDescription -> ProjectDescription -> Bool
$c/= :: ProjectDescription -> ProjectDescription -> Bool
== :: ProjectDescription -> ProjectDescription -> Bool
$c== :: ProjectDescription -> ProjectDescription -> Bool
Prelude.Eq, ReadPrec [ProjectDescription]
ReadPrec ProjectDescription
Int -> ReadS ProjectDescription
ReadS [ProjectDescription]
(Int -> ReadS ProjectDescription)
-> ReadS [ProjectDescription]
-> ReadPrec ProjectDescription
-> ReadPrec [ProjectDescription]
-> Read ProjectDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProjectDescription]
$creadListPrec :: ReadPrec [ProjectDescription]
readPrec :: ReadPrec ProjectDescription
$creadPrec :: ReadPrec ProjectDescription
readList :: ReadS [ProjectDescription]
$creadList :: ReadS [ProjectDescription]
readsPrec :: Int -> ReadS ProjectDescription
$creadsPrec :: Int -> ReadS ProjectDescription
Prelude.Read, Int -> ProjectDescription -> ShowS
[ProjectDescription] -> ShowS
ProjectDescription -> String
(Int -> ProjectDescription -> ShowS)
-> (ProjectDescription -> String)
-> ([ProjectDescription] -> ShowS)
-> Show ProjectDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectDescription] -> ShowS
$cshowList :: [ProjectDescription] -> ShowS
show :: ProjectDescription -> String
$cshow :: ProjectDescription -> String
showsPrec :: Int -> ProjectDescription -> ShowS
$cshowsPrec :: Int -> ProjectDescription -> ShowS
Prelude.Show, (forall x. ProjectDescription -> Rep ProjectDescription x)
-> (forall x. Rep ProjectDescription x -> ProjectDescription)
-> Generic ProjectDescription
forall x. Rep ProjectDescription x -> ProjectDescription
forall x. ProjectDescription -> Rep ProjectDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectDescription x -> ProjectDescription
$cfrom :: forall x. ProjectDescription -> Rep ProjectDescription x
Prelude.Generic)
newProjectDescription ::
ProjectDescription
newProjectDescription :: ProjectDescription
newProjectDescription =
ProjectDescription' :: Maybe ProjectStatus
-> Maybe POSIX -> Maybe Text -> ProjectDescription
ProjectDescription'
{ $sel:status:ProjectDescription' :: Maybe ProjectStatus
status = Maybe ProjectStatus
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimestamp:ProjectDescription' :: Maybe POSIX
creationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:projectArn:ProjectDescription' :: Maybe Text
projectArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
projectDescription_status :: Lens.Lens' ProjectDescription (Prelude.Maybe ProjectStatus)
projectDescription_status :: (Maybe ProjectStatus -> f (Maybe ProjectStatus))
-> ProjectDescription -> f ProjectDescription
projectDescription_status = (ProjectDescription -> Maybe ProjectStatus)
-> (ProjectDescription
-> Maybe ProjectStatus -> ProjectDescription)
-> Lens
ProjectDescription
ProjectDescription
(Maybe ProjectStatus)
(Maybe ProjectStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectDescription' {Maybe ProjectStatus
status :: Maybe ProjectStatus
$sel:status:ProjectDescription' :: ProjectDescription -> Maybe ProjectStatus
status} -> Maybe ProjectStatus
status) (\s :: ProjectDescription
s@ProjectDescription' {} Maybe ProjectStatus
a -> ProjectDescription
s {$sel:status:ProjectDescription' :: Maybe ProjectStatus
status = Maybe ProjectStatus
a} :: ProjectDescription)
projectDescription_creationTimestamp :: Lens.Lens' ProjectDescription (Prelude.Maybe Prelude.UTCTime)
projectDescription_creationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProjectDescription -> f ProjectDescription
projectDescription_creationTimestamp = (ProjectDescription -> Maybe POSIX)
-> (ProjectDescription -> Maybe POSIX -> ProjectDescription)
-> Lens
ProjectDescription ProjectDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectDescription' {Maybe POSIX
creationTimestamp :: Maybe POSIX
$sel:creationTimestamp:ProjectDescription' :: ProjectDescription -> Maybe POSIX
creationTimestamp} -> Maybe POSIX
creationTimestamp) (\s :: ProjectDescription
s@ProjectDescription' {} Maybe POSIX
a -> ProjectDescription
s {$sel:creationTimestamp:ProjectDescription' :: Maybe POSIX
creationTimestamp = Maybe POSIX
a} :: ProjectDescription) ((Maybe POSIX -> f (Maybe POSIX))
-> ProjectDescription -> f ProjectDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProjectDescription
-> f ProjectDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
projectDescription_projectArn :: Lens.Lens' ProjectDescription (Prelude.Maybe Prelude.Text)
projectDescription_projectArn :: (Maybe Text -> f (Maybe Text))
-> ProjectDescription -> f ProjectDescription
projectDescription_projectArn = (ProjectDescription -> Maybe Text)
-> (ProjectDescription -> Maybe Text -> ProjectDescription)
-> Lens
ProjectDescription ProjectDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectDescription' {Maybe Text
projectArn :: Maybe Text
$sel:projectArn:ProjectDescription' :: ProjectDescription -> Maybe Text
projectArn} -> Maybe Text
projectArn) (\s :: ProjectDescription
s@ProjectDescription' {} Maybe Text
a -> ProjectDescription
s {$sel:projectArn:ProjectDescription' :: Maybe Text
projectArn = Maybe Text
a} :: ProjectDescription)
instance Core.FromJSON ProjectDescription where
parseJSON :: Value -> Parser ProjectDescription
parseJSON =
String
-> (Object -> Parser ProjectDescription)
-> Value
-> Parser ProjectDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProjectDescription"
( \Object
x ->
Maybe ProjectStatus
-> Maybe POSIX -> Maybe Text -> ProjectDescription
ProjectDescription'
(Maybe ProjectStatus
-> Maybe POSIX -> Maybe Text -> ProjectDescription)
-> Parser (Maybe ProjectStatus)
-> Parser (Maybe POSIX -> Maybe Text -> ProjectDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ProjectStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser (Maybe POSIX -> Maybe Text -> ProjectDescription)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> ProjectDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTimestamp")
Parser (Maybe Text -> ProjectDescription)
-> Parser (Maybe Text) -> Parser ProjectDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProjectArn")
)
instance Prelude.Hashable ProjectDescription
instance Prelude.NFData ProjectDescription