{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.StepFunctions.Types.ExecutionStatus
data ExecutionListItem = ExecutionListItem'
{
ExecutionListItem -> Maybe Natural
itemCount :: Prelude.Maybe Prelude.Natural,
ExecutionListItem -> Maybe Text
mapRunArn :: Prelude.Maybe Prelude.Text,
ExecutionListItem -> Maybe POSIX
stopDate :: Prelude.Maybe Data.POSIX,
ExecutionListItem -> Text
executionArn :: Prelude.Text,
ExecutionListItem -> Text
stateMachineArn :: Prelude.Text,
ExecutionListItem -> Text
name :: Prelude.Text,
ExecutionListItem -> ExecutionStatus
status :: ExecutionStatus,
ExecutionListItem -> POSIX
startDate :: Data.POSIX
}
deriving (ExecutionListItem -> ExecutionListItem -> Bool
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]
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
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. 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'
{ $sel:itemCount:ExecutionListItem' :: Maybe Natural
itemCount = forall a. Maybe a
Prelude.Nothing,
$sel:mapRunArn:ExecutionListItem' :: Maybe Text
mapRunArn = forall a. Maybe a
Prelude.Nothing,
$sel:stopDate:ExecutionListItem' :: Maybe POSIX
stopDate = 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 = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartDate_
}
executionListItem_itemCount :: Lens.Lens' ExecutionListItem (Prelude.Maybe Prelude.Natural)
executionListItem_itemCount :: Lens' ExecutionListItem (Maybe Natural)
executionListItem_itemCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionListItem' {Maybe Natural
itemCount :: Maybe Natural
$sel:itemCount:ExecutionListItem' :: ExecutionListItem -> Maybe Natural
itemCount} -> Maybe Natural
itemCount) (\s :: ExecutionListItem
s@ExecutionListItem' {} Maybe Natural
a -> ExecutionListItem
s {$sel:itemCount:ExecutionListItem' :: Maybe Natural
itemCount = Maybe Natural
a} :: ExecutionListItem)
executionListItem_mapRunArn :: Lens.Lens' ExecutionListItem (Prelude.Maybe Prelude.Text)
executionListItem_mapRunArn :: Lens' ExecutionListItem (Maybe Text)
executionListItem_mapRunArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecutionListItem' {Maybe Text
mapRunArn :: Maybe Text
$sel:mapRunArn:ExecutionListItem' :: ExecutionListItem -> Maybe Text
mapRunArn} -> Maybe Text
mapRunArn) (\s :: ExecutionListItem
s@ExecutionListItem' {} Maybe Text
a -> ExecutionListItem
s {$sel:mapRunArn:ExecutionListItem' :: Maybe Text
mapRunArn = Maybe Text
a} :: ExecutionListItem)
executionListItem_stopDate :: Lens.Lens' ExecutionListItem (Prelude.Maybe Prelude.UTCTime)
executionListItem_stopDate :: Lens' ExecutionListItem (Maybe UTCTime)
executionListItem_stopDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
executionListItem_executionArn :: Lens.Lens' ExecutionListItem Prelude.Text
executionListItem_executionArn :: Lens' ExecutionListItem Text
executionListItem_executionArn = 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 :: Lens' ExecutionListItem Text
executionListItem_stateMachineArn = 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 :: Lens' ExecutionListItem Text
executionListItem_name = 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 :: Lens' ExecutionListItem ExecutionStatus
executionListItem_status = 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 :: Lens' ExecutionListItem UTCTime
executionListItem_startDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON ExecutionListItem where
parseJSON :: Value -> Parser ExecutionListItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ExecutionListItem"
( \Object
x ->
Maybe Natural
-> Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> Text
-> ExecutionStatus
-> POSIX
-> ExecutionListItem
ExecutionListItem'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"itemCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"mapRunArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stopDate")
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
"executionArn")
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
"stateMachineArn")
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
"status")
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
"startDate")
)
instance Prelude.Hashable ExecutionListItem where
hashWithSalt :: Int -> ExecutionListItem -> Int
hashWithSalt Int
_salt ExecutionListItem' {Maybe Natural
Maybe Text
Maybe POSIX
Text
POSIX
ExecutionStatus
startDate :: POSIX
status :: ExecutionStatus
name :: Text
stateMachineArn :: Text
executionArn :: Text
stopDate :: Maybe POSIX
mapRunArn :: Maybe Text
itemCount :: Maybe Natural
$sel:startDate:ExecutionListItem' :: ExecutionListItem -> POSIX
$sel:status:ExecutionListItem' :: ExecutionListItem -> ExecutionStatus
$sel:name:ExecutionListItem' :: ExecutionListItem -> Text
$sel:stateMachineArn:ExecutionListItem' :: ExecutionListItem -> Text
$sel:executionArn:ExecutionListItem' :: ExecutionListItem -> Text
$sel:stopDate:ExecutionListItem' :: ExecutionListItem -> Maybe POSIX
$sel:mapRunArn:ExecutionListItem' :: ExecutionListItem -> Maybe Text
$sel:itemCount:ExecutionListItem' :: ExecutionListItem -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
itemCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mapRunArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
stopDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
executionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stateMachineArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ExecutionStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
startDate
instance Prelude.NFData ExecutionListItem where
rnf :: ExecutionListItem -> ()
rnf ExecutionListItem' {Maybe Natural
Maybe Text
Maybe POSIX
Text
POSIX
ExecutionStatus
startDate :: POSIX
status :: ExecutionStatus
name :: Text
stateMachineArn :: Text
executionArn :: Text
stopDate :: Maybe POSIX
mapRunArn :: Maybe Text
itemCount :: Maybe Natural
$sel:startDate:ExecutionListItem' :: ExecutionListItem -> POSIX
$sel:status:ExecutionListItem' :: ExecutionListItem -> ExecutionStatus
$sel:name:ExecutionListItem' :: ExecutionListItem -> Text
$sel:stateMachineArn:ExecutionListItem' :: ExecutionListItem -> Text
$sel:executionArn:ExecutionListItem' :: ExecutionListItem -> Text
$sel:stopDate:ExecutionListItem' :: ExecutionListItem -> Maybe POSIX
$sel:mapRunArn:ExecutionListItem' :: ExecutionListItem -> Maybe Text
$sel:itemCount:ExecutionListItem' :: ExecutionListItem -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
itemCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mapRunArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
stopDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
executionArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stateMachineArn
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 ExecutionStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
startDate