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