{-# 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.WorkflowExecutionCanceledEventAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorkflowExecutionCanceledEventAttributes = WorkflowExecutionCanceledEventAttributes'
{
WorkflowExecutionCanceledEventAttributes -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
WorkflowExecutionCanceledEventAttributes -> Integer
decisionTaskCompletedEventId :: Prelude.Integer
}
deriving (WorkflowExecutionCanceledEventAttributes
-> WorkflowExecutionCanceledEventAttributes -> Bool
(WorkflowExecutionCanceledEventAttributes
-> WorkflowExecutionCanceledEventAttributes -> Bool)
-> (WorkflowExecutionCanceledEventAttributes
-> WorkflowExecutionCanceledEventAttributes -> Bool)
-> Eq WorkflowExecutionCanceledEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowExecutionCanceledEventAttributes
-> WorkflowExecutionCanceledEventAttributes -> Bool
$c/= :: WorkflowExecutionCanceledEventAttributes
-> WorkflowExecutionCanceledEventAttributes -> Bool
== :: WorkflowExecutionCanceledEventAttributes
-> WorkflowExecutionCanceledEventAttributes -> Bool
$c== :: WorkflowExecutionCanceledEventAttributes
-> WorkflowExecutionCanceledEventAttributes -> Bool
Prelude.Eq, ReadPrec [WorkflowExecutionCanceledEventAttributes]
ReadPrec WorkflowExecutionCanceledEventAttributes
Int -> ReadS WorkflowExecutionCanceledEventAttributes
ReadS [WorkflowExecutionCanceledEventAttributes]
(Int -> ReadS WorkflowExecutionCanceledEventAttributes)
-> ReadS [WorkflowExecutionCanceledEventAttributes]
-> ReadPrec WorkflowExecutionCanceledEventAttributes
-> ReadPrec [WorkflowExecutionCanceledEventAttributes]
-> Read WorkflowExecutionCanceledEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowExecutionCanceledEventAttributes]
$creadListPrec :: ReadPrec [WorkflowExecutionCanceledEventAttributes]
readPrec :: ReadPrec WorkflowExecutionCanceledEventAttributes
$creadPrec :: ReadPrec WorkflowExecutionCanceledEventAttributes
readList :: ReadS [WorkflowExecutionCanceledEventAttributes]
$creadList :: ReadS [WorkflowExecutionCanceledEventAttributes]
readsPrec :: Int -> ReadS WorkflowExecutionCanceledEventAttributes
$creadsPrec :: Int -> ReadS WorkflowExecutionCanceledEventAttributes
Prelude.Read, Int -> WorkflowExecutionCanceledEventAttributes -> ShowS
[WorkflowExecutionCanceledEventAttributes] -> ShowS
WorkflowExecutionCanceledEventAttributes -> String
(Int -> WorkflowExecutionCanceledEventAttributes -> ShowS)
-> (WorkflowExecutionCanceledEventAttributes -> String)
-> ([WorkflowExecutionCanceledEventAttributes] -> ShowS)
-> Show WorkflowExecutionCanceledEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowExecutionCanceledEventAttributes] -> ShowS
$cshowList :: [WorkflowExecutionCanceledEventAttributes] -> ShowS
show :: WorkflowExecutionCanceledEventAttributes -> String
$cshow :: WorkflowExecutionCanceledEventAttributes -> String
showsPrec :: Int -> WorkflowExecutionCanceledEventAttributes -> ShowS
$cshowsPrec :: Int -> WorkflowExecutionCanceledEventAttributes -> ShowS
Prelude.Show, (forall x.
WorkflowExecutionCanceledEventAttributes
-> Rep WorkflowExecutionCanceledEventAttributes x)
-> (forall x.
Rep WorkflowExecutionCanceledEventAttributes x
-> WorkflowExecutionCanceledEventAttributes)
-> Generic WorkflowExecutionCanceledEventAttributes
forall x.
Rep WorkflowExecutionCanceledEventAttributes x
-> WorkflowExecutionCanceledEventAttributes
forall x.
WorkflowExecutionCanceledEventAttributes
-> Rep WorkflowExecutionCanceledEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkflowExecutionCanceledEventAttributes x
-> WorkflowExecutionCanceledEventAttributes
$cfrom :: forall x.
WorkflowExecutionCanceledEventAttributes
-> Rep WorkflowExecutionCanceledEventAttributes x
Prelude.Generic)
newWorkflowExecutionCanceledEventAttributes ::
Prelude.Integer ->
WorkflowExecutionCanceledEventAttributes
newWorkflowExecutionCanceledEventAttributes :: Integer -> WorkflowExecutionCanceledEventAttributes
newWorkflowExecutionCanceledEventAttributes
Integer
pDecisionTaskCompletedEventId_ =
WorkflowExecutionCanceledEventAttributes' :: Maybe Text -> Integer -> WorkflowExecutionCanceledEventAttributes
WorkflowExecutionCanceledEventAttributes'
{ $sel:details:WorkflowExecutionCanceledEventAttributes' :: Maybe Text
details =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:decisionTaskCompletedEventId:WorkflowExecutionCanceledEventAttributes' :: Integer
decisionTaskCompletedEventId =
Integer
pDecisionTaskCompletedEventId_
}
workflowExecutionCanceledEventAttributes_details :: Lens.Lens' WorkflowExecutionCanceledEventAttributes (Prelude.Maybe Prelude.Text)
workflowExecutionCanceledEventAttributes_details :: (Maybe Text -> f (Maybe Text))
-> WorkflowExecutionCanceledEventAttributes
-> f WorkflowExecutionCanceledEventAttributes
workflowExecutionCanceledEventAttributes_details = (WorkflowExecutionCanceledEventAttributes -> Maybe Text)
-> (WorkflowExecutionCanceledEventAttributes
-> Maybe Text -> WorkflowExecutionCanceledEventAttributes)
-> Lens
WorkflowExecutionCanceledEventAttributes
WorkflowExecutionCanceledEventAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionCanceledEventAttributes' {Maybe Text
details :: Maybe Text
$sel:details:WorkflowExecutionCanceledEventAttributes' :: WorkflowExecutionCanceledEventAttributes -> Maybe Text
details} -> Maybe Text
details) (\s :: WorkflowExecutionCanceledEventAttributes
s@WorkflowExecutionCanceledEventAttributes' {} Maybe Text
a -> WorkflowExecutionCanceledEventAttributes
s {$sel:details:WorkflowExecutionCanceledEventAttributes' :: Maybe Text
details = Maybe Text
a} :: WorkflowExecutionCanceledEventAttributes)
workflowExecutionCanceledEventAttributes_decisionTaskCompletedEventId :: Lens.Lens' WorkflowExecutionCanceledEventAttributes Prelude.Integer
workflowExecutionCanceledEventAttributes_decisionTaskCompletedEventId :: (Integer -> f Integer)
-> WorkflowExecutionCanceledEventAttributes
-> f WorkflowExecutionCanceledEventAttributes
workflowExecutionCanceledEventAttributes_decisionTaskCompletedEventId = (WorkflowExecutionCanceledEventAttributes -> Integer)
-> (WorkflowExecutionCanceledEventAttributes
-> Integer -> WorkflowExecutionCanceledEventAttributes)
-> Lens
WorkflowExecutionCanceledEventAttributes
WorkflowExecutionCanceledEventAttributes
Integer
Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowExecutionCanceledEventAttributes' {Integer
decisionTaskCompletedEventId :: Integer
$sel:decisionTaskCompletedEventId:WorkflowExecutionCanceledEventAttributes' :: WorkflowExecutionCanceledEventAttributes -> Integer
decisionTaskCompletedEventId} -> Integer
decisionTaskCompletedEventId) (\s :: WorkflowExecutionCanceledEventAttributes
s@WorkflowExecutionCanceledEventAttributes' {} Integer
a -> WorkflowExecutionCanceledEventAttributes
s {$sel:decisionTaskCompletedEventId:WorkflowExecutionCanceledEventAttributes' :: Integer
decisionTaskCompletedEventId = Integer
a} :: WorkflowExecutionCanceledEventAttributes)
instance
Core.FromJSON
WorkflowExecutionCanceledEventAttributes
where
parseJSON :: Value -> Parser WorkflowExecutionCanceledEventAttributes
parseJSON =
String
-> (Object -> Parser WorkflowExecutionCanceledEventAttributes)
-> Value
-> Parser WorkflowExecutionCanceledEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkflowExecutionCanceledEventAttributes"
( \Object
x ->
Maybe Text -> Integer -> WorkflowExecutionCanceledEventAttributes
WorkflowExecutionCanceledEventAttributes'
(Maybe Text -> Integer -> WorkflowExecutionCanceledEventAttributes)
-> Parser (Maybe Text)
-> Parser (Integer -> WorkflowExecutionCanceledEventAttributes)
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
"details")
Parser (Integer -> WorkflowExecutionCanceledEventAttributes)
-> Parser Integer
-> Parser WorkflowExecutionCanceledEventAttributes
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
"decisionTaskCompletedEventId")
)
instance
Prelude.Hashable
WorkflowExecutionCanceledEventAttributes
instance
Prelude.NFData
WorkflowExecutionCanceledEventAttributes