{-# 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.SWF.Types.ChildWorkflowExecutionFailedEventAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.WorkflowExecution
import Amazonka.SWF.Types.WorkflowType
data ChildWorkflowExecutionFailedEventAttributes = ChildWorkflowExecutionFailedEventAttributes'
{
ChildWorkflowExecutionFailedEventAttributes -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
ChildWorkflowExecutionFailedEventAttributes -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
ChildWorkflowExecutionFailedEventAttributes -> WorkflowExecution
workflowExecution :: WorkflowExecution,
ChildWorkflowExecutionFailedEventAttributes -> WorkflowType
workflowType :: WorkflowType,
ChildWorkflowExecutionFailedEventAttributes -> Integer
initiatedEventId :: Prelude.Integer,
ChildWorkflowExecutionFailedEventAttributes -> Integer
startedEventId :: Prelude.Integer
}
deriving (ChildWorkflowExecutionFailedEventAttributes
-> ChildWorkflowExecutionFailedEventAttributes -> Bool
(ChildWorkflowExecutionFailedEventAttributes
-> ChildWorkflowExecutionFailedEventAttributes -> Bool)
-> (ChildWorkflowExecutionFailedEventAttributes
-> ChildWorkflowExecutionFailedEventAttributes -> Bool)
-> Eq ChildWorkflowExecutionFailedEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChildWorkflowExecutionFailedEventAttributes
-> ChildWorkflowExecutionFailedEventAttributes -> Bool
$c/= :: ChildWorkflowExecutionFailedEventAttributes
-> ChildWorkflowExecutionFailedEventAttributes -> Bool
== :: ChildWorkflowExecutionFailedEventAttributes
-> ChildWorkflowExecutionFailedEventAttributes -> Bool
$c== :: ChildWorkflowExecutionFailedEventAttributes
-> ChildWorkflowExecutionFailedEventAttributes -> Bool
Prelude.Eq, ReadPrec [ChildWorkflowExecutionFailedEventAttributes]
ReadPrec ChildWorkflowExecutionFailedEventAttributes
Int -> ReadS ChildWorkflowExecutionFailedEventAttributes
ReadS [ChildWorkflowExecutionFailedEventAttributes]
(Int -> ReadS ChildWorkflowExecutionFailedEventAttributes)
-> ReadS [ChildWorkflowExecutionFailedEventAttributes]
-> ReadPrec ChildWorkflowExecutionFailedEventAttributes
-> ReadPrec [ChildWorkflowExecutionFailedEventAttributes]
-> Read ChildWorkflowExecutionFailedEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChildWorkflowExecutionFailedEventAttributes]
$creadListPrec :: ReadPrec [ChildWorkflowExecutionFailedEventAttributes]
readPrec :: ReadPrec ChildWorkflowExecutionFailedEventAttributes
$creadPrec :: ReadPrec ChildWorkflowExecutionFailedEventAttributes
readList :: ReadS [ChildWorkflowExecutionFailedEventAttributes]
$creadList :: ReadS [ChildWorkflowExecutionFailedEventAttributes]
readsPrec :: Int -> ReadS ChildWorkflowExecutionFailedEventAttributes
$creadsPrec :: Int -> ReadS ChildWorkflowExecutionFailedEventAttributes
Prelude.Read, Int -> ChildWorkflowExecutionFailedEventAttributes -> ShowS
[ChildWorkflowExecutionFailedEventAttributes] -> ShowS
ChildWorkflowExecutionFailedEventAttributes -> String
(Int -> ChildWorkflowExecutionFailedEventAttributes -> ShowS)
-> (ChildWorkflowExecutionFailedEventAttributes -> String)
-> ([ChildWorkflowExecutionFailedEventAttributes] -> ShowS)
-> Show ChildWorkflowExecutionFailedEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChildWorkflowExecutionFailedEventAttributes] -> ShowS
$cshowList :: [ChildWorkflowExecutionFailedEventAttributes] -> ShowS
show :: ChildWorkflowExecutionFailedEventAttributes -> String
$cshow :: ChildWorkflowExecutionFailedEventAttributes -> String
showsPrec :: Int -> ChildWorkflowExecutionFailedEventAttributes -> ShowS
$cshowsPrec :: Int -> ChildWorkflowExecutionFailedEventAttributes -> ShowS
Prelude.Show, (forall x.
ChildWorkflowExecutionFailedEventAttributes
-> Rep ChildWorkflowExecutionFailedEventAttributes x)
-> (forall x.
Rep ChildWorkflowExecutionFailedEventAttributes x
-> ChildWorkflowExecutionFailedEventAttributes)
-> Generic ChildWorkflowExecutionFailedEventAttributes
forall x.
Rep ChildWorkflowExecutionFailedEventAttributes x
-> ChildWorkflowExecutionFailedEventAttributes
forall x.
ChildWorkflowExecutionFailedEventAttributes
-> Rep ChildWorkflowExecutionFailedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ChildWorkflowExecutionFailedEventAttributes x
-> ChildWorkflowExecutionFailedEventAttributes
$cfrom :: forall x.
ChildWorkflowExecutionFailedEventAttributes
-> Rep ChildWorkflowExecutionFailedEventAttributes x
Prelude.Generic)
newChildWorkflowExecutionFailedEventAttributes ::
WorkflowExecution ->
WorkflowType ->
Prelude.Integer ->
Prelude.Integer ->
ChildWorkflowExecutionFailedEventAttributes
newChildWorkflowExecutionFailedEventAttributes :: WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes
newChildWorkflowExecutionFailedEventAttributes
WorkflowExecution
pWorkflowExecution_
WorkflowType
pWorkflowType_
Integer
pInitiatedEventId_
Integer
pStartedEventId_ =
ChildWorkflowExecutionFailedEventAttributes' :: Maybe Text
-> Maybe Text
-> WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes
ChildWorkflowExecutionFailedEventAttributes'
{ $sel:reason:ChildWorkflowExecutionFailedEventAttributes' :: Maybe Text
reason =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:details:ChildWorkflowExecutionFailedEventAttributes' :: Maybe Text
details = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:workflowExecution:ChildWorkflowExecutionFailedEventAttributes' :: WorkflowExecution
workflowExecution =
WorkflowExecution
pWorkflowExecution_,
$sel:workflowType:ChildWorkflowExecutionFailedEventAttributes' :: WorkflowType
workflowType = WorkflowType
pWorkflowType_,
$sel:initiatedEventId:ChildWorkflowExecutionFailedEventAttributes' :: Integer
initiatedEventId =
Integer
pInitiatedEventId_,
$sel:startedEventId:ChildWorkflowExecutionFailedEventAttributes' :: Integer
startedEventId =
Integer
pStartedEventId_
}
childWorkflowExecutionFailedEventAttributes_reason :: Lens.Lens' ChildWorkflowExecutionFailedEventAttributes (Prelude.Maybe Prelude.Text)
childWorkflowExecutionFailedEventAttributes_reason :: (Maybe Text -> f (Maybe Text))
-> ChildWorkflowExecutionFailedEventAttributes
-> f ChildWorkflowExecutionFailedEventAttributes
childWorkflowExecutionFailedEventAttributes_reason = (ChildWorkflowExecutionFailedEventAttributes -> Maybe Text)
-> (ChildWorkflowExecutionFailedEventAttributes
-> Maybe Text -> ChildWorkflowExecutionFailedEventAttributes)
-> Lens
ChildWorkflowExecutionFailedEventAttributes
ChildWorkflowExecutionFailedEventAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionFailedEventAttributes' {Maybe Text
reason :: Maybe Text
$sel:reason:ChildWorkflowExecutionFailedEventAttributes' :: ChildWorkflowExecutionFailedEventAttributes -> Maybe Text
reason} -> Maybe Text
reason) (\s :: ChildWorkflowExecutionFailedEventAttributes
s@ChildWorkflowExecutionFailedEventAttributes' {} Maybe Text
a -> ChildWorkflowExecutionFailedEventAttributes
s {$sel:reason:ChildWorkflowExecutionFailedEventAttributes' :: Maybe Text
reason = Maybe Text
a} :: ChildWorkflowExecutionFailedEventAttributes)
childWorkflowExecutionFailedEventAttributes_details :: Lens.Lens' ChildWorkflowExecutionFailedEventAttributes (Prelude.Maybe Prelude.Text)
childWorkflowExecutionFailedEventAttributes_details :: (Maybe Text -> f (Maybe Text))
-> ChildWorkflowExecutionFailedEventAttributes
-> f ChildWorkflowExecutionFailedEventAttributes
childWorkflowExecutionFailedEventAttributes_details = (ChildWorkflowExecutionFailedEventAttributes -> Maybe Text)
-> (ChildWorkflowExecutionFailedEventAttributes
-> Maybe Text -> ChildWorkflowExecutionFailedEventAttributes)
-> Lens
ChildWorkflowExecutionFailedEventAttributes
ChildWorkflowExecutionFailedEventAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionFailedEventAttributes' {Maybe Text
details :: Maybe Text
$sel:details:ChildWorkflowExecutionFailedEventAttributes' :: ChildWorkflowExecutionFailedEventAttributes -> Maybe Text
details} -> Maybe Text
details) (\s :: ChildWorkflowExecutionFailedEventAttributes
s@ChildWorkflowExecutionFailedEventAttributes' {} Maybe Text
a -> ChildWorkflowExecutionFailedEventAttributes
s {$sel:details:ChildWorkflowExecutionFailedEventAttributes' :: Maybe Text
details = Maybe Text
a} :: ChildWorkflowExecutionFailedEventAttributes)
childWorkflowExecutionFailedEventAttributes_workflowExecution :: Lens.Lens' ChildWorkflowExecutionFailedEventAttributes WorkflowExecution
childWorkflowExecutionFailedEventAttributes_workflowExecution :: (WorkflowExecution -> f WorkflowExecution)
-> ChildWorkflowExecutionFailedEventAttributes
-> f ChildWorkflowExecutionFailedEventAttributes
childWorkflowExecutionFailedEventAttributes_workflowExecution = (ChildWorkflowExecutionFailedEventAttributes -> WorkflowExecution)
-> (ChildWorkflowExecutionFailedEventAttributes
-> WorkflowExecution
-> ChildWorkflowExecutionFailedEventAttributes)
-> Lens
ChildWorkflowExecutionFailedEventAttributes
ChildWorkflowExecutionFailedEventAttributes
WorkflowExecution
WorkflowExecution
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionFailedEventAttributes' {WorkflowExecution
workflowExecution :: WorkflowExecution
$sel:workflowExecution:ChildWorkflowExecutionFailedEventAttributes' :: ChildWorkflowExecutionFailedEventAttributes -> WorkflowExecution
workflowExecution} -> WorkflowExecution
workflowExecution) (\s :: ChildWorkflowExecutionFailedEventAttributes
s@ChildWorkflowExecutionFailedEventAttributes' {} WorkflowExecution
a -> ChildWorkflowExecutionFailedEventAttributes
s {$sel:workflowExecution:ChildWorkflowExecutionFailedEventAttributes' :: WorkflowExecution
workflowExecution = WorkflowExecution
a} :: ChildWorkflowExecutionFailedEventAttributes)
childWorkflowExecutionFailedEventAttributes_workflowType :: Lens.Lens' ChildWorkflowExecutionFailedEventAttributes WorkflowType
childWorkflowExecutionFailedEventAttributes_workflowType :: (WorkflowType -> f WorkflowType)
-> ChildWorkflowExecutionFailedEventAttributes
-> f ChildWorkflowExecutionFailedEventAttributes
childWorkflowExecutionFailedEventAttributes_workflowType = (ChildWorkflowExecutionFailedEventAttributes -> WorkflowType)
-> (ChildWorkflowExecutionFailedEventAttributes
-> WorkflowType -> ChildWorkflowExecutionFailedEventAttributes)
-> Lens
ChildWorkflowExecutionFailedEventAttributes
ChildWorkflowExecutionFailedEventAttributes
WorkflowType
WorkflowType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionFailedEventAttributes' {WorkflowType
workflowType :: WorkflowType
$sel:workflowType:ChildWorkflowExecutionFailedEventAttributes' :: ChildWorkflowExecutionFailedEventAttributes -> WorkflowType
workflowType} -> WorkflowType
workflowType) (\s :: ChildWorkflowExecutionFailedEventAttributes
s@ChildWorkflowExecutionFailedEventAttributes' {} WorkflowType
a -> ChildWorkflowExecutionFailedEventAttributes
s {$sel:workflowType:ChildWorkflowExecutionFailedEventAttributes' :: WorkflowType
workflowType = WorkflowType
a} :: ChildWorkflowExecutionFailedEventAttributes)
childWorkflowExecutionFailedEventAttributes_initiatedEventId :: Lens.Lens' ChildWorkflowExecutionFailedEventAttributes Prelude.Integer
childWorkflowExecutionFailedEventAttributes_initiatedEventId :: (Integer -> f Integer)
-> ChildWorkflowExecutionFailedEventAttributes
-> f ChildWorkflowExecutionFailedEventAttributes
childWorkflowExecutionFailedEventAttributes_initiatedEventId = (ChildWorkflowExecutionFailedEventAttributes -> Integer)
-> (ChildWorkflowExecutionFailedEventAttributes
-> Integer -> ChildWorkflowExecutionFailedEventAttributes)
-> Lens
ChildWorkflowExecutionFailedEventAttributes
ChildWorkflowExecutionFailedEventAttributes
Integer
Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionFailedEventAttributes' {Integer
initiatedEventId :: Integer
$sel:initiatedEventId:ChildWorkflowExecutionFailedEventAttributes' :: ChildWorkflowExecutionFailedEventAttributes -> Integer
initiatedEventId} -> Integer
initiatedEventId) (\s :: ChildWorkflowExecutionFailedEventAttributes
s@ChildWorkflowExecutionFailedEventAttributes' {} Integer
a -> ChildWorkflowExecutionFailedEventAttributes
s {$sel:initiatedEventId:ChildWorkflowExecutionFailedEventAttributes' :: Integer
initiatedEventId = Integer
a} :: ChildWorkflowExecutionFailedEventAttributes)
childWorkflowExecutionFailedEventAttributes_startedEventId :: Lens.Lens' ChildWorkflowExecutionFailedEventAttributes Prelude.Integer
childWorkflowExecutionFailedEventAttributes_startedEventId :: (Integer -> f Integer)
-> ChildWorkflowExecutionFailedEventAttributes
-> f ChildWorkflowExecutionFailedEventAttributes
childWorkflowExecutionFailedEventAttributes_startedEventId = (ChildWorkflowExecutionFailedEventAttributes -> Integer)
-> (ChildWorkflowExecutionFailedEventAttributes
-> Integer -> ChildWorkflowExecutionFailedEventAttributes)
-> Lens
ChildWorkflowExecutionFailedEventAttributes
ChildWorkflowExecutionFailedEventAttributes
Integer
Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionFailedEventAttributes' {Integer
startedEventId :: Integer
$sel:startedEventId:ChildWorkflowExecutionFailedEventAttributes' :: ChildWorkflowExecutionFailedEventAttributes -> Integer
startedEventId} -> Integer
startedEventId) (\s :: ChildWorkflowExecutionFailedEventAttributes
s@ChildWorkflowExecutionFailedEventAttributes' {} Integer
a -> ChildWorkflowExecutionFailedEventAttributes
s {$sel:startedEventId:ChildWorkflowExecutionFailedEventAttributes' :: Integer
startedEventId = Integer
a} :: ChildWorkflowExecutionFailedEventAttributes)
instance
Core.FromJSON
ChildWorkflowExecutionFailedEventAttributes
where
parseJSON :: Value -> Parser ChildWorkflowExecutionFailedEventAttributes
parseJSON =
String
-> (Object -> Parser ChildWorkflowExecutionFailedEventAttributes)
-> Value
-> Parser ChildWorkflowExecutionFailedEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ChildWorkflowExecutionFailedEventAttributes"
( \Object
x ->
Maybe Text
-> Maybe Text
-> WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes
ChildWorkflowExecutionFailedEventAttributes'
(Maybe Text
-> Maybe Text
-> WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"reason")
Parser
(Maybe Text
-> WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes)
-> Parser (Maybe Text)
-> Parser
(WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"details")
Parser
(WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes)
-> Parser WorkflowExecution
-> Parser
(WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser WorkflowExecution
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"workflowExecution")
Parser
(WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionFailedEventAttributes)
-> Parser WorkflowType
-> Parser
(Integer -> Integer -> ChildWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser WorkflowType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"workflowType")
Parser
(Integer -> Integer -> ChildWorkflowExecutionFailedEventAttributes)
-> Parser Integer
-> Parser (Integer -> ChildWorkflowExecutionFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"initiatedEventId")
Parser (Integer -> ChildWorkflowExecutionFailedEventAttributes)
-> Parser Integer
-> Parser ChildWorkflowExecutionFailedEventAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"startedEventId")
)
instance
Prelude.Hashable
ChildWorkflowExecutionFailedEventAttributes
instance
Prelude.NFData
ChildWorkflowExecutionFailedEventAttributes