{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ActivityTaskFailedEventAttributes = ActivityTaskFailedEventAttributes'
{
ActivityTaskFailedEventAttributes -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
ActivityTaskFailedEventAttributes -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
ActivityTaskFailedEventAttributes -> Integer
scheduledEventId :: Prelude.Integer,
ActivityTaskFailedEventAttributes -> Integer
startedEventId :: Prelude.Integer
}
deriving (ActivityTaskFailedEventAttributes
-> ActivityTaskFailedEventAttributes -> Bool
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]
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
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.
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'
{ $sel:details:ActivityTaskFailedEventAttributes' :: Maybe Text
details =
forall a. Maybe a
Prelude.Nothing,
$sel:reason:ActivityTaskFailedEventAttributes' :: Maybe Text
reason = forall a. Maybe a
Prelude.Nothing,
$sel:scheduledEventId:ActivityTaskFailedEventAttributes' :: Integer
scheduledEventId = Integer
pScheduledEventId_,
$sel:startedEventId:ActivityTaskFailedEventAttributes' :: Integer
startedEventId = Integer
pStartedEventId_
}
activityTaskFailedEventAttributes_details :: Lens.Lens' ActivityTaskFailedEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskFailedEventAttributes_details :: Lens' ActivityTaskFailedEventAttributes (Maybe Text)
activityTaskFailedEventAttributes_details = 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_reason :: Lens.Lens' ActivityTaskFailedEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskFailedEventAttributes_reason :: Lens' ActivityTaskFailedEventAttributes (Maybe Text)
activityTaskFailedEventAttributes_reason = 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_scheduledEventId :: Lens.Lens' ActivityTaskFailedEventAttributes Prelude.Integer
activityTaskFailedEventAttributes_scheduledEventId :: Lens' ActivityTaskFailedEventAttributes Integer
activityTaskFailedEventAttributes_scheduledEventId = 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 :: Lens' ActivityTaskFailedEventAttributes Integer
activityTaskFailedEventAttributes_startedEventId = 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
Data.FromJSON
ActivityTaskFailedEventAttributes
where
parseJSON :: Value -> Parser ActivityTaskFailedEventAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActivityTaskFailedEventAttributes"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Integer
-> Integer
-> ActivityTaskFailedEventAttributes
ActivityTaskFailedEventAttributes'
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 (Maybe a)
Data..:? Key
"reason")
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
"scheduledEventId")
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
ActivityTaskFailedEventAttributes
where
hashWithSalt :: Int -> ActivityTaskFailedEventAttributes -> Int
hashWithSalt
Int
_salt
ActivityTaskFailedEventAttributes' {Integer
Maybe Text
startedEventId :: Integer
scheduledEventId :: Integer
reason :: Maybe Text
details :: Maybe Text
$sel:startedEventId:ActivityTaskFailedEventAttributes' :: ActivityTaskFailedEventAttributes -> Integer
$sel:scheduledEventId:ActivityTaskFailedEventAttributes' :: ActivityTaskFailedEventAttributes -> Integer
$sel:reason:ActivityTaskFailedEventAttributes' :: ActivityTaskFailedEventAttributes -> Maybe Text
$sel:details:ActivityTaskFailedEventAttributes' :: ActivityTaskFailedEventAttributes -> 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` Maybe Text
reason
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
scheduledEventId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
startedEventId
instance
Prelude.NFData
ActivityTaskFailedEventAttributes
where
rnf :: ActivityTaskFailedEventAttributes -> ()
rnf ActivityTaskFailedEventAttributes' {Integer
Maybe Text
startedEventId :: Integer
scheduledEventId :: Integer
reason :: Maybe Text
details :: Maybe Text
$sel:startedEventId:ActivityTaskFailedEventAttributes' :: ActivityTaskFailedEventAttributes -> Integer
$sel:scheduledEventId:ActivityTaskFailedEventAttributes' :: ActivityTaskFailedEventAttributes -> Integer
$sel:reason:ActivityTaskFailedEventAttributes' :: ActivityTaskFailedEventAttributes -> Maybe Text
$sel:details:ActivityTaskFailedEventAttributes' :: ActivityTaskFailedEventAttributes -> 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 Maybe Text
reason
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
scheduledEventId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
startedEventId