{-# 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.ChildWorkflowExecutionCanceledEventAttributes 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.WorkflowType
data ChildWorkflowExecutionCanceledEventAttributes = ChildWorkflowExecutionCanceledEventAttributes'
{
ChildWorkflowExecutionCanceledEventAttributes -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
ChildWorkflowExecutionCanceledEventAttributes -> WorkflowExecution
workflowExecution :: WorkflowExecution,
ChildWorkflowExecutionCanceledEventAttributes -> WorkflowType
workflowType :: WorkflowType,
ChildWorkflowExecutionCanceledEventAttributes -> Integer
initiatedEventId :: Prelude.Integer,
ChildWorkflowExecutionCanceledEventAttributes -> Integer
startedEventId :: Prelude.Integer
}
deriving (ChildWorkflowExecutionCanceledEventAttributes
-> ChildWorkflowExecutionCanceledEventAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChildWorkflowExecutionCanceledEventAttributes
-> ChildWorkflowExecutionCanceledEventAttributes -> Bool
$c/= :: ChildWorkflowExecutionCanceledEventAttributes
-> ChildWorkflowExecutionCanceledEventAttributes -> Bool
== :: ChildWorkflowExecutionCanceledEventAttributes
-> ChildWorkflowExecutionCanceledEventAttributes -> Bool
$c== :: ChildWorkflowExecutionCanceledEventAttributes
-> ChildWorkflowExecutionCanceledEventAttributes -> Bool
Prelude.Eq, ReadPrec [ChildWorkflowExecutionCanceledEventAttributes]
ReadPrec ChildWorkflowExecutionCanceledEventAttributes
Int -> ReadS ChildWorkflowExecutionCanceledEventAttributes
ReadS [ChildWorkflowExecutionCanceledEventAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChildWorkflowExecutionCanceledEventAttributes]
$creadListPrec :: ReadPrec [ChildWorkflowExecutionCanceledEventAttributes]
readPrec :: ReadPrec ChildWorkflowExecutionCanceledEventAttributes
$creadPrec :: ReadPrec ChildWorkflowExecutionCanceledEventAttributes
readList :: ReadS [ChildWorkflowExecutionCanceledEventAttributes]
$creadList :: ReadS [ChildWorkflowExecutionCanceledEventAttributes]
readsPrec :: Int -> ReadS ChildWorkflowExecutionCanceledEventAttributes
$creadsPrec :: Int -> ReadS ChildWorkflowExecutionCanceledEventAttributes
Prelude.Read, Int -> ChildWorkflowExecutionCanceledEventAttributes -> ShowS
[ChildWorkflowExecutionCanceledEventAttributes] -> ShowS
ChildWorkflowExecutionCanceledEventAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChildWorkflowExecutionCanceledEventAttributes] -> ShowS
$cshowList :: [ChildWorkflowExecutionCanceledEventAttributes] -> ShowS
show :: ChildWorkflowExecutionCanceledEventAttributes -> String
$cshow :: ChildWorkflowExecutionCanceledEventAttributes -> String
showsPrec :: Int -> ChildWorkflowExecutionCanceledEventAttributes -> ShowS
$cshowsPrec :: Int -> ChildWorkflowExecutionCanceledEventAttributes -> ShowS
Prelude.Show, forall x.
Rep ChildWorkflowExecutionCanceledEventAttributes x
-> ChildWorkflowExecutionCanceledEventAttributes
forall x.
ChildWorkflowExecutionCanceledEventAttributes
-> Rep ChildWorkflowExecutionCanceledEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ChildWorkflowExecutionCanceledEventAttributes x
-> ChildWorkflowExecutionCanceledEventAttributes
$cfrom :: forall x.
ChildWorkflowExecutionCanceledEventAttributes
-> Rep ChildWorkflowExecutionCanceledEventAttributes x
Prelude.Generic)
newChildWorkflowExecutionCanceledEventAttributes ::
WorkflowExecution ->
WorkflowType ->
Prelude.Integer ->
Prelude.Integer ->
ChildWorkflowExecutionCanceledEventAttributes
newChildWorkflowExecutionCanceledEventAttributes :: WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionCanceledEventAttributes
newChildWorkflowExecutionCanceledEventAttributes
WorkflowExecution
pWorkflowExecution_
WorkflowType
pWorkflowType_
Integer
pInitiatedEventId_
Integer
pStartedEventId_ =
ChildWorkflowExecutionCanceledEventAttributes'
{ $sel:details:ChildWorkflowExecutionCanceledEventAttributes' :: Maybe Text
details =
forall a. Maybe a
Prelude.Nothing,
$sel:workflowExecution:ChildWorkflowExecutionCanceledEventAttributes' :: WorkflowExecution
workflowExecution =
WorkflowExecution
pWorkflowExecution_,
$sel:workflowType:ChildWorkflowExecutionCanceledEventAttributes' :: WorkflowType
workflowType =
WorkflowType
pWorkflowType_,
$sel:initiatedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: Integer
initiatedEventId =
Integer
pInitiatedEventId_,
$sel:startedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: Integer
startedEventId =
Integer
pStartedEventId_
}
childWorkflowExecutionCanceledEventAttributes_details :: Lens.Lens' ChildWorkflowExecutionCanceledEventAttributes (Prelude.Maybe Prelude.Text)
childWorkflowExecutionCanceledEventAttributes_details :: Lens' ChildWorkflowExecutionCanceledEventAttributes (Maybe Text)
childWorkflowExecutionCanceledEventAttributes_details = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionCanceledEventAttributes' {Maybe Text
details :: Maybe Text
$sel:details:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Maybe Text
details} -> Maybe Text
details) (\s :: ChildWorkflowExecutionCanceledEventAttributes
s@ChildWorkflowExecutionCanceledEventAttributes' {} Maybe Text
a -> ChildWorkflowExecutionCanceledEventAttributes
s {$sel:details:ChildWorkflowExecutionCanceledEventAttributes' :: Maybe Text
details = Maybe Text
a} :: ChildWorkflowExecutionCanceledEventAttributes)
childWorkflowExecutionCanceledEventAttributes_workflowExecution :: Lens.Lens' ChildWorkflowExecutionCanceledEventAttributes WorkflowExecution
childWorkflowExecutionCanceledEventAttributes_workflowExecution :: Lens'
ChildWorkflowExecutionCanceledEventAttributes WorkflowExecution
childWorkflowExecutionCanceledEventAttributes_workflowExecution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionCanceledEventAttributes' {WorkflowExecution
workflowExecution :: WorkflowExecution
$sel:workflowExecution:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> WorkflowExecution
workflowExecution} -> WorkflowExecution
workflowExecution) (\s :: ChildWorkflowExecutionCanceledEventAttributes
s@ChildWorkflowExecutionCanceledEventAttributes' {} WorkflowExecution
a -> ChildWorkflowExecutionCanceledEventAttributes
s {$sel:workflowExecution:ChildWorkflowExecutionCanceledEventAttributes' :: WorkflowExecution
workflowExecution = WorkflowExecution
a} :: ChildWorkflowExecutionCanceledEventAttributes)
childWorkflowExecutionCanceledEventAttributes_workflowType :: Lens.Lens' ChildWorkflowExecutionCanceledEventAttributes WorkflowType
childWorkflowExecutionCanceledEventAttributes_workflowType :: Lens' ChildWorkflowExecutionCanceledEventAttributes WorkflowType
childWorkflowExecutionCanceledEventAttributes_workflowType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionCanceledEventAttributes' {WorkflowType
workflowType :: WorkflowType
$sel:workflowType:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> WorkflowType
workflowType} -> WorkflowType
workflowType) (\s :: ChildWorkflowExecutionCanceledEventAttributes
s@ChildWorkflowExecutionCanceledEventAttributes' {} WorkflowType
a -> ChildWorkflowExecutionCanceledEventAttributes
s {$sel:workflowType:ChildWorkflowExecutionCanceledEventAttributes' :: WorkflowType
workflowType = WorkflowType
a} :: ChildWorkflowExecutionCanceledEventAttributes)
childWorkflowExecutionCanceledEventAttributes_initiatedEventId :: Lens.Lens' ChildWorkflowExecutionCanceledEventAttributes Prelude.Integer
childWorkflowExecutionCanceledEventAttributes_initiatedEventId :: Lens' ChildWorkflowExecutionCanceledEventAttributes Integer
childWorkflowExecutionCanceledEventAttributes_initiatedEventId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionCanceledEventAttributes' {Integer
initiatedEventId :: Integer
$sel:initiatedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Integer
initiatedEventId} -> Integer
initiatedEventId) (\s :: ChildWorkflowExecutionCanceledEventAttributes
s@ChildWorkflowExecutionCanceledEventAttributes' {} Integer
a -> ChildWorkflowExecutionCanceledEventAttributes
s {$sel:initiatedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: Integer
initiatedEventId = Integer
a} :: ChildWorkflowExecutionCanceledEventAttributes)
childWorkflowExecutionCanceledEventAttributes_startedEventId :: Lens.Lens' ChildWorkflowExecutionCanceledEventAttributes Prelude.Integer
childWorkflowExecutionCanceledEventAttributes_startedEventId :: Lens' ChildWorkflowExecutionCanceledEventAttributes Integer
childWorkflowExecutionCanceledEventAttributes_startedEventId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChildWorkflowExecutionCanceledEventAttributes' {Integer
startedEventId :: Integer
$sel:startedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Integer
startedEventId} -> Integer
startedEventId) (\s :: ChildWorkflowExecutionCanceledEventAttributes
s@ChildWorkflowExecutionCanceledEventAttributes' {} Integer
a -> ChildWorkflowExecutionCanceledEventAttributes
s {$sel:startedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: Integer
startedEventId = Integer
a} :: ChildWorkflowExecutionCanceledEventAttributes)
instance
Data.FromJSON
ChildWorkflowExecutionCanceledEventAttributes
where
parseJSON :: Value -> Parser ChildWorkflowExecutionCanceledEventAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ChildWorkflowExecutionCanceledEventAttributes"
( \Object
x ->
Maybe Text
-> WorkflowExecution
-> WorkflowType
-> Integer
-> Integer
-> ChildWorkflowExecutionCanceledEventAttributes
ChildWorkflowExecutionCanceledEventAttributes'
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
"details")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"workflowExecution")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"workflowType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"initiatedEventId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"startedEventId")
)
instance
Prelude.Hashable
ChildWorkflowExecutionCanceledEventAttributes
where
hashWithSalt :: Int -> ChildWorkflowExecutionCanceledEventAttributes -> Int
hashWithSalt
Int
_salt
ChildWorkflowExecutionCanceledEventAttributes' {Integer
Maybe Text
WorkflowExecution
WorkflowType
startedEventId :: Integer
initiatedEventId :: Integer
workflowType :: WorkflowType
workflowExecution :: WorkflowExecution
details :: Maybe Text
$sel:startedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Integer
$sel:initiatedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Integer
$sel:workflowType:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> WorkflowType
$sel:workflowExecution:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> WorkflowExecution
$sel:details:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
details
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` WorkflowExecution
workflowExecution
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` WorkflowType
workflowType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
initiatedEventId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
startedEventId
instance
Prelude.NFData
ChildWorkflowExecutionCanceledEventAttributes
where
rnf :: ChildWorkflowExecutionCanceledEventAttributes -> ()
rnf
ChildWorkflowExecutionCanceledEventAttributes' {Integer
Maybe Text
WorkflowExecution
WorkflowType
startedEventId :: Integer
initiatedEventId :: Integer
workflowType :: WorkflowType
workflowExecution :: WorkflowExecution
details :: Maybe Text
$sel:startedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Integer
$sel:initiatedEventId:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Integer
$sel:workflowType:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> WorkflowType
$sel:workflowExecution:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> WorkflowExecution
$sel:details:ChildWorkflowExecutionCanceledEventAttributes' :: ChildWorkflowExecutionCanceledEventAttributes -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
details
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf WorkflowExecution
workflowExecution
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf WorkflowType
workflowType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
initiatedEventId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
startedEventId