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