{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ActivityListItem = ActivityListItem'
{
ActivityListItem -> Text
activityArn :: Prelude.Text,
ActivityListItem -> Text
name :: Prelude.Text,
ActivityListItem -> POSIX
creationDate :: Data.POSIX
}
deriving (ActivityListItem -> ActivityListItem -> Bool
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]
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
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. 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'
{ $sel:activityArn:ActivityListItem' :: Text
activityArn = Text
pActivityArn_,
$sel:name:ActivityListItem' :: Text
name = Text
pName_,
$sel:creationDate:ActivityListItem' :: POSIX
creationDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDate_
}
activityListItem_activityArn :: Lens.Lens' ActivityListItem Prelude.Text
activityListItem_activityArn :: Lens' ActivityListItem Text
activityListItem_activityArn = 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 :: Lens' ActivityListItem Text
activityListItem_name = 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 :: Lens' ActivityListItem UTCTime
activityListItem_creationDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ActivityListItem where
parseJSON :: Value -> Parser ActivityListItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActivityListItem"
( \Object
x ->
Text -> Text -> POSIX -> ActivityListItem
ActivityListItem'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"activityArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"creationDate")
)
instance Prelude.Hashable ActivityListItem where
hashWithSalt :: Int -> ActivityListItem -> Int
hashWithSalt Int
_salt ActivityListItem' {Text
POSIX
creationDate :: POSIX
name :: Text
activityArn :: Text
$sel:creationDate:ActivityListItem' :: ActivityListItem -> POSIX
$sel:name:ActivityListItem' :: ActivityListItem -> Text
$sel:activityArn:ActivityListItem' :: ActivityListItem -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
activityArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationDate
instance Prelude.NFData ActivityListItem where
rnf :: ActivityListItem -> ()
rnf ActivityListItem' {Text
POSIX
creationDate :: POSIX
name :: Text
activityArn :: Text
$sel:creationDate:ActivityListItem' :: ActivityListItem -> POSIX
$sel:name:ActivityListItem' :: ActivityListItem -> Text
$sel:activityArn:ActivityListItem' :: ActivityListItem -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
activityArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationDate