{-# 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.Lens as Lens
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
(ActivityTaskCompletedEventAttributes
-> ActivityTaskCompletedEventAttributes -> Bool)
-> (ActivityTaskCompletedEventAttributes
-> ActivityTaskCompletedEventAttributes -> Bool)
-> Eq ActivityTaskCompletedEventAttributes
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]
(Int -> ReadS ActivityTaskCompletedEventAttributes)
-> ReadS [ActivityTaskCompletedEventAttributes]
-> ReadPrec ActivityTaskCompletedEventAttributes
-> ReadPrec [ActivityTaskCompletedEventAttributes]
-> Read 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
(Int -> ActivityTaskCompletedEventAttributes -> ShowS)
-> (ActivityTaskCompletedEventAttributes -> String)
-> ([ActivityTaskCompletedEventAttributes] -> ShowS)
-> Show ActivityTaskCompletedEventAttributes
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.
ActivityTaskCompletedEventAttributes
-> Rep ActivityTaskCompletedEventAttributes x)
-> (forall x.
Rep ActivityTaskCompletedEventAttributes x
-> ActivityTaskCompletedEventAttributes)
-> Generic ActivityTaskCompletedEventAttributes
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' :: Maybe Text
-> Integer -> Integer -> ActivityTaskCompletedEventAttributes
ActivityTaskCompletedEventAttributes'
{ $sel:result:ActivityTaskCompletedEventAttributes' :: Maybe Text
result =
Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> ActivityTaskCompletedEventAttributes
-> f ActivityTaskCompletedEventAttributes
activityTaskCompletedEventAttributes_result = (ActivityTaskCompletedEventAttributes -> Maybe Text)
-> (ActivityTaskCompletedEventAttributes
-> Maybe Text -> ActivityTaskCompletedEventAttributes)
-> Lens
ActivityTaskCompletedEventAttributes
ActivityTaskCompletedEventAttributes
(Maybe Text)
(Maybe Text)
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 :: (Integer -> f Integer)
-> ActivityTaskCompletedEventAttributes
-> f ActivityTaskCompletedEventAttributes
activityTaskCompletedEventAttributes_scheduledEventId = (ActivityTaskCompletedEventAttributes -> Integer)
-> (ActivityTaskCompletedEventAttributes
-> Integer -> ActivityTaskCompletedEventAttributes)
-> Lens
ActivityTaskCompletedEventAttributes
ActivityTaskCompletedEventAttributes
Integer
Integer
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 :: (Integer -> f Integer)
-> ActivityTaskCompletedEventAttributes
-> f ActivityTaskCompletedEventAttributes
activityTaskCompletedEventAttributes_startedEventId = (ActivityTaskCompletedEventAttributes -> Integer)
-> (ActivityTaskCompletedEventAttributes
-> Integer -> ActivityTaskCompletedEventAttributes)
-> Lens
ActivityTaskCompletedEventAttributes
ActivityTaskCompletedEventAttributes
Integer
Integer
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
Core.FromJSON
ActivityTaskCompletedEventAttributes
where
parseJSON :: Value -> Parser ActivityTaskCompletedEventAttributes
parseJSON =
String
-> (Object -> Parser ActivityTaskCompletedEventAttributes)
-> Value
-> Parser ActivityTaskCompletedEventAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActivityTaskCompletedEventAttributes"
( \Object
x ->
Maybe Text
-> Integer -> Integer -> ActivityTaskCompletedEventAttributes
ActivityTaskCompletedEventAttributes'
(Maybe Text
-> Integer -> Integer -> ActivityTaskCompletedEventAttributes)
-> Parser (Maybe Text)
-> Parser
(Integer -> Integer -> ActivityTaskCompletedEventAttributes)
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
"result")
Parser (Integer -> Integer -> ActivityTaskCompletedEventAttributes)
-> Parser Integer
-> Parser (Integer -> ActivityTaskCompletedEventAttributes)
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 -> ActivityTaskCompletedEventAttributes)
-> Parser Integer -> Parser ActivityTaskCompletedEventAttributes
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
ActivityTaskCompletedEventAttributes
instance
Prelude.NFData
ActivityTaskCompletedEventAttributes