{-# 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.WorkflowExecutionTerminatedEventAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.ChildPolicy
import Amazonka.SWF.Types.WorkflowExecutionTerminatedCause
data WorkflowExecutionTerminatedEventAttributes = WorkflowExecutionTerminatedEventAttributes'
{
WorkflowExecutionTerminatedEventAttributes
-> Maybe WorkflowExecutionTerminatedCause
cause :: Prelude.Maybe WorkflowExecutionTerminatedCause,
WorkflowExecutionTerminatedEventAttributes -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
WorkflowExecutionTerminatedEventAttributes -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
WorkflowExecutionTerminatedEventAttributes -> ChildPolicy
childPolicy :: ChildPolicy
}
deriving (WorkflowExecutionTerminatedEventAttributes
-> WorkflowExecutionTerminatedEventAttributes -> Bool
(WorkflowExecutionTerminatedEventAttributes
-> WorkflowExecutionTerminatedEventAttributes -> Bool)
-> (WorkflowExecutionTerminatedEventAttributes
-> WorkflowExecutionTerminatedEventAttributes -> Bool)
-> Eq WorkflowExecutionTerminatedEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionTerminatedEventAttributes
-> WorkflowExecutionTerminatedEventAttributes -> Bool
$c/= :: WorkflowExecutionTerminatedEventAttributes
-> WorkflowExecutionTerminatedEventAttributes -> Bool
== :: WorkflowExecutionTerminatedEventAttributes
-> WorkflowExecutionTerminatedEventAttributes -> Bool
$c== :: WorkflowExecutionTerminatedEventAttributes
-> WorkflowExecutionTerminatedEventAttributes -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionTerminatedEventAttributes]
ReadPrec WorkflowExecutionTerminatedEventAttributes
Int -> ReadS WorkflowExecutionTerminatedEventAttributes
ReadS [WorkflowExecutionTerminatedEventAttributes]
(Int -> ReadS WorkflowExecutionTerminatedEventAttributes)
-> ReadS [WorkflowExecutionTerminatedEventAttributes]
-> ReadPrec WorkflowExecutionTerminatedEventAttributes
-> ReadPrec [WorkflowExecutionTerminatedEventAttributes]
-> Read WorkflowExecutionTerminatedEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionTerminatedEventAttributes]
$creadListPrec :: ReadPrec [WorkflowExecutionTerminatedEventAttributes]
readPrec :: ReadPrec WorkflowExecutionTerminatedEventAttributes
$creadPrec :: ReadPrec WorkflowExecutionTerminatedEventAttributes
readList :: ReadS [WorkflowExecutionTerminatedEventAttributes]
$creadList :: ReadS [WorkflowExecutionTerminatedEventAttributes]
readsPrec :: Int -> ReadS WorkflowExecutionTerminatedEventAttributes
$creadsPrec :: Int -> ReadS WorkflowExecutionTerminatedEventAttributes
Prelude.Read, Int -> WorkflowExecutionTerminatedEventAttributes -> ShowS
[WorkflowExecutionTerminatedEventAttributes] -> ShowS
WorkflowExecutionTerminatedEventAttributes -> String
(Int -> WorkflowExecutionTerminatedEventAttributes -> ShowS)
-> (WorkflowExecutionTerminatedEventAttributes -> String)
-> ([WorkflowExecutionTerminatedEventAttributes] -> ShowS)
-> Show WorkflowExecutionTerminatedEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionTerminatedEventAttributes] -> ShowS
$cshowList :: [WorkflowExecutionTerminatedEventAttributes] -> ShowS
show :: WorkflowExecutionTerminatedEventAttributes -> String
$cshow :: WorkflowExecutionTerminatedEventAttributes -> String
showsPrec :: Int -> WorkflowExecutionTerminatedEventAttributes -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionTerminatedEventAttributes -> ShowS
Prelude.Show, (forall x.
WorkflowExecutionTerminatedEventAttributes
-> Rep WorkflowExecutionTerminatedEventAttributes x)
-> (forall x.
Rep WorkflowExecutionTerminatedEventAttributes x
-> WorkflowExecutionTerminatedEventAttributes)
-> Generic WorkflowExecutionTerminatedEventAttributes
forall x.
Rep WorkflowExecutionTerminatedEventAttributes x
-> WorkflowExecutionTerminatedEventAttributes
forall x.
WorkflowExecutionTerminatedEventAttributes
-> Rep WorkflowExecutionTerminatedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkflowExecutionTerminatedEventAttributes x
-> WorkflowExecutionTerminatedEventAttributes
$cfrom :: forall x.
WorkflowExecutionTerminatedEventAttributes
-> Rep WorkflowExecutionTerminatedEventAttributes x
Prelude.Generic)
newWorkflowExecutionTerminatedEventAttributes ::
ChildPolicy ->
WorkflowExecutionTerminatedEventAttributes
newWorkflowExecutionTerminatedEventAttributes :: ChildPolicy -> WorkflowExecutionTerminatedEventAttributes
newWorkflowExecutionTerminatedEventAttributes
ChildPolicy
pChildPolicy_ =
WorkflowExecutionTerminatedEventAttributes' :: Maybe WorkflowExecutionTerminatedCause
-> Maybe Text
-> Maybe Text
-> ChildPolicy
-> WorkflowExecutionTerminatedEventAttributes
WorkflowExecutionTerminatedEventAttributes'
{ $sel:cause:WorkflowExecutionTerminatedEventAttributes' :: Maybe WorkflowExecutionTerminatedCause
cause =
Maybe WorkflowExecutionTerminatedCause
forall a. Maybe a
Prelude.Nothing,
$sel:reason:WorkflowExecutionTerminatedEventAttributes' :: Maybe Text
reason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:details:WorkflowExecutionTerminatedEventAttributes' :: Maybe Text
details = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:childPolicy:WorkflowExecutionTerminatedEventAttributes' :: ChildPolicy
childPolicy = ChildPolicy
pChildPolicy_
}
workflowExecutionTerminatedEventAttributes_cause :: Lens.Lens' WorkflowExecutionTerminatedEventAttributes (Prelude.Maybe WorkflowExecutionTerminatedCause)
workflowExecutionTerminatedEventAttributes_cause :: (Maybe WorkflowExecutionTerminatedCause
-> f (Maybe WorkflowExecutionTerminatedCause))
-> WorkflowExecutionTerminatedEventAttributes
-> f WorkflowExecutionTerminatedEventAttributes
workflowExecutionTerminatedEventAttributes_cause = (WorkflowExecutionTerminatedEventAttributes
-> Maybe WorkflowExecutionTerminatedCause)
-> (WorkflowExecutionTerminatedEventAttributes
-> Maybe WorkflowExecutionTerminatedCause
-> WorkflowExecutionTerminatedEventAttributes)
-> Lens
WorkflowExecutionTerminatedEventAttributes
WorkflowExecutionTerminatedEventAttributes
(Maybe WorkflowExecutionTerminatedCause)
(Maybe WorkflowExecutionTerminatedCause)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionTerminatedEventAttributes' {Maybe WorkflowExecutionTerminatedCause
cause :: Maybe WorkflowExecutionTerminatedCause
$sel:cause:WorkflowExecutionTerminatedEventAttributes' :: WorkflowExecutionTerminatedEventAttributes
-> Maybe WorkflowExecutionTerminatedCause
cause} -> Maybe WorkflowExecutionTerminatedCause
cause) (\s :: WorkflowExecutionTerminatedEventAttributes
s@WorkflowExecutionTerminatedEventAttributes' {} Maybe WorkflowExecutionTerminatedCause
a -> WorkflowExecutionTerminatedEventAttributes
s {$sel:cause:WorkflowExecutionTerminatedEventAttributes' :: Maybe WorkflowExecutionTerminatedCause
cause = Maybe WorkflowExecutionTerminatedCause
a} :: WorkflowExecutionTerminatedEventAttributes)
workflowExecutionTerminatedEventAttributes_reason :: Lens.Lens' WorkflowExecutionTerminatedEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionTerminatedEventAttributes_reason :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionTerminatedEventAttributes
-> f WorkflowExecutionTerminatedEventAttributes
workflowExecutionTerminatedEventAttributes_reason = (WorkflowExecutionTerminatedEventAttributes -> Maybe Text)
-> (WorkflowExecutionTerminatedEventAttributes
-> Maybe Text -> WorkflowExecutionTerminatedEventAttributes)
-> Lens
WorkflowExecutionTerminatedEventAttributes
WorkflowExecutionTerminatedEventAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionTerminatedEventAttributes' {Maybe Text
reason :: Maybe Text
$sel:reason:WorkflowExecutionTerminatedEventAttributes' :: WorkflowExecutionTerminatedEventAttributes -> Maybe Text
reason} -> Maybe Text
reason) (\s :: WorkflowExecutionTerminatedEventAttributes
s@WorkflowExecutionTerminatedEventAttributes' {} Maybe Text
a -> WorkflowExecutionTerminatedEventAttributes
s {$sel:reason:WorkflowExecutionTerminatedEventAttributes' :: Maybe Text
reason = Maybe Text
a} :: WorkflowExecutionTerminatedEventAttributes)
workflowExecutionTerminatedEventAttributes_details :: Lens.Lens' WorkflowExecutionTerminatedEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionTerminatedEventAttributes_details :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionTerminatedEventAttributes
-> f WorkflowExecutionTerminatedEventAttributes
workflowExecutionTerminatedEventAttributes_details = (WorkflowExecutionTerminatedEventAttributes -> Maybe Text)
-> (WorkflowExecutionTerminatedEventAttributes
-> Maybe Text -> WorkflowExecutionTerminatedEventAttributes)
-> Lens
WorkflowExecutionTerminatedEventAttributes
WorkflowExecutionTerminatedEventAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionTerminatedEventAttributes' {Maybe Text
details :: Maybe Text
$sel:details:WorkflowExecutionTerminatedEventAttributes' :: WorkflowExecutionTerminatedEventAttributes -> Maybe Text
details} -> Maybe Text
details) (\s :: WorkflowExecutionTerminatedEventAttributes
s@WorkflowExecutionTerminatedEventAttributes' {} Maybe Text
a -> WorkflowExecutionTerminatedEventAttributes
s {$sel:details:WorkflowExecutionTerminatedEventAttributes' :: Maybe Text
details = Maybe Text
a} :: WorkflowExecutionTerminatedEventAttributes)
workflowExecutionTerminatedEventAttributes_childPolicy :: Lens.Lens' WorkflowExecutionTerminatedEventAttributes ChildPolicy
workflowExecutionTerminatedEventAttributes_childPolicy :: (ChildPolicy -> f ChildPolicy)
-> WorkflowExecutionTerminatedEventAttributes
-> f WorkflowExecutionTerminatedEventAttributes
workflowExecutionTerminatedEventAttributes_childPolicy = (WorkflowExecutionTerminatedEventAttributes -> ChildPolicy)
-> (WorkflowExecutionTerminatedEventAttributes
-> ChildPolicy -> WorkflowExecutionTerminatedEventAttributes)
-> Lens
WorkflowExecutionTerminatedEventAttributes
WorkflowExecutionTerminatedEventAttributes
ChildPolicy
ChildPolicy
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionTerminatedEventAttributes' {ChildPolicy
childPolicy :: ChildPolicy
$sel:childPolicy:WorkflowExecutionTerminatedEventAttributes' :: WorkflowExecutionTerminatedEventAttributes -> ChildPolicy
childPolicy} -> ChildPolicy
childPolicy) (\s :: WorkflowExecutionTerminatedEventAttributes
s@WorkflowExecutionTerminatedEventAttributes' {} ChildPolicy
a -> WorkflowExecutionTerminatedEventAttributes
s {$sel:childPolicy:WorkflowExecutionTerminatedEventAttributes' :: ChildPolicy
childPolicy = ChildPolicy
a} :: WorkflowExecutionTerminatedEventAttributes)
instance
Core.FromJSON
WorkflowExecutionTerminatedEventAttributes
where
parseJSON :: Value -> Parser WorkflowExecutionTerminatedEventAttributes
parseJSON =
String
-> (Object -> Parser WorkflowExecutionTerminatedEventAttributes)
-> Value
-> Parser WorkflowExecutionTerminatedEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkflowExecutionTerminatedEventAttributes"
( \Object
x ->
Maybe WorkflowExecutionTerminatedCause
-> Maybe Text
-> Maybe Text
-> ChildPolicy
-> WorkflowExecutionTerminatedEventAttributes
WorkflowExecutionTerminatedEventAttributes'
(Maybe WorkflowExecutionTerminatedCause
-> Maybe Text
-> Maybe Text
-> ChildPolicy
-> WorkflowExecutionTerminatedEventAttributes)
-> Parser (Maybe WorkflowExecutionTerminatedCause)
-> Parser
(Maybe Text
-> Maybe Text
-> ChildPolicy
-> WorkflowExecutionTerminatedEventAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe WorkflowExecutionTerminatedCause)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cause")
Parser
(Maybe Text
-> Maybe Text
-> ChildPolicy
-> WorkflowExecutionTerminatedEventAttributes)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> ChildPolicy -> WorkflowExecutionTerminatedEventAttributes)
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
"reason")
Parser
(Maybe Text
-> ChildPolicy -> WorkflowExecutionTerminatedEventAttributes)
-> Parser (Maybe Text)
-> Parser
(ChildPolicy -> WorkflowExecutionTerminatedEventAttributes)
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 (ChildPolicy -> WorkflowExecutionTerminatedEventAttributes)
-> Parser ChildPolicy
-> Parser WorkflowExecutionTerminatedEventAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ChildPolicy
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"childPolicy")
)
instance
Prelude.Hashable
WorkflowExecutionTerminatedEventAttributes
instance
Prelude.NFData
WorkflowExecutionTerminatedEventAttributes