{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.WorkflowExecution
import Amazonka.SWF.Types.WorkflowExecutionCancelRequestedCause
data WorkflowExecutionCancelRequestedEventAttributes = WorkflowExecutionCancelRequestedEventAttributes'
{
WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecutionCancelRequestedCause
cause :: Prelude.Maybe WorkflowExecutionCancelRequestedCause,
WorkflowExecutionCancelRequestedEventAttributes -> Maybe Integer
externalInitiatedEventId :: Prelude.Maybe Prelude.Integer,
WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecution
externalWorkflowExecution :: Prelude.Maybe WorkflowExecution
}
deriving (WorkflowExecutionCancelRequestedEventAttributes
-> WorkflowExecutionCancelRequestedEventAttributes -> Bool
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]
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
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.
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'
{ $sel:cause:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe WorkflowExecutionCancelRequestedCause
cause =
forall a. Maybe a
Prelude.Nothing,
$sel:externalInitiatedEventId:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe Integer
externalInitiatedEventId =
forall a. Maybe a
Prelude.Nothing,
$sel:externalWorkflowExecution:WorkflowExecutionCancelRequestedEventAttributes' :: Maybe WorkflowExecution
externalWorkflowExecution =
forall a. Maybe a
Prelude.Nothing
}
workflowExecutionCancelRequestedEventAttributes_cause :: Lens.Lens' WorkflowExecutionCancelRequestedEventAttributes (Prelude.Maybe WorkflowExecutionCancelRequestedCause)
workflowExecutionCancelRequestedEventAttributes_cause :: Lens'
WorkflowExecutionCancelRequestedEventAttributes
(Maybe WorkflowExecutionCancelRequestedCause)
workflowExecutionCancelRequestedEventAttributes_cause = 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)
workflowExecutionCancelRequestedEventAttributes_externalInitiatedEventId :: Lens.Lens' WorkflowExecutionCancelRequestedEventAttributes (Prelude.Maybe Prelude.Integer)
workflowExecutionCancelRequestedEventAttributes_externalInitiatedEventId :: Lens'
WorkflowExecutionCancelRequestedEventAttributes (Maybe Integer)
workflowExecutionCancelRequestedEventAttributes_externalInitiatedEventId = 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_externalWorkflowExecution :: Lens.Lens' WorkflowExecutionCancelRequestedEventAttributes (Prelude.Maybe WorkflowExecution)
workflowExecutionCancelRequestedEventAttributes_externalWorkflowExecution :: Lens'
WorkflowExecutionCancelRequestedEventAttributes
(Maybe WorkflowExecution)
workflowExecutionCancelRequestedEventAttributes_externalWorkflowExecution = 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)
instance
Data.FromJSON
WorkflowExecutionCancelRequestedEventAttributes
where
parseJSON :: Value -> Parser WorkflowExecutionCancelRequestedEventAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WorkflowExecutionCancelRequestedEventAttributes"
( \Object
x ->
Maybe WorkflowExecutionCancelRequestedCause
-> Maybe Integer
-> Maybe WorkflowExecution
-> WorkflowExecutionCancelRequestedEventAttributes
WorkflowExecutionCancelRequestedEventAttributes'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cause")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"externalInitiatedEventId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"externalWorkflowExecution")
)
instance
Prelude.Hashable
WorkflowExecutionCancelRequestedEventAttributes
where
hashWithSalt :: Int -> WorkflowExecutionCancelRequestedEventAttributes -> Int
hashWithSalt
Int
_salt
WorkflowExecutionCancelRequestedEventAttributes' {Maybe Integer
Maybe WorkflowExecution
Maybe WorkflowExecutionCancelRequestedCause
externalWorkflowExecution :: Maybe WorkflowExecution
externalInitiatedEventId :: Maybe Integer
cause :: Maybe WorkflowExecutionCancelRequestedCause
$sel:externalWorkflowExecution:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecution
$sel:externalInitiatedEventId:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes -> Maybe Integer
$sel:cause:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecutionCancelRequestedCause
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkflowExecutionCancelRequestedCause
cause
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
externalInitiatedEventId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkflowExecution
externalWorkflowExecution
instance
Prelude.NFData
WorkflowExecutionCancelRequestedEventAttributes
where
rnf :: WorkflowExecutionCancelRequestedEventAttributes -> ()
rnf
WorkflowExecutionCancelRequestedEventAttributes' {Maybe Integer
Maybe WorkflowExecution
Maybe WorkflowExecutionCancelRequestedCause
externalWorkflowExecution :: Maybe WorkflowExecution
externalInitiatedEventId :: Maybe Integer
cause :: Maybe WorkflowExecutionCancelRequestedCause
$sel:externalWorkflowExecution:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecution
$sel:externalInitiatedEventId:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes -> Maybe Integer
$sel:cause:WorkflowExecutionCancelRequestedEventAttributes' :: WorkflowExecutionCancelRequestedEventAttributes
-> Maybe WorkflowExecutionCancelRequestedCause
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkflowExecutionCancelRequestedCause
cause
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
externalInitiatedEventId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkflowExecution
externalWorkflowExecution