{-# 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.WorkflowExecutionCancelRequestedEventAttributes 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.WorkflowExecutionCancelRequestedCause
data WorkflowExecutionCancelRequestedEventAttributes = WorkflowExecutionCancelRequestedEventAttributes'
{
WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecution
externalWorkflowExecution :: Prelude.Maybe WorkflowExecution,
WorkflowExecutionCancelRequestedEventAttributes -> Maybe Integer
externalInitiatedEventId :: Prelude.Maybe Prelude.Integer,
WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecutionCancelRequestedCause
cause :: Prelude.Maybe WorkflowExecutionCancelRequestedCause
}
deriving (WorkflowExecutionCancelRequestedEventAttributes
-> WorkflowExecutionCancelRequestedEventAttributes -> Bool
(WorkflowExecutionCancelRequestedEventAttributes
-> WorkflowExecutionCancelRequestedEventAttributes -> Bool)
-> (WorkflowExecutionCancelRequestedEventAttributes
-> WorkflowExecutionCancelRequestedEventAttributes -> Bool)
-> Eq WorkflowExecutionCancelRequestedEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionCancelRequestedEventAttributes
-> WorkflowExecutionCancelRequestedEventAttributes -> Bool
$c/= :: WorkflowExecutionCancelRequestedEventAttributes
-> WorkflowExecutionCancelRequestedEventAttributes -> Bool
== :: WorkflowExecutionCancelRequestedEventAttributes
-> WorkflowExecutionCancelRequestedEventAttributes -> Bool
$c== :: WorkflowExecutionCancelRequestedEventAttributes
-> WorkflowExecutionCancelRequestedEventAttributes -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionCancelRequestedEventAttributes]
ReadPrec WorkflowExecutionCancelRequestedEventAttributes
Int -> ReadS WorkflowExecutionCancelRequestedEventAttributes
ReadS [WorkflowExecutionCancelRequestedEventAttributes]
(Int -> ReadS WorkflowExecutionCancelRequestedEventAttributes)
-> ReadS [WorkflowExecutionCancelRequestedEventAttributes]
-> ReadPrec WorkflowExecutionCancelRequestedEventAttributes
-> ReadPrec [WorkflowExecutionCancelRequestedEventAttributes]
-> Read WorkflowExecutionCancelRequestedEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionCancelRequestedEventAttributes]
$creadListPrec :: ReadPrec [WorkflowExecutionCancelRequestedEventAttributes]
readPrec :: ReadPrec WorkflowExecutionCancelRequestedEventAttributes
$creadPrec :: ReadPrec WorkflowExecutionCancelRequestedEventAttributes
readList :: ReadS [WorkflowExecutionCancelRequestedEventAttributes]
$creadList :: ReadS [WorkflowExecutionCancelRequestedEventAttributes]
readsPrec :: Int -> ReadS WorkflowExecutionCancelRequestedEventAttributes
$creadsPrec :: Int -> ReadS WorkflowExecutionCancelRequestedEventAttributes
Prelude.Read, Int -> WorkflowExecutionCancelRequestedEventAttributes -> ShowS
[WorkflowExecutionCancelRequestedEventAttributes] -> ShowS
WorkflowExecutionCancelRequestedEventAttributes -> String
(Int -> WorkflowExecutionCancelRequestedEventAttributes -> ShowS)
-> (WorkflowExecutionCancelRequestedEventAttributes -> String)
-> ([WorkflowExecutionCancelRequestedEventAttributes] -> ShowS)
-> Show WorkflowExecutionCancelRequestedEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionCancelRequestedEventAttributes] -> ShowS
$cshowList :: [WorkflowExecutionCancelRequestedEventAttributes] -> ShowS
show :: WorkflowExecutionCancelRequestedEventAttributes -> String
$cshow :: WorkflowExecutionCancelRequestedEventAttributes -> String
showsPrec :: Int -> WorkflowExecutionCancelRequestedEventAttributes -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionCancelRequestedEventAttributes -> ShowS
Prelude.Show, (forall x.
WorkflowExecutionCancelRequestedEventAttributes
-> Rep WorkflowExecutionCancelRequestedEventAttributes x)
-> (forall x.
Rep WorkflowExecutionCancelRequestedEventAttributes x
-> WorkflowExecutionCancelRequestedEventAttributes)
-> Generic WorkflowExecutionCancelRequestedEventAttributes
forall x.
Rep WorkflowExecutionCancelRequestedEventAttributes x
-> WorkflowExecutionCancelRequestedEventAttributes
forall x.
WorkflowExecutionCancelRequestedEventAttributes
-> Rep WorkflowExecutionCancelRequestedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkflowExecutionCancelRequestedEventAttributes x
-> WorkflowExecutionCancelRequestedEventAttributes
$cfrom :: forall x.
WorkflowExecutionCancelRequestedEventAttributes
-> Rep WorkflowExecutionCancelRequestedEventAttributes x
Prelude.Generic)
newWorkflowExecutionCancelRequestedEventAttributes ::
WorkflowExecutionCancelRequestedEventAttributes
newWorkflowExecutionCancelRequestedEventAttributes :: WorkflowExecutionCancelRequestedEventAttributes
newWorkflowExecutionCancelRequestedEventAttributes =
WorkflowExecutionCancelRequestedEventAttributes' :: Maybe WorkflowExecution
-> Maybe Integer
-> Maybe WorkflowExecutionCancelRequestedCause
-> WorkflowExecutionCancelRequestedEventAttributes
WorkflowExecutionCancelRequestedEventAttributes'
{ $sel:externalWorkflowExecution:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe WorkflowExecution
externalWorkflowExecution =
Maybe WorkflowExecution
forall a. Maybe a
Prelude.Nothing,
$sel:externalInitiatedEventId:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe Integer
externalInitiatedEventId =
Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:cause:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe WorkflowExecutionCancelRequestedCause
cause = Maybe WorkflowExecutionCancelRequestedCause
forall a. Maybe a
Prelude.Nothing
}
workflowExecutionCancelRequestedEventAttributes_externalWorkflowExecution :: Lens.Lens' WorkflowExecutionCancelRequestedEventAttributes (Prelude.Maybe WorkflowExecution)
workflowExecutionCancelRequestedEventAttributes_externalWorkflowExecution :: (Maybe WorkflowExecution -> f (Maybe WorkflowExecution))
-> WorkflowExecutionCancelRequestedEventAttributes
-> f WorkflowExecutionCancelRequestedEventAttributes
workflowExecutionCancelRequestedEventAttributes_externalWorkflowExecution = (WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecution)
-> (WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecution
-> WorkflowExecutionCancelRequestedEventAttributes)
-> Lens
WorkflowExecutionCancelRequestedEventAttributes
WorkflowExecutionCancelRequestedEventAttributes
(Maybe WorkflowExecution)
(Maybe WorkflowExecution)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionCancelRequestedEventAttributes' {Maybe WorkflowExecution
externalWorkflowExecution :: Maybe WorkflowExecution
$sel:externalWorkflowExecution:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecution
externalWorkflowExecution} -> Maybe WorkflowExecution
externalWorkflowExecution) (\s :: WorkflowExecutionCancelRequestedEventAttributes
s@WorkflowExecutionCancelRequestedEventAttributes' {} Maybe WorkflowExecution
a -> WorkflowExecutionCancelRequestedEventAttributes
s {$sel:externalWorkflowExecution:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe WorkflowExecution
externalWorkflowExecution = Maybe WorkflowExecution
a} :: WorkflowExecutionCancelRequestedEventAttributes)
workflowExecutionCancelRequestedEventAttributes_externalInitiatedEventId :: Lens.Lens' WorkflowExecutionCancelRequestedEventAttributes (Prelude.Maybe Prelude.Integer)
workflowExecutionCancelRequestedEventAttributes_externalInitiatedEventId :: (Maybe Integer -> f (Maybe Integer))
-> WorkflowExecutionCancelRequestedEventAttributes
-> f WorkflowExecutionCancelRequestedEventAttributes
workflowExecutionCancelRequestedEventAttributes_externalInitiatedEventId = (WorkflowExecutionCancelRequestedEventAttributes -> Maybe Integer)
-> (WorkflowExecutionCancelRequestedEventAttributes
-> Maybe Integer
-> WorkflowExecutionCancelRequestedEventAttributes)
-> Lens
WorkflowExecutionCancelRequestedEventAttributes
WorkflowExecutionCancelRequestedEventAttributes
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionCancelRequestedEventAttributes' {Maybe Integer
externalInitiatedEventId :: Maybe Integer
$sel:externalInitiatedEventId:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes -> Maybe Integer
externalInitiatedEventId} -> Maybe Integer
externalInitiatedEventId) (\s :: WorkflowExecutionCancelRequestedEventAttributes
s@WorkflowExecutionCancelRequestedEventAttributes' {} Maybe Integer
a -> WorkflowExecutionCancelRequestedEventAttributes
s {$sel:externalInitiatedEventId:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe Integer
externalInitiatedEventId = Maybe Integer
a} :: WorkflowExecutionCancelRequestedEventAttributes)
workflowExecutionCancelRequestedEventAttributes_cause :: Lens.Lens' WorkflowExecutionCancelRequestedEventAttributes (Prelude.Maybe WorkflowExecutionCancelRequestedCause)
workflowExecutionCancelRequestedEventAttributes_cause :: (Maybe WorkflowExecutionCancelRequestedCause
-> f (Maybe WorkflowExecutionCancelRequestedCause))
-> WorkflowExecutionCancelRequestedEventAttributes
-> f WorkflowExecutionCancelRequestedEventAttributes
workflowExecutionCancelRequestedEventAttributes_cause = (WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecutionCancelRequestedCause)
-> (WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecutionCancelRequestedCause
-> WorkflowExecutionCancelRequestedEventAttributes)
-> Lens
WorkflowExecutionCancelRequestedEventAttributes
WorkflowExecutionCancelRequestedEventAttributes
(Maybe WorkflowExecutionCancelRequestedCause)
(Maybe WorkflowExecutionCancelRequestedCause)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionCancelRequestedEventAttributes' {Maybe WorkflowExecutionCancelRequestedCause
cause :: Maybe WorkflowExecutionCancelRequestedCause
$sel:cause:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecutionCancelRequestedCause
cause} -> Maybe WorkflowExecutionCancelRequestedCause
cause) (\s :: WorkflowExecutionCancelRequestedEventAttributes
s@WorkflowExecutionCancelRequestedEventAttributes' {} Maybe WorkflowExecutionCancelRequestedCause
a -> WorkflowExecutionCancelRequestedEventAttributes
s {$sel:cause:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe WorkflowExecutionCancelRequestedCause
cause = Maybe WorkflowExecutionCancelRequestedCause
a} :: WorkflowExecutionCancelRequestedEventAttributes)
instance
Core.FromJSON
WorkflowExecutionCancelRequestedEventAttributes
where
parseJSON :: Value -> Parser WorkflowExecutionCancelRequestedEventAttributes
parseJSON =
String
-> (Object
-> Parser WorkflowExecutionCancelRequestedEventAttributes)
-> Value
-> Parser WorkflowExecutionCancelRequestedEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkflowExecutionCancelRequestedEventAttributes"
( \Object
x ->
Maybe WorkflowExecution
-> Maybe Integer
-> Maybe WorkflowExecutionCancelRequestedCause
-> WorkflowExecutionCancelRequestedEventAttributes
WorkflowExecutionCancelRequestedEventAttributes'
(Maybe WorkflowExecution
-> Maybe Integer
-> Maybe WorkflowExecutionCancelRequestedCause
-> WorkflowExecutionCancelRequestedEventAttributes)
-> Parser (Maybe WorkflowExecution)
-> Parser
(Maybe Integer
-> Maybe WorkflowExecutionCancelRequestedCause
-> WorkflowExecutionCancelRequestedEventAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe WorkflowExecution)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"externalWorkflowExecution")
Parser
(Maybe Integer
-> Maybe WorkflowExecutionCancelRequestedCause
-> WorkflowExecutionCancelRequestedEventAttributes)
-> Parser (Maybe Integer)
-> Parser
(Maybe WorkflowExecutionCancelRequestedCause
-> WorkflowExecutionCancelRequestedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"externalInitiatedEventId")
Parser
(Maybe WorkflowExecutionCancelRequestedCause
-> WorkflowExecutionCancelRequestedEventAttributes)
-> Parser (Maybe WorkflowExecutionCancelRequestedCause)
-> Parser WorkflowExecutionCancelRequestedEventAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe WorkflowExecutionCancelRequestedCause)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cause")
)
instance
Prelude.Hashable
WorkflowExecutionCancelRequestedEventAttributes
instance
Prelude.NFData
WorkflowExecutionCancelRequestedEventAttributes