{-# 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.ScheduleActivityTaskFailedEventAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SWF.Types.ActivityType
import Amazonka.SWF.Types.ScheduleActivityTaskFailedCause
data ScheduleActivityTaskFailedEventAttributes = ScheduleActivityTaskFailedEventAttributes'
{
ScheduleActivityTaskFailedEventAttributes -> ActivityType
activityType :: ActivityType,
ScheduleActivityTaskFailedEventAttributes -> Text
activityId :: Prelude.Text,
ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedCause
cause :: ScheduleActivityTaskFailedCause,
ScheduleActivityTaskFailedEventAttributes -> Integer
decisionTaskCompletedEventId :: Prelude.Integer
}
deriving (ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedEventAttributes -> Bool
(ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedEventAttributes -> Bool)
-> (ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedEventAttributes -> Bool)
-> Eq ScheduleActivityTaskFailedEventAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedEventAttributes -> Bool
$c/= :: ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedEventAttributes -> Bool
== :: ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedEventAttributes -> Bool
$c== :: ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedEventAttributes -> Bool
Prelude.Eq, ReadPrec [ScheduleActivityTaskFailedEventAttributes]
ReadPrec ScheduleActivityTaskFailedEventAttributes
Int -> ReadS ScheduleActivityTaskFailedEventAttributes
ReadS [ScheduleActivityTaskFailedEventAttributes]
(Int -> ReadS ScheduleActivityTaskFailedEventAttributes)
-> ReadS [ScheduleActivityTaskFailedEventAttributes]
-> ReadPrec ScheduleActivityTaskFailedEventAttributes
-> ReadPrec [ScheduleActivityTaskFailedEventAttributes]
-> Read ScheduleActivityTaskFailedEventAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduleActivityTaskFailedEventAttributes]
$creadListPrec :: ReadPrec [ScheduleActivityTaskFailedEventAttributes]
readPrec :: ReadPrec ScheduleActivityTaskFailedEventAttributes
$creadPrec :: ReadPrec ScheduleActivityTaskFailedEventAttributes
readList :: ReadS [ScheduleActivityTaskFailedEventAttributes]
$creadList :: ReadS [ScheduleActivityTaskFailedEventAttributes]
readsPrec :: Int -> ReadS ScheduleActivityTaskFailedEventAttributes
$creadsPrec :: Int -> ReadS ScheduleActivityTaskFailedEventAttributes
Prelude.Read, Int -> ScheduleActivityTaskFailedEventAttributes -> ShowS
[ScheduleActivityTaskFailedEventAttributes] -> ShowS
ScheduleActivityTaskFailedEventAttributes -> String
(Int -> ScheduleActivityTaskFailedEventAttributes -> ShowS)
-> (ScheduleActivityTaskFailedEventAttributes -> String)
-> ([ScheduleActivityTaskFailedEventAttributes] -> ShowS)
-> Show ScheduleActivityTaskFailedEventAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduleActivityTaskFailedEventAttributes] -> ShowS
$cshowList :: [ScheduleActivityTaskFailedEventAttributes] -> ShowS
show :: ScheduleActivityTaskFailedEventAttributes -> String
$cshow :: ScheduleActivityTaskFailedEventAttributes -> String
showsPrec :: Int -> ScheduleActivityTaskFailedEventAttributes -> ShowS
$cshowsPrec :: Int -> ScheduleActivityTaskFailedEventAttributes -> ShowS
Prelude.Show, (forall x.
ScheduleActivityTaskFailedEventAttributes
-> Rep ScheduleActivityTaskFailedEventAttributes x)
-> (forall x.
Rep ScheduleActivityTaskFailedEventAttributes x
-> ScheduleActivityTaskFailedEventAttributes)
-> Generic ScheduleActivityTaskFailedEventAttributes
forall x.
Rep ScheduleActivityTaskFailedEventAttributes x
-> ScheduleActivityTaskFailedEventAttributes
forall x.
ScheduleActivityTaskFailedEventAttributes
-> Rep ScheduleActivityTaskFailedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScheduleActivityTaskFailedEventAttributes x
-> ScheduleActivityTaskFailedEventAttributes
$cfrom :: forall x.
ScheduleActivityTaskFailedEventAttributes
-> Rep ScheduleActivityTaskFailedEventAttributes x
Prelude.Generic)
newScheduleActivityTaskFailedEventAttributes ::
ActivityType ->
Prelude.Text ->
ScheduleActivityTaskFailedCause ->
Prelude.Integer ->
ScheduleActivityTaskFailedEventAttributes
newScheduleActivityTaskFailedEventAttributes :: ActivityType
-> Text
-> ScheduleActivityTaskFailedCause
-> Integer
-> ScheduleActivityTaskFailedEventAttributes
newScheduleActivityTaskFailedEventAttributes
ActivityType
pActivityType_
Text
pActivityId_
ScheduleActivityTaskFailedCause
pCause_
Integer
pDecisionTaskCompletedEventId_ =
ScheduleActivityTaskFailedEventAttributes' :: ActivityType
-> Text
-> ScheduleActivityTaskFailedCause
-> Integer
-> ScheduleActivityTaskFailedEventAttributes
ScheduleActivityTaskFailedEventAttributes'
{ $sel:activityType:ScheduleActivityTaskFailedEventAttributes' :: ActivityType
activityType =
ActivityType
pActivityType_,
$sel:activityId:ScheduleActivityTaskFailedEventAttributes' :: Text
activityId = Text
pActivityId_,
$sel:cause:ScheduleActivityTaskFailedEventAttributes' :: ScheduleActivityTaskFailedCause
cause = ScheduleActivityTaskFailedCause
pCause_,
$sel:decisionTaskCompletedEventId:ScheduleActivityTaskFailedEventAttributes' :: Integer
decisionTaskCompletedEventId =
Integer
pDecisionTaskCompletedEventId_
}
scheduleActivityTaskFailedEventAttributes_activityType :: Lens.Lens' ScheduleActivityTaskFailedEventAttributes ActivityType
scheduleActivityTaskFailedEventAttributes_activityType :: (ActivityType -> f ActivityType)
-> ScheduleActivityTaskFailedEventAttributes
-> f ScheduleActivityTaskFailedEventAttributes
scheduleActivityTaskFailedEventAttributes_activityType = (ScheduleActivityTaskFailedEventAttributes -> ActivityType)
-> (ScheduleActivityTaskFailedEventAttributes
-> ActivityType -> ScheduleActivityTaskFailedEventAttributes)
-> Lens
ScheduleActivityTaskFailedEventAttributes
ScheduleActivityTaskFailedEventAttributes
ActivityType
ActivityType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskFailedEventAttributes' {ActivityType
activityType :: ActivityType
$sel:activityType:ScheduleActivityTaskFailedEventAttributes' :: ScheduleActivityTaskFailedEventAttributes -> ActivityType
activityType} -> ActivityType
activityType) (\s :: ScheduleActivityTaskFailedEventAttributes
s@ScheduleActivityTaskFailedEventAttributes' {} ActivityType
a -> ScheduleActivityTaskFailedEventAttributes
s {$sel:activityType:ScheduleActivityTaskFailedEventAttributes' :: ActivityType
activityType = ActivityType
a} :: ScheduleActivityTaskFailedEventAttributes)
scheduleActivityTaskFailedEventAttributes_activityId :: Lens.Lens' ScheduleActivityTaskFailedEventAttributes Prelude.Text
scheduleActivityTaskFailedEventAttributes_activityId :: (Text -> f Text)
-> ScheduleActivityTaskFailedEventAttributes
-> f ScheduleActivityTaskFailedEventAttributes
scheduleActivityTaskFailedEventAttributes_activityId = (ScheduleActivityTaskFailedEventAttributes -> Text)
-> (ScheduleActivityTaskFailedEventAttributes
-> Text -> ScheduleActivityTaskFailedEventAttributes)
-> Lens
ScheduleActivityTaskFailedEventAttributes
ScheduleActivityTaskFailedEventAttributes
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskFailedEventAttributes' {Text
activityId :: Text
$sel:activityId:ScheduleActivityTaskFailedEventAttributes' :: ScheduleActivityTaskFailedEventAttributes -> Text
activityId} -> Text
activityId) (\s :: ScheduleActivityTaskFailedEventAttributes
s@ScheduleActivityTaskFailedEventAttributes' {} Text
a -> ScheduleActivityTaskFailedEventAttributes
s {$sel:activityId:ScheduleActivityTaskFailedEventAttributes' :: Text
activityId = Text
a} :: ScheduleActivityTaskFailedEventAttributes)
scheduleActivityTaskFailedEventAttributes_cause :: Lens.Lens' ScheduleActivityTaskFailedEventAttributes ScheduleActivityTaskFailedCause
scheduleActivityTaskFailedEventAttributes_cause :: (ScheduleActivityTaskFailedCause
-> f ScheduleActivityTaskFailedCause)
-> ScheduleActivityTaskFailedEventAttributes
-> f ScheduleActivityTaskFailedEventAttributes
scheduleActivityTaskFailedEventAttributes_cause = (ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedCause)
-> (ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedCause
-> ScheduleActivityTaskFailedEventAttributes)
-> Lens
ScheduleActivityTaskFailedEventAttributes
ScheduleActivityTaskFailedEventAttributes
ScheduleActivityTaskFailedCause
ScheduleActivityTaskFailedCause
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskFailedEventAttributes' {ScheduleActivityTaskFailedCause
cause :: ScheduleActivityTaskFailedCause
$sel:cause:ScheduleActivityTaskFailedEventAttributes' :: ScheduleActivityTaskFailedEventAttributes
-> ScheduleActivityTaskFailedCause
cause} -> ScheduleActivityTaskFailedCause
cause) (\s :: ScheduleActivityTaskFailedEventAttributes
s@ScheduleActivityTaskFailedEventAttributes' {} ScheduleActivityTaskFailedCause
a -> ScheduleActivityTaskFailedEventAttributes
s {$sel:cause:ScheduleActivityTaskFailedEventAttributes' :: ScheduleActivityTaskFailedCause
cause = ScheduleActivityTaskFailedCause
a} :: ScheduleActivityTaskFailedEventAttributes)
scheduleActivityTaskFailedEventAttributes_decisionTaskCompletedEventId :: Lens.Lens' ScheduleActivityTaskFailedEventAttributes Prelude.Integer
scheduleActivityTaskFailedEventAttributes_decisionTaskCompletedEventId :: (Integer -> f Integer)
-> ScheduleActivityTaskFailedEventAttributes
-> f ScheduleActivityTaskFailedEventAttributes
scheduleActivityTaskFailedEventAttributes_decisionTaskCompletedEventId = (ScheduleActivityTaskFailedEventAttributes -> Integer)
-> (ScheduleActivityTaskFailedEventAttributes
-> Integer -> ScheduleActivityTaskFailedEventAttributes)
-> Lens
ScheduleActivityTaskFailedEventAttributes
ScheduleActivityTaskFailedEventAttributes
Integer
Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduleActivityTaskFailedEventAttributes' {Integer
decisionTaskCompletedEventId :: Integer
$sel:decisionTaskCompletedEventId:ScheduleActivityTaskFailedEventAttributes' :: ScheduleActivityTaskFailedEventAttributes -> Integer
decisionTaskCompletedEventId} -> Integer
decisionTaskCompletedEventId) (\s :: ScheduleActivityTaskFailedEventAttributes
s@ScheduleActivityTaskFailedEventAttributes' {} Integer
a -> ScheduleActivityTaskFailedEventAttributes
s {$sel:decisionTaskCompletedEventId:ScheduleActivityTaskFailedEventAttributes' :: Integer
decisionTaskCompletedEventId = Integer
a} :: ScheduleActivityTaskFailedEventAttributes)
instance
Core.FromJSON
ScheduleActivityTaskFailedEventAttributes
where
parseJSON :: Value -> Parser ScheduleActivityTaskFailedEventAttributes
parseJSON =
String
-> (Object -> Parser ScheduleActivityTaskFailedEventAttributes)
-> Value
-> Parser ScheduleActivityTaskFailedEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ScheduleActivityTaskFailedEventAttributes"
( \Object
x ->
ActivityType
-> Text
-> ScheduleActivityTaskFailedCause
-> Integer
-> ScheduleActivityTaskFailedEventAttributes
ScheduleActivityTaskFailedEventAttributes'
(ActivityType
-> Text
-> ScheduleActivityTaskFailedCause
-> Integer
-> ScheduleActivityTaskFailedEventAttributes)
-> Parser ActivityType
-> Parser
(Text
-> ScheduleActivityTaskFailedCause
-> Integer
-> ScheduleActivityTaskFailedEventAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser ActivityType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"activityType")
Parser
(Text
-> ScheduleActivityTaskFailedCause
-> Integer
-> ScheduleActivityTaskFailedEventAttributes)
-> Parser Text
-> Parser
(ScheduleActivityTaskFailedCause
-> Integer -> ScheduleActivityTaskFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"activityId")
Parser
(ScheduleActivityTaskFailedCause
-> Integer -> ScheduleActivityTaskFailedEventAttributes)
-> Parser ScheduleActivityTaskFailedCause
-> Parser (Integer -> ScheduleActivityTaskFailedEventAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ScheduleActivityTaskFailedCause
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"cause")
Parser (Integer -> ScheduleActivityTaskFailedEventAttributes)
-> Parser Integer
-> Parser ScheduleActivityTaskFailedEventAttributes
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
ScheduleActivityTaskFailedEventAttributes
instance
Prelude.NFData
ScheduleActivityTaskFailedEventAttributes