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