{-# 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.StepFunctions.Types.ActivityListItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActivityListItem = ActivityListItem'
{
ActivityListItem -> Text
activityArn :: Prelude.Text,
ActivityListItem -> Text
name :: Prelude.Text,
ActivityListItem -> POSIX
creationDate :: Core.POSIX
}
deriving (ActivityListItem -> ActivityListItem -> Bool
(ActivityListItem -> ActivityListItem -> Bool)
-> (ActivityListItem -> ActivityListItem -> Bool)
-> Eq ActivityListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActivityListItem -> ActivityListItem -> Bool
$c/= :: ActivityListItem -> ActivityListItem -> Bool
== :: ActivityListItem -> ActivityListItem -> Bool
$c== :: ActivityListItem -> ActivityListItem -> Bool
Prelude.Eq, ReadPrec [ActivityListItem]
ReadPrec ActivityListItem
Int -> ReadS ActivityListItem
ReadS [ActivityListItem]
(Int -> ReadS ActivityListItem)
-> ReadS [ActivityListItem]
-> ReadPrec ActivityListItem
-> ReadPrec [ActivityListItem]
-> Read ActivityListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActivityListItem]
$creadListPrec :: ReadPrec [ActivityListItem]
readPrec :: ReadPrec ActivityListItem
$creadPrec :: ReadPrec ActivityListItem
readList :: ReadS [ActivityListItem]
$creadList :: ReadS [ActivityListItem]
readsPrec :: Int -> ReadS ActivityListItem
$creadsPrec :: Int -> ReadS ActivityListItem
Prelude.Read, Int -> ActivityListItem -> ShowS
[ActivityListItem] -> ShowS
ActivityListItem -> String
(Int -> ActivityListItem -> ShowS)
-> (ActivityListItem -> String)
-> ([ActivityListItem] -> ShowS)
-> Show ActivityListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActivityListItem] -> ShowS
$cshowList :: [ActivityListItem] -> ShowS
show :: ActivityListItem -> String
$cshow :: ActivityListItem -> String
showsPrec :: Int -> ActivityListItem -> ShowS
$cshowsPrec :: Int -> ActivityListItem -> ShowS
Prelude.Show, (forall x. ActivityListItem -> Rep ActivityListItem x)
-> (forall x. Rep ActivityListItem x -> ActivityListItem)
-> Generic ActivityListItem
forall x. Rep ActivityListItem x -> ActivityListItem
forall x. ActivityListItem -> Rep ActivityListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActivityListItem x -> ActivityListItem
$cfrom :: forall x. ActivityListItem -> Rep ActivityListItem x
Prelude.Generic)
newActivityListItem ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
ActivityListItem
newActivityListItem :: Text -> Text -> UTCTime -> ActivityListItem
newActivityListItem
Text
pActivityArn_
Text
pName_
UTCTime
pCreationDate_ =
ActivityListItem' :: Text -> Text -> POSIX -> ActivityListItem
ActivityListItem'
{ $sel:activityArn:ActivityListItem' :: Text
activityArn = Text
pActivityArn_,
$sel:name:ActivityListItem' :: Text
name = Text
pName_,
$sel:creationDate:ActivityListItem' :: POSIX
creationDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDate_
}
activityListItem_activityArn :: Lens.Lens' ActivityListItem Prelude.Text
activityListItem_activityArn :: (Text -> f Text) -> ActivityListItem -> f ActivityListItem
activityListItem_activityArn = (ActivityListItem -> Text)
-> (ActivityListItem -> Text -> ActivityListItem)
-> Lens ActivityListItem ActivityListItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityListItem' {Text
activityArn :: Text
$sel:activityArn:ActivityListItem' :: ActivityListItem -> Text
activityArn} -> Text
activityArn) (\s :: ActivityListItem
s@ActivityListItem' {} Text
a -> ActivityListItem
s {$sel:activityArn:ActivityListItem' :: Text
activityArn = Text
a} :: ActivityListItem)
activityListItem_name :: Lens.Lens' ActivityListItem Prelude.Text
activityListItem_name :: (Text -> f Text) -> ActivityListItem -> f ActivityListItem
activityListItem_name = (ActivityListItem -> Text)
-> (ActivityListItem -> Text -> ActivityListItem)
-> Lens ActivityListItem ActivityListItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityListItem' {Text
name :: Text
$sel:name:ActivityListItem' :: ActivityListItem -> Text
name} -> Text
name) (\s :: ActivityListItem
s@ActivityListItem' {} Text
a -> ActivityListItem
s {$sel:name:ActivityListItem' :: Text
name = Text
a} :: ActivityListItem)
activityListItem_creationDate :: Lens.Lens' ActivityListItem Prelude.UTCTime
activityListItem_creationDate :: (UTCTime -> f UTCTime) -> ActivityListItem -> f ActivityListItem
activityListItem_creationDate = (ActivityListItem -> POSIX)
-> (ActivityListItem -> POSIX -> ActivityListItem)
-> Lens ActivityListItem ActivityListItem POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityListItem' {POSIX
creationDate :: POSIX
$sel:creationDate:ActivityListItem' :: ActivityListItem -> POSIX
creationDate} -> POSIX
creationDate) (\s :: ActivityListItem
s@ActivityListItem' {} POSIX
a -> ActivityListItem
s {$sel:creationDate:ActivityListItem' :: POSIX
creationDate = POSIX
a} :: ActivityListItem) ((POSIX -> f POSIX) -> ActivityListItem -> f ActivityListItem)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ActivityListItem
-> f ActivityListItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON ActivityListItem where
parseJSON :: Value -> Parser ActivityListItem
parseJSON =
String
-> (Object -> Parser ActivityListItem)
-> Value
-> Parser ActivityListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActivityListItem"
( \Object
x ->
Text -> Text -> POSIX -> ActivityListItem
ActivityListItem'
(Text -> Text -> POSIX -> ActivityListItem)
-> Parser Text -> Parser (Text -> POSIX -> ActivityListItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"activityArn")
Parser (Text -> POSIX -> ActivityListItem)
-> Parser Text -> Parser (POSIX -> ActivityListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (POSIX -> ActivityListItem)
-> Parser POSIX -> Parser ActivityListItem
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"creationDate")
)
instance Prelude.Hashable ActivityListItem
instance Prelude.NFData ActivityListItem