{-# 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.StateExitedEventDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.StepFunctions.Types.HistoryEventExecutionDataDetails
data StateExitedEventDetails = StateExitedEventDetails'
{
StateExitedEventDetails -> Maybe (Sensitive Text)
output :: Prelude.Maybe (Core.Sensitive Prelude.Text),
StateExitedEventDetails -> Maybe HistoryEventExecutionDataDetails
outputDetails :: Prelude.Maybe HistoryEventExecutionDataDetails,
StateExitedEventDetails -> Text
name :: Prelude.Text
}
deriving (StateExitedEventDetails -> StateExitedEventDetails -> Bool
(StateExitedEventDetails -> StateExitedEventDetails -> Bool)
-> (StateExitedEventDetails -> StateExitedEventDetails -> Bool)
-> Eq StateExitedEventDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StateExitedEventDetails -> StateExitedEventDetails -> Bool
$c/= :: StateExitedEventDetails -> StateExitedEventDetails -> Bool
== :: StateExitedEventDetails -> StateExitedEventDetails -> Bool
$c== :: StateExitedEventDetails -> StateExitedEventDetails -> Bool
Prelude.Eq, Int -> StateExitedEventDetails -> ShowS
[StateExitedEventDetails] -> ShowS
StateExitedEventDetails -> String
(Int -> StateExitedEventDetails -> ShowS)
-> (StateExitedEventDetails -> String)
-> ([StateExitedEventDetails] -> ShowS)
-> Show StateExitedEventDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StateExitedEventDetails] -> ShowS
$cshowList :: [StateExitedEventDetails] -> ShowS
show :: StateExitedEventDetails -> String
$cshow :: StateExitedEventDetails -> String
showsPrec :: Int -> StateExitedEventDetails -> ShowS
$cshowsPrec :: Int -> StateExitedEventDetails -> ShowS
Prelude.Show, (forall x.
StateExitedEventDetails -> Rep StateExitedEventDetails x)
-> (forall x.
Rep StateExitedEventDetails x -> StateExitedEventDetails)
-> Generic StateExitedEventDetails
forall x. Rep StateExitedEventDetails x -> StateExitedEventDetails
forall x. StateExitedEventDetails -> Rep StateExitedEventDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StateExitedEventDetails x -> StateExitedEventDetails
$cfrom :: forall x. StateExitedEventDetails -> Rep StateExitedEventDetails x
Prelude.Generic)
newStateExitedEventDetails ::
Prelude.Text ->
StateExitedEventDetails
newStateExitedEventDetails :: Text -> StateExitedEventDetails
newStateExitedEventDetails Text
pName_ =
StateExitedEventDetails' :: Maybe (Sensitive Text)
-> Maybe HistoryEventExecutionDataDetails
-> Text
-> StateExitedEventDetails
StateExitedEventDetails'
{ $sel:output:StateExitedEventDetails' :: Maybe (Sensitive Text)
output = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:outputDetails:StateExitedEventDetails' :: Maybe HistoryEventExecutionDataDetails
outputDetails = Maybe HistoryEventExecutionDataDetails
forall a. Maybe a
Prelude.Nothing,
$sel:name:StateExitedEventDetails' :: Text
name = Text
pName_
}
stateExitedEventDetails_output :: Lens.Lens' StateExitedEventDetails (Prelude.Maybe Prelude.Text)
stateExitedEventDetails_output :: (Maybe Text -> f (Maybe Text))
-> StateExitedEventDetails -> f StateExitedEventDetails
stateExitedEventDetails_output = (StateExitedEventDetails -> Maybe (Sensitive Text))
-> (StateExitedEventDetails
-> Maybe (Sensitive Text) -> StateExitedEventDetails)
-> Lens
StateExitedEventDetails
StateExitedEventDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StateExitedEventDetails' {Maybe (Sensitive Text)
output :: Maybe (Sensitive Text)
$sel:output:StateExitedEventDetails' :: StateExitedEventDetails -> Maybe (Sensitive Text)
output} -> Maybe (Sensitive Text)
output) (\s :: StateExitedEventDetails
s@StateExitedEventDetails' {} Maybe (Sensitive Text)
a -> StateExitedEventDetails
s {$sel:output:StateExitedEventDetails' :: Maybe (Sensitive Text)
output = Maybe (Sensitive Text)
a} :: StateExitedEventDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> StateExitedEventDetails -> f StateExitedEventDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> StateExitedEventDetails
-> f StateExitedEventDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
stateExitedEventDetails_outputDetails :: Lens.Lens' StateExitedEventDetails (Prelude.Maybe HistoryEventExecutionDataDetails)
stateExitedEventDetails_outputDetails :: (Maybe HistoryEventExecutionDataDetails
-> f (Maybe HistoryEventExecutionDataDetails))
-> StateExitedEventDetails -> f StateExitedEventDetails
stateExitedEventDetails_outputDetails = (StateExitedEventDetails -> Maybe HistoryEventExecutionDataDetails)
-> (StateExitedEventDetails
-> Maybe HistoryEventExecutionDataDetails
-> StateExitedEventDetails)
-> Lens
StateExitedEventDetails
StateExitedEventDetails
(Maybe HistoryEventExecutionDataDetails)
(Maybe HistoryEventExecutionDataDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StateExitedEventDetails' {Maybe HistoryEventExecutionDataDetails
outputDetails :: Maybe HistoryEventExecutionDataDetails
$sel:outputDetails:StateExitedEventDetails' :: StateExitedEventDetails -> Maybe HistoryEventExecutionDataDetails
outputDetails} -> Maybe HistoryEventExecutionDataDetails
outputDetails) (\s :: StateExitedEventDetails
s@StateExitedEventDetails' {} Maybe HistoryEventExecutionDataDetails
a -> StateExitedEventDetails
s {$sel:outputDetails:StateExitedEventDetails' :: Maybe HistoryEventExecutionDataDetails
outputDetails = Maybe HistoryEventExecutionDataDetails
a} :: StateExitedEventDetails)
stateExitedEventDetails_name :: Lens.Lens' StateExitedEventDetails Prelude.Text
stateExitedEventDetails_name :: (Text -> f Text)
-> StateExitedEventDetails -> f StateExitedEventDetails
stateExitedEventDetails_name = (StateExitedEventDetails -> Text)
-> (StateExitedEventDetails -> Text -> StateExitedEventDetails)
-> Lens StateExitedEventDetails StateExitedEventDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StateExitedEventDetails' {Text
name :: Text
$sel:name:StateExitedEventDetails' :: StateExitedEventDetails -> Text
name} -> Text
name) (\s :: StateExitedEventDetails
s@StateExitedEventDetails' {} Text
a -> StateExitedEventDetails
s {$sel:name:StateExitedEventDetails' :: Text
name = Text
a} :: StateExitedEventDetails)
instance Core.FromJSON StateExitedEventDetails where
parseJSON :: Value -> Parser StateExitedEventDetails
parseJSON =
String
-> (Object -> Parser StateExitedEventDetails)
-> Value
-> Parser StateExitedEventDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StateExitedEventDetails"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe HistoryEventExecutionDataDetails
-> Text
-> StateExitedEventDetails
StateExitedEventDetails'
(Maybe (Sensitive Text)
-> Maybe HistoryEventExecutionDataDetails
-> Text
-> StateExitedEventDetails)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe HistoryEventExecutionDataDetails
-> Text -> StateExitedEventDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"output")
Parser
(Maybe HistoryEventExecutionDataDetails
-> Text -> StateExitedEventDetails)
-> Parser (Maybe HistoryEventExecutionDataDetails)
-> Parser (Text -> StateExitedEventDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HistoryEventExecutionDataDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputDetails")
Parser (Text -> StateExitedEventDetails)
-> Parser Text -> Parser StateExitedEventDetails
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")
)
instance Prelude.Hashable StateExitedEventDetails
instance Prelude.NFData StateExitedEventDetails