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