{-# 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.StateMachineListItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.StepFunctions.Types.StateMachineType
data StateMachineListItem = StateMachineListItem'
{
StateMachineListItem -> Text
stateMachineArn :: Prelude.Text,
StateMachineListItem -> Text
name :: Prelude.Text,
StateMachineListItem -> StateMachineType
type' :: StateMachineType,
StateMachineListItem -> POSIX
creationDate :: Core.POSIX
}
deriving (StateMachineListItem -> StateMachineListItem -> Bool
(StateMachineListItem -> StateMachineListItem -> Bool)
-> (StateMachineListItem -> StateMachineListItem -> Bool)
-> Eq StateMachineListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StateMachineListItem -> StateMachineListItem -> Bool
$c/= :: StateMachineListItem -> StateMachineListItem -> Bool
== :: StateMachineListItem -> StateMachineListItem -> Bool
$c== :: StateMachineListItem -> StateMachineListItem -> Bool
Prelude.Eq, ReadPrec [StateMachineListItem]
ReadPrec StateMachineListItem
Int -> ReadS StateMachineListItem
ReadS [StateMachineListItem]
(Int -> ReadS StateMachineListItem)
-> ReadS [StateMachineListItem]
-> ReadPrec StateMachineListItem
-> ReadPrec [StateMachineListItem]
-> Read StateMachineListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StateMachineListItem]
$creadListPrec :: ReadPrec [StateMachineListItem]
readPrec :: ReadPrec StateMachineListItem
$creadPrec :: ReadPrec StateMachineListItem
readList :: ReadS [StateMachineListItem]
$creadList :: ReadS [StateMachineListItem]
readsPrec :: Int -> ReadS StateMachineListItem
$creadsPrec :: Int -> ReadS StateMachineListItem
Prelude.Read, Int -> StateMachineListItem -> ShowS
[StateMachineListItem] -> ShowS
StateMachineListItem -> String
(Int -> StateMachineListItem -> ShowS)
-> (StateMachineListItem -> String)
-> ([StateMachineListItem] -> ShowS)
-> Show StateMachineListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StateMachineListItem] -> ShowS
$cshowList :: [StateMachineListItem] -> ShowS
show :: StateMachineListItem -> String
$cshow :: StateMachineListItem -> String
showsPrec :: Int -> StateMachineListItem -> ShowS
$cshowsPrec :: Int -> StateMachineListItem -> ShowS
Prelude.Show, (forall x. StateMachineListItem -> Rep StateMachineListItem x)
-> (forall x. Rep StateMachineListItem x -> StateMachineListItem)
-> Generic StateMachineListItem
forall x. Rep StateMachineListItem x -> StateMachineListItem
forall x. StateMachineListItem -> Rep StateMachineListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StateMachineListItem x -> StateMachineListItem
$cfrom :: forall x. StateMachineListItem -> Rep StateMachineListItem x
Prelude.Generic)
newStateMachineListItem ::
Prelude.Text ->
Prelude.Text ->
StateMachineType ->
Prelude.UTCTime ->
StateMachineListItem
newStateMachineListItem :: Text -> Text -> StateMachineType -> UTCTime -> StateMachineListItem
newStateMachineListItem
Text
pStateMachineArn_
Text
pName_
StateMachineType
pType_
UTCTime
pCreationDate_ =
StateMachineListItem' :: Text -> Text -> StateMachineType -> POSIX -> StateMachineListItem
StateMachineListItem'
{ $sel:stateMachineArn:StateMachineListItem' :: Text
stateMachineArn =
Text
pStateMachineArn_,
$sel:name:StateMachineListItem' :: Text
name = Text
pName_,
$sel:type':StateMachineListItem' :: StateMachineType
type' = StateMachineType
pType_,
$sel:creationDate:StateMachineListItem' :: 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_
}
stateMachineListItem_stateMachineArn :: Lens.Lens' StateMachineListItem Prelude.Text
stateMachineListItem_stateMachineArn :: (Text -> f Text) -> StateMachineListItem -> f StateMachineListItem
stateMachineListItem_stateMachineArn = (StateMachineListItem -> Text)
-> (StateMachineListItem -> Text -> StateMachineListItem)
-> Lens StateMachineListItem StateMachineListItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StateMachineListItem' {Text
stateMachineArn :: Text
$sel:stateMachineArn:StateMachineListItem' :: StateMachineListItem -> Text
stateMachineArn} -> Text
stateMachineArn) (\s :: StateMachineListItem
s@StateMachineListItem' {} Text
a -> StateMachineListItem
s {$sel:stateMachineArn:StateMachineListItem' :: Text
stateMachineArn = Text
a} :: StateMachineListItem)
stateMachineListItem_name :: Lens.Lens' StateMachineListItem Prelude.Text
stateMachineListItem_name :: (Text -> f Text) -> StateMachineListItem -> f StateMachineListItem
stateMachineListItem_name = (StateMachineListItem -> Text)
-> (StateMachineListItem -> Text -> StateMachineListItem)
-> Lens StateMachineListItem StateMachineListItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StateMachineListItem' {Text
name :: Text
$sel:name:StateMachineListItem' :: StateMachineListItem -> Text
name} -> Text
name) (\s :: StateMachineListItem
s@StateMachineListItem' {} Text
a -> StateMachineListItem
s {$sel:name:StateMachineListItem' :: Text
name = Text
a} :: StateMachineListItem)
stateMachineListItem_type :: Lens.Lens' StateMachineListItem StateMachineType
stateMachineListItem_type :: (StateMachineType -> f StateMachineType)
-> StateMachineListItem -> f StateMachineListItem
stateMachineListItem_type = (StateMachineListItem -> StateMachineType)
-> (StateMachineListItem
-> StateMachineType -> StateMachineListItem)
-> Lens
StateMachineListItem
StateMachineListItem
StateMachineType
StateMachineType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StateMachineListItem' {StateMachineType
type' :: StateMachineType
$sel:type':StateMachineListItem' :: StateMachineListItem -> StateMachineType
type'} -> StateMachineType
type') (\s :: StateMachineListItem
s@StateMachineListItem' {} StateMachineType
a -> StateMachineListItem
s {$sel:type':StateMachineListItem' :: StateMachineType
type' = StateMachineType
a} :: StateMachineListItem)
stateMachineListItem_creationDate :: Lens.Lens' StateMachineListItem Prelude.UTCTime
stateMachineListItem_creationDate :: (UTCTime -> f UTCTime)
-> StateMachineListItem -> f StateMachineListItem
stateMachineListItem_creationDate = (StateMachineListItem -> POSIX)
-> (StateMachineListItem -> POSIX -> StateMachineListItem)
-> Lens StateMachineListItem StateMachineListItem POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StateMachineListItem' {POSIX
creationDate :: POSIX
$sel:creationDate:StateMachineListItem' :: StateMachineListItem -> POSIX
creationDate} -> POSIX
creationDate) (\s :: StateMachineListItem
s@StateMachineListItem' {} POSIX
a -> StateMachineListItem
s {$sel:creationDate:StateMachineListItem' :: POSIX
creationDate = POSIX
a} :: StateMachineListItem) ((POSIX -> f POSIX)
-> StateMachineListItem -> f StateMachineListItem)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> StateMachineListItem
-> f StateMachineListItem
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 StateMachineListItem where
parseJSON :: Value -> Parser StateMachineListItem
parseJSON =
String
-> (Object -> Parser StateMachineListItem)
-> Value
-> Parser StateMachineListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StateMachineListItem"
( \Object
x ->
Text -> Text -> StateMachineType -> POSIX -> StateMachineListItem
StateMachineListItem'
(Text -> Text -> StateMachineType -> POSIX -> StateMachineListItem)
-> Parser Text
-> Parser
(Text -> StateMachineType -> POSIX -> StateMachineListItem)
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
"stateMachineArn")
Parser (Text -> StateMachineType -> POSIX -> StateMachineListItem)
-> Parser Text
-> Parser (StateMachineType -> POSIX -> StateMachineListItem)
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 (StateMachineType -> POSIX -> StateMachineListItem)
-> Parser StateMachineType
-> Parser (POSIX -> StateMachineListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser StateMachineType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"type")
Parser (POSIX -> StateMachineListItem)
-> Parser POSIX -> Parser StateMachineListItem
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 StateMachineListItem
instance Prelude.NFData StateMachineListItem