{-# 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.ActivityTaskCompletedEventAttributes 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 ActivityTaskCompletedEventAttributes = ActivityTaskCompletedEventAttributes'
{
ActivityTaskCompletedEventAttributes -> Maybe Text
result :: Prelude.Maybe Prelude.Text,
ActivityTaskCompletedEventAttributes -> Integer
scheduledEventId :: Prelude.Integer,
ActivityTaskCompletedEventAttributes -> Integer
startedEventId :: Prelude.Integer
}
deriving (ActivityTaskCompletedEventAttributes
-> ActivityTaskCompletedEventAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActivityTaskCompletedEventAttributes
-> ActivityTaskCompletedEventAttributes -> Bool
$c/= :: ActivityTaskCompletedEventAttributes
-> ActivityTaskCompletedEventAttributes -> Bool
== :: ActivityTaskCompletedEventAttributes
-> ActivityTaskCompletedEventAttributes -> Bool
$c== :: ActivityTaskCompletedEventAttributes
-> ActivityTaskCompletedEventAttributes -> Bool
Prelude.Eq, ReadPrec [ActivityTaskCompletedEventAttributes]
ReadPrec ActivityTaskCompletedEventAttributes
Int -> ReadS ActivityTaskCompletedEventAttributes
ReadS [ActivityTaskCompletedEventAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActivityTaskCompletedEventAttributes]
$creadListPrec :: ReadPrec [ActivityTaskCompletedEventAttributes]
readPrec :: ReadPrec ActivityTaskCompletedEventAttributes
$creadPrec :: ReadPrec ActivityTaskCompletedEventAttributes
readList :: ReadS [ActivityTaskCompletedEventAttributes]
$creadList :: ReadS [ActivityTaskCompletedEventAttributes]
readsPrec :: Int -> ReadS ActivityTaskCompletedEventAttributes
$creadsPrec :: Int -> ReadS ActivityTaskCompletedEventAttributes
Prelude.Read, Int -> ActivityTaskCompletedEventAttributes -> ShowS
[ActivityTaskCompletedEventAttributes] -> ShowS
ActivityTaskCompletedEventAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActivityTaskCompletedEventAttributes] -> ShowS
$cshowList :: [ActivityTaskCompletedEventAttributes] -> ShowS
show :: ActivityTaskCompletedEventAttributes -> String
$cshow :: ActivityTaskCompletedEventAttributes -> String
showsPrec :: Int -> ActivityTaskCompletedEventAttributes -> ShowS
$cshowsPrec :: Int -> ActivityTaskCompletedEventAttributes -> ShowS
Prelude.Show, forall x.
Rep ActivityTaskCompletedEventAttributes x
-> ActivityTaskCompletedEventAttributes
forall x.
ActivityTaskCompletedEventAttributes
-> Rep ActivityTaskCompletedEventAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ActivityTaskCompletedEventAttributes x
-> ActivityTaskCompletedEventAttributes
$cfrom :: forall x.
ActivityTaskCompletedEventAttributes
-> Rep ActivityTaskCompletedEventAttributes x
Prelude.Generic)
newActivityTaskCompletedEventAttributes ::
Prelude.Integer ->
Prelude.Integer ->
ActivityTaskCompletedEventAttributes
newActivityTaskCompletedEventAttributes :: Integer -> Integer -> ActivityTaskCompletedEventAttributes
newActivityTaskCompletedEventAttributes
Integer
pScheduledEventId_
Integer
pStartedEventId_ =
ActivityTaskCompletedEventAttributes'
{ $sel:result:ActivityTaskCompletedEventAttributes' :: Maybe Text
result =
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledEventId:ActivityTaskCompletedEventAttributes' :: Integer
scheduledEventId = Integer
pScheduledEventId_,
$sel:startedEventId:ActivityTaskCompletedEventAttributes' :: Integer
startedEventId = Integer
pStartedEventId_
}
activityTaskCompletedEventAttributes_result :: Lens.Lens' ActivityTaskCompletedEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskCompletedEventAttributes_result :: Lens' ActivityTaskCompletedEventAttributes (Maybe Text)
activityTaskCompletedEventAttributes_result = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskCompletedEventAttributes' {Maybe Text
result :: Maybe Text
$sel:result:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Maybe Text
result} -> Maybe Text
result) (\s :: ActivityTaskCompletedEventAttributes
s@ActivityTaskCompletedEventAttributes' {} Maybe Text
a -> ActivityTaskCompletedEventAttributes
s {$sel:result:ActivityTaskCompletedEventAttributes' :: Maybe Text
result = Maybe Text
a} :: ActivityTaskCompletedEventAttributes)
activityTaskCompletedEventAttributes_scheduledEventId :: Lens.Lens' ActivityTaskCompletedEventAttributes Prelude.Integer
activityTaskCompletedEventAttributes_scheduledEventId :: Lens' ActivityTaskCompletedEventAttributes Integer
activityTaskCompletedEventAttributes_scheduledEventId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskCompletedEventAttributes' {Integer
scheduledEventId :: Integer
$sel:scheduledEventId:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Integer
scheduledEventId} -> Integer
scheduledEventId) (\s :: ActivityTaskCompletedEventAttributes
s@ActivityTaskCompletedEventAttributes' {} Integer
a -> ActivityTaskCompletedEventAttributes
s {$sel:scheduledEventId:ActivityTaskCompletedEventAttributes' :: Integer
scheduledEventId = Integer
a} :: ActivityTaskCompletedEventAttributes)
activityTaskCompletedEventAttributes_startedEventId :: Lens.Lens' ActivityTaskCompletedEventAttributes Prelude.Integer
activityTaskCompletedEventAttributes_startedEventId :: Lens' ActivityTaskCompletedEventAttributes Integer
activityTaskCompletedEventAttributes_startedEventId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActivityTaskCompletedEventAttributes' {Integer
startedEventId :: Integer
$sel:startedEventId:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Integer
startedEventId} -> Integer
startedEventId) (\s :: ActivityTaskCompletedEventAttributes
s@ActivityTaskCompletedEventAttributes' {} Integer
a -> ActivityTaskCompletedEventAttributes
s {$sel:startedEventId:ActivityTaskCompletedEventAttributes' :: Integer
startedEventId = Integer
a} :: ActivityTaskCompletedEventAttributes)
instance
Data.FromJSON
ActivityTaskCompletedEventAttributes
where
parseJSON :: Value -> Parser ActivityTaskCompletedEventAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActivityTaskCompletedEventAttributes"
( \Object
x ->
Maybe Text
-> Integer -> Integer -> ActivityTaskCompletedEventAttributes
ActivityTaskCompletedEventAttributes'
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
"result")
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
ActivityTaskCompletedEventAttributes
where
hashWithSalt :: Int -> ActivityTaskCompletedEventAttributes -> Int
hashWithSalt
Int
_salt
ActivityTaskCompletedEventAttributes' {Integer
Maybe Text
startedEventId :: Integer
scheduledEventId :: Integer
result :: Maybe Text
$sel:startedEventId:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Integer
$sel:scheduledEventId:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Integer
$sel:result:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
result
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
ActivityTaskCompletedEventAttributes
where
rnf :: ActivityTaskCompletedEventAttributes -> ()
rnf ActivityTaskCompletedEventAttributes' {Integer
Maybe Text
startedEventId :: Integer
scheduledEventId :: Integer
result :: Maybe Text
$sel:startedEventId:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Integer
$sel:scheduledEventId:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Integer
$sel:result:ActivityTaskCompletedEventAttributes' :: ActivityTaskCompletedEventAttributes -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
result
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