{-# 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.ExecutionListItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.StepFunctions.Types.ExecutionStatus
data ExecutionListItem = ExecutionListItem'
{
ExecutionListItem -> Maybe POSIX
stopDate :: Prelude.Maybe Core.POSIX,
ExecutionListItem -> Text
executionArn :: Prelude.Text,
ExecutionListItem -> Text
stateMachineArn :: Prelude.Text,
ExecutionListItem -> Text
name :: Prelude.Text,
ExecutionListItem -> ExecutionStatus
status :: ExecutionStatus,
ExecutionListItem -> POSIX
startDate :: Core.POSIX
}
deriving (ExecutionListItem -> ExecutionListItem -> Bool
(ExecutionListItem -> ExecutionListItem -> Bool)
-> (ExecutionListItem -> ExecutionListItem -> Bool)
-> Eq ExecutionListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecutionListItem -> ExecutionListItem -> Bool
$c/= :: ExecutionListItem -> ExecutionListItem -> Bool
== :: ExecutionListItem -> ExecutionListItem -> Bool
$c== :: ExecutionListItem -> ExecutionListItem -> Bool
Prelude.Eq, ReadPrec [ExecutionListItem]
ReadPrec ExecutionListItem
Int -> ReadS ExecutionListItem
ReadS [ExecutionListItem]
(Int -> ReadS ExecutionListItem)
-> ReadS [ExecutionListItem]
-> ReadPrec ExecutionListItem
-> ReadPrec [ExecutionListItem]
-> Read ExecutionListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecutionListItem]
$creadListPrec :: ReadPrec [ExecutionListItem]
readPrec :: ReadPrec ExecutionListItem
$creadPrec :: ReadPrec ExecutionListItem
readList :: ReadS [ExecutionListItem]
$creadList :: ReadS [ExecutionListItem]
readsPrec :: Int -> ReadS ExecutionListItem
$creadsPrec :: Int -> ReadS ExecutionListItem
Prelude.Read, Int -> ExecutionListItem -> ShowS
[ExecutionListItem] -> ShowS
ExecutionListItem -> String
(Int -> ExecutionListItem -> ShowS)
-> (ExecutionListItem -> String)
-> ([ExecutionListItem] -> ShowS)
-> Show ExecutionListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecutionListItem] -> ShowS
$cshowList :: [ExecutionListItem] -> ShowS
show :: ExecutionListItem -> String
$cshow :: ExecutionListItem -> String
showsPrec :: Int -> ExecutionListItem -> ShowS
$cshowsPrec :: Int -> ExecutionListItem -> ShowS
Prelude.Show, (forall x. ExecutionListItem -> Rep ExecutionListItem x)
-> (forall x. Rep ExecutionListItem x -> ExecutionListItem)
-> Generic ExecutionListItem
forall x. Rep ExecutionListItem x -> ExecutionListItem
forall x. ExecutionListItem -> Rep ExecutionListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecutionListItem x -> ExecutionListItem
$cfrom :: forall x. ExecutionListItem -> Rep ExecutionListItem x
Prelude.Generic)
newExecutionListItem ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ExecutionStatus ->
Prelude.UTCTime ->
ExecutionListItem
newExecutionListItem :: Text
-> Text -> Text -> ExecutionStatus -> UTCTime -> ExecutionListItem
newExecutionListItem
Text
pExecutionArn_
Text
pStateMachineArn_
Text
pName_
ExecutionStatus
pStatus_
UTCTime
pStartDate_ =
ExecutionListItem' :: Maybe POSIX
-> Text
-> Text
-> Text
-> ExecutionStatus
-> POSIX
-> ExecutionListItem
ExecutionListItem'
{ $sel:stopDate:ExecutionListItem' :: Maybe POSIX
stopDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:executionArn:ExecutionListItem' :: Text
executionArn = Text
pExecutionArn_,
$sel:stateMachineArn:ExecutionListItem' :: Text
stateMachineArn = Text
pStateMachineArn_,
$sel:name:ExecutionListItem' :: Text
name = Text
pName_,
$sel:status:ExecutionListItem' :: ExecutionStatus
status = ExecutionStatus
pStatus_,
$sel:startDate:ExecutionListItem' :: POSIX
startDate = 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
pStartDate_
}
executionListItem_stopDate :: Lens.Lens' ExecutionListItem (Prelude.Maybe Prelude.UTCTime)
executionListItem_stopDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ExecutionListItem -> f ExecutionListItem
executionListItem_stopDate = (ExecutionListItem -> Maybe POSIX)
-> (ExecutionListItem -> Maybe POSIX -> ExecutionListItem)
-> Lens
ExecutionListItem ExecutionListItem (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionListItem' {Maybe POSIX
stopDate :: Maybe POSIX
$sel:stopDate:ExecutionListItem' :: ExecutionListItem -> Maybe POSIX
stopDate} -> Maybe POSIX
stopDate) (\s :: ExecutionListItem
s@ExecutionListItem' {} Maybe POSIX
a -> ExecutionListItem
s {$sel:stopDate:ExecutionListItem' :: Maybe POSIX
stopDate = Maybe POSIX
a} :: ExecutionListItem) ((Maybe POSIX -> f (Maybe POSIX))
-> ExecutionListItem -> f ExecutionListItem)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ExecutionListItem
-> f ExecutionListItem
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
executionListItem_executionArn :: Lens.Lens' ExecutionListItem Prelude.Text
executionListItem_executionArn :: (Text -> f Text) -> ExecutionListItem -> f ExecutionListItem
executionListItem_executionArn = (ExecutionListItem -> Text)
-> (ExecutionListItem -> Text -> ExecutionListItem)
-> Lens ExecutionListItem ExecutionListItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionListItem' {Text
executionArn :: Text
$sel:executionArn:ExecutionListItem' :: ExecutionListItem -> Text
executionArn} -> Text
executionArn) (\s :: ExecutionListItem
s@ExecutionListItem' {} Text
a -> ExecutionListItem
s {$sel:executionArn:ExecutionListItem' :: Text
executionArn = Text
a} :: ExecutionListItem)
executionListItem_stateMachineArn :: Lens.Lens' ExecutionListItem Prelude.Text
executionListItem_stateMachineArn :: (Text -> f Text) -> ExecutionListItem -> f ExecutionListItem
executionListItem_stateMachineArn = (ExecutionListItem -> Text)
-> (ExecutionListItem -> Text -> ExecutionListItem)
-> Lens ExecutionListItem ExecutionListItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionListItem' {Text
stateMachineArn :: Text
$sel:stateMachineArn:ExecutionListItem' :: ExecutionListItem -> Text
stateMachineArn} -> Text
stateMachineArn) (\s :: ExecutionListItem
s@ExecutionListItem' {} Text
a -> ExecutionListItem
s {$sel:stateMachineArn:ExecutionListItem' :: Text
stateMachineArn = Text
a} :: ExecutionListItem)
executionListItem_name :: Lens.Lens' ExecutionListItem Prelude.Text
executionListItem_name :: (Text -> f Text) -> ExecutionListItem -> f ExecutionListItem
executionListItem_name = (ExecutionListItem -> Text)
-> (ExecutionListItem -> Text -> ExecutionListItem)
-> Lens ExecutionListItem ExecutionListItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionListItem' {Text
name :: Text
$sel:name:ExecutionListItem' :: ExecutionListItem -> Text
name} -> Text
name) (\s :: ExecutionListItem
s@ExecutionListItem' {} Text
a -> ExecutionListItem
s {$sel:name:ExecutionListItem' :: Text
name = Text
a} :: ExecutionListItem)
executionListItem_status :: Lens.Lens' ExecutionListItem ExecutionStatus
executionListItem_status :: (ExecutionStatus -> f ExecutionStatus)
-> ExecutionListItem -> f ExecutionListItem
executionListItem_status = (ExecutionListItem -> ExecutionStatus)
-> (ExecutionListItem -> ExecutionStatus -> ExecutionListItem)
-> Lens
ExecutionListItem ExecutionListItem ExecutionStatus ExecutionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionListItem' {ExecutionStatus
status :: ExecutionStatus
$sel:status:ExecutionListItem' :: ExecutionListItem -> ExecutionStatus
status} -> ExecutionStatus
status) (\s :: ExecutionListItem
s@ExecutionListItem' {} ExecutionStatus
a -> ExecutionListItem
s {$sel:status:ExecutionListItem' :: ExecutionStatus
status = ExecutionStatus
a} :: ExecutionListItem)
executionListItem_startDate :: Lens.Lens' ExecutionListItem Prelude.UTCTime
executionListItem_startDate :: (UTCTime -> f UTCTime) -> ExecutionListItem -> f ExecutionListItem
executionListItem_startDate = (ExecutionListItem -> POSIX)
-> (ExecutionListItem -> POSIX -> ExecutionListItem)
-> Lens ExecutionListItem ExecutionListItem POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionListItem' {POSIX
startDate :: POSIX
$sel:startDate:ExecutionListItem' :: ExecutionListItem -> POSIX
startDate} -> POSIX
startDate) (\s :: ExecutionListItem
s@ExecutionListItem' {} POSIX
a -> ExecutionListItem
s {$sel:startDate:ExecutionListItem' :: POSIX
startDate = POSIX
a} :: ExecutionListItem) ((POSIX -> f POSIX) -> ExecutionListItem -> f ExecutionListItem)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ExecutionListItem
-> f ExecutionListItem
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 ExecutionListItem where
parseJSON :: Value -> Parser ExecutionListItem
parseJSON =
String
-> (Object -> Parser ExecutionListItem)
-> Value
-> Parser ExecutionListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ExecutionListItem"
( \Object
x ->
Maybe POSIX
-> Text
-> Text
-> Text
-> ExecutionStatus
-> POSIX
-> ExecutionListItem
ExecutionListItem'
(Maybe POSIX
-> Text
-> Text
-> Text
-> ExecutionStatus
-> POSIX
-> ExecutionListItem)
-> Parser (Maybe POSIX)
-> Parser
(Text
-> Text -> Text -> ExecutionStatus -> POSIX -> ExecutionListItem)
forall (f :: * -> *) a b. Functor 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
"stopDate")
Parser
(Text
-> Text -> Text -> ExecutionStatus -> POSIX -> ExecutionListItem)
-> Parser Text
-> Parser
(Text -> Text -> ExecutionStatus -> POSIX -> ExecutionListItem)
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
"executionArn")
Parser
(Text -> Text -> ExecutionStatus -> POSIX -> ExecutionListItem)
-> Parser Text
-> Parser (Text -> ExecutionStatus -> POSIX -> ExecutionListItem)
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
"stateMachineArn")
Parser (Text -> ExecutionStatus -> POSIX -> ExecutionListItem)
-> Parser Text
-> Parser (ExecutionStatus -> POSIX -> ExecutionListItem)
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 (ExecutionStatus -> POSIX -> ExecutionListItem)
-> Parser ExecutionStatus -> Parser (POSIX -> ExecutionListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ExecutionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (POSIX -> ExecutionListItem)
-> Parser POSIX -> Parser ExecutionListItem
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
"startDate")
)
instance Prelude.Hashable ExecutionListItem
instance Prelude.NFData ExecutionListItem