{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 :: Data.POSIX
}
deriving (StateMachineListItem -> StateMachineListItem -> Bool
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]
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
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. 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'
{ $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 = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDate_
}
stateMachineListItem_stateMachineArn :: Lens.Lens' StateMachineListItem Prelude.Text
stateMachineListItem_stateMachineArn :: Lens' StateMachineListItem Text
stateMachineListItem_stateMachineArn = 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 :: Lens' StateMachineListItem Text
stateMachineListItem_name = 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 :: Lens' StateMachineListItem StateMachineType
stateMachineListItem_type = 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 :: Lens' StateMachineListItem UTCTime
stateMachineListItem_creationDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON StateMachineListItem where
parseJSON :: Value -> Parser StateMachineListItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"StateMachineListItem"
( \Object
x ->
Text -> Text -> StateMachineType -> POSIX -> StateMachineListItem
StateMachineListItem'
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
"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
"type")
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 StateMachineListItem where
hashWithSalt :: Int -> StateMachineListItem -> Int
hashWithSalt Int
_salt StateMachineListItem' {Text
POSIX
StateMachineType
creationDate :: POSIX
type' :: StateMachineType
name :: Text
stateMachineArn :: Text
$sel:creationDate:StateMachineListItem' :: StateMachineListItem -> POSIX
$sel:type':StateMachineListItem' :: StateMachineListItem -> StateMachineType
$sel:name:StateMachineListItem' :: StateMachineListItem -> Text
$sel:stateMachineArn:StateMachineListItem' :: StateMachineListItem -> Text
..} =
Int
_salt
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` StateMachineType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationDate
instance Prelude.NFData StateMachineListItem where
rnf :: StateMachineListItem -> ()
rnf StateMachineListItem' {Text
POSIX
StateMachineType
creationDate :: POSIX
type' :: StateMachineType
name :: Text
stateMachineArn :: Text
$sel:creationDate:StateMachineListItem' :: StateMachineListItem -> POSIX
$sel:type':StateMachineListItem' :: StateMachineListItem -> StateMachineType
$sel:name:StateMachineListItem' :: StateMachineListItem -> Text
$sel:stateMachineArn:StateMachineListItem' :: StateMachineListItem -> Text
..} =
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 StateMachineType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationDate