{-# 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.TaskSucceededEventDetails 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 TaskSucceededEventDetails = TaskSucceededEventDetails'
{
TaskSucceededEventDetails -> Maybe (Sensitive Text)
output :: Prelude.Maybe (Core.Sensitive Prelude.Text),
TaskSucceededEventDetails -> Maybe HistoryEventExecutionDataDetails
outputDetails :: Prelude.Maybe HistoryEventExecutionDataDetails,
TaskSucceededEventDetails -> Text
resourceType :: Prelude.Text,
TaskSucceededEventDetails -> Text
resource :: Prelude.Text
}
deriving (TaskSucceededEventDetails -> TaskSucceededEventDetails -> Bool
(TaskSucceededEventDetails -> TaskSucceededEventDetails -> Bool)
-> (TaskSucceededEventDetails -> TaskSucceededEventDetails -> Bool)
-> Eq TaskSucceededEventDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TaskSucceededEventDetails -> TaskSucceededEventDetails -> Bool
$c/= :: TaskSucceededEventDetails -> TaskSucceededEventDetails -> Bool
== :: TaskSucceededEventDetails -> TaskSucceededEventDetails -> Bool
$c== :: TaskSucceededEventDetails -> TaskSucceededEventDetails -> Bool
Prelude.Eq, Int -> TaskSucceededEventDetails -> ShowS
[TaskSucceededEventDetails] -> ShowS
TaskSucceededEventDetails -> String
(Int -> TaskSucceededEventDetails -> ShowS)
-> (TaskSucceededEventDetails -> String)
-> ([TaskSucceededEventDetails] -> ShowS)
-> Show TaskSucceededEventDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TaskSucceededEventDetails] -> ShowS
$cshowList :: [TaskSucceededEventDetails] -> ShowS
show :: TaskSucceededEventDetails -> String
$cshow :: TaskSucceededEventDetails -> String
showsPrec :: Int -> TaskSucceededEventDetails -> ShowS
$cshowsPrec :: Int -> TaskSucceededEventDetails -> ShowS
Prelude.Show, (forall x.
TaskSucceededEventDetails -> Rep TaskSucceededEventDetails x)
-> (forall x.
Rep TaskSucceededEventDetails x -> TaskSucceededEventDetails)
-> Generic TaskSucceededEventDetails
forall x.
Rep TaskSucceededEventDetails x -> TaskSucceededEventDetails
forall x.
TaskSucceededEventDetails -> Rep TaskSucceededEventDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TaskSucceededEventDetails x -> TaskSucceededEventDetails
$cfrom :: forall x.
TaskSucceededEventDetails -> Rep TaskSucceededEventDetails x
Prelude.Generic)
newTaskSucceededEventDetails ::
Prelude.Text ->
Prelude.Text ->
TaskSucceededEventDetails
newTaskSucceededEventDetails :: Text -> Text -> TaskSucceededEventDetails
newTaskSucceededEventDetails
Text
pResourceType_
Text
pResource_ =
TaskSucceededEventDetails' :: Maybe (Sensitive Text)
-> Maybe HistoryEventExecutionDataDetails
-> Text
-> Text
-> TaskSucceededEventDetails
TaskSucceededEventDetails'
{ $sel:output:TaskSucceededEventDetails' :: Maybe (Sensitive Text)
output =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:outputDetails:TaskSucceededEventDetails' :: Maybe HistoryEventExecutionDataDetails
outputDetails = Maybe HistoryEventExecutionDataDetails
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:TaskSucceededEventDetails' :: Text
resourceType = Text
pResourceType_,
$sel:resource:TaskSucceededEventDetails' :: Text
resource = Text
pResource_
}
taskSucceededEventDetails_output :: Lens.Lens' TaskSucceededEventDetails (Prelude.Maybe Prelude.Text)
taskSucceededEventDetails_output :: (Maybe Text -> f (Maybe Text))
-> TaskSucceededEventDetails -> f TaskSucceededEventDetails
taskSucceededEventDetails_output = (TaskSucceededEventDetails -> Maybe (Sensitive Text))
-> (TaskSucceededEventDetails
-> Maybe (Sensitive Text) -> TaskSucceededEventDetails)
-> Lens
TaskSucceededEventDetails
TaskSucceededEventDetails
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSucceededEventDetails' {Maybe (Sensitive Text)
output :: Maybe (Sensitive Text)
$sel:output:TaskSucceededEventDetails' :: TaskSucceededEventDetails -> Maybe (Sensitive Text)
output} -> Maybe (Sensitive Text)
output) (\s :: TaskSucceededEventDetails
s@TaskSucceededEventDetails' {} Maybe (Sensitive Text)
a -> TaskSucceededEventDetails
s {$sel:output:TaskSucceededEventDetails' :: Maybe (Sensitive Text)
output = Maybe (Sensitive Text)
a} :: TaskSucceededEventDetails) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> TaskSucceededEventDetails -> f TaskSucceededEventDetails)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> TaskSucceededEventDetails
-> f TaskSucceededEventDetails
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
taskSucceededEventDetails_outputDetails :: Lens.Lens' TaskSucceededEventDetails (Prelude.Maybe HistoryEventExecutionDataDetails)
taskSucceededEventDetails_outputDetails :: (Maybe HistoryEventExecutionDataDetails
-> f (Maybe HistoryEventExecutionDataDetails))
-> TaskSucceededEventDetails -> f TaskSucceededEventDetails
taskSucceededEventDetails_outputDetails = (TaskSucceededEventDetails
-> Maybe HistoryEventExecutionDataDetails)
-> (TaskSucceededEventDetails
-> Maybe HistoryEventExecutionDataDetails
-> TaskSucceededEventDetails)
-> Lens
TaskSucceededEventDetails
TaskSucceededEventDetails
(Maybe HistoryEventExecutionDataDetails)
(Maybe HistoryEventExecutionDataDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSucceededEventDetails' {Maybe HistoryEventExecutionDataDetails
outputDetails :: Maybe HistoryEventExecutionDataDetails
$sel:outputDetails:TaskSucceededEventDetails' :: TaskSucceededEventDetails -> Maybe HistoryEventExecutionDataDetails
outputDetails} -> Maybe HistoryEventExecutionDataDetails
outputDetails) (\s :: TaskSucceededEventDetails
s@TaskSucceededEventDetails' {} Maybe HistoryEventExecutionDataDetails
a -> TaskSucceededEventDetails
s {$sel:outputDetails:TaskSucceededEventDetails' :: Maybe HistoryEventExecutionDataDetails
outputDetails = Maybe HistoryEventExecutionDataDetails
a} :: TaskSucceededEventDetails)
taskSucceededEventDetails_resourceType :: Lens.Lens' TaskSucceededEventDetails Prelude.Text
taskSucceededEventDetails_resourceType :: (Text -> f Text)
-> TaskSucceededEventDetails -> f TaskSucceededEventDetails
taskSucceededEventDetails_resourceType = (TaskSucceededEventDetails -> Text)
-> (TaskSucceededEventDetails -> Text -> TaskSucceededEventDetails)
-> Lens
TaskSucceededEventDetails TaskSucceededEventDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSucceededEventDetails' {Text
resourceType :: Text
$sel:resourceType:TaskSucceededEventDetails' :: TaskSucceededEventDetails -> Text
resourceType} -> Text
resourceType) (\s :: TaskSucceededEventDetails
s@TaskSucceededEventDetails' {} Text
a -> TaskSucceededEventDetails
s {$sel:resourceType:TaskSucceededEventDetails' :: Text
resourceType = Text
a} :: TaskSucceededEventDetails)
taskSucceededEventDetails_resource :: Lens.Lens' TaskSucceededEventDetails Prelude.Text
taskSucceededEventDetails_resource :: (Text -> f Text)
-> TaskSucceededEventDetails -> f TaskSucceededEventDetails
taskSucceededEventDetails_resource = (TaskSucceededEventDetails -> Text)
-> (TaskSucceededEventDetails -> Text -> TaskSucceededEventDetails)
-> Lens
TaskSucceededEventDetails TaskSucceededEventDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskSucceededEventDetails' {Text
resource :: Text
$sel:resource:TaskSucceededEventDetails' :: TaskSucceededEventDetails -> Text
resource} -> Text
resource) (\s :: TaskSucceededEventDetails
s@TaskSucceededEventDetails' {} Text
a -> TaskSucceededEventDetails
s {$sel:resource:TaskSucceededEventDetails' :: Text
resource = Text
a} :: TaskSucceededEventDetails)
instance Core.FromJSON TaskSucceededEventDetails where
parseJSON :: Value -> Parser TaskSucceededEventDetails
parseJSON =
String
-> (Object -> Parser TaskSucceededEventDetails)
-> Value
-> Parser TaskSucceededEventDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TaskSucceededEventDetails"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe HistoryEventExecutionDataDetails
-> Text
-> Text
-> TaskSucceededEventDetails
TaskSucceededEventDetails'
(Maybe (Sensitive Text)
-> Maybe HistoryEventExecutionDataDetails
-> Text
-> Text
-> TaskSucceededEventDetails)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe HistoryEventExecutionDataDetails
-> Text -> Text -> TaskSucceededEventDetails)
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 -> Text -> TaskSucceededEventDetails)
-> Parser (Maybe HistoryEventExecutionDataDetails)
-> Parser (Text -> Text -> TaskSucceededEventDetails)
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 -> Text -> TaskSucceededEventDetails)
-> Parser Text -> Parser (Text -> TaskSucceededEventDetails)
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
"resourceType")
Parser (Text -> TaskSucceededEventDetails)
-> Parser Text -> Parser TaskSucceededEventDetails
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
"resource")
)
instance Prelude.Hashable TaskSucceededEventDetails
instance Prelude.NFData TaskSucceededEventDetails