{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ActivityTaskCanceledEventAttributes = ActivityTaskCanceledEventAttributes'
{
ActivityTaskCanceledEventAttributes -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
ActivityTaskCanceledEventAttributes -> Maybe Integer
latestCancelRequestedEventId :: Prelude.Maybe Prelude.Integer,
ActivityTaskCanceledEventAttributes -> Integer
scheduledEventId :: Prelude.Integer,
ActivityTaskCanceledEventAttributes -> Integer
startedEventId :: Prelude.Integer
}
deriving (ActivityTaskCanceledEventAttributes
-> ActivityTaskCanceledEventAttributes -> Bool
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]
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
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.
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'
{ $sel:details:ActivityTaskCanceledEventAttributes' :: Maybe Text
details =
forall a. Maybe a
Prelude.Nothing,
$sel:latestCancelRequestedEventId:ActivityTaskCanceledEventAttributes' :: Maybe Integer
latestCancelRequestedEventId =
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledEventId:ActivityTaskCanceledEventAttributes' :: Integer
scheduledEventId = Integer
pScheduledEventId_,
$sel:startedEventId:ActivityTaskCanceledEventAttributes' :: Integer
startedEventId = Integer
pStartedEventId_
}
activityTaskCanceledEventAttributes_details :: Lens.Lens' ActivityTaskCanceledEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskCanceledEventAttributes_details :: Lens' ActivityTaskCanceledEventAttributes (Maybe Text)
activityTaskCanceledEventAttributes_details = 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_latestCancelRequestedEventId :: Lens.Lens' ActivityTaskCanceledEventAttributes (Prelude.Maybe Prelude.Integer)
activityTaskCanceledEventAttributes_latestCancelRequestedEventId :: Lens' ActivityTaskCanceledEventAttributes (Maybe Integer)
activityTaskCanceledEventAttributes_latestCancelRequestedEventId = 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_scheduledEventId :: Lens.Lens' ActivityTaskCanceledEventAttributes Prelude.Integer
activityTaskCanceledEventAttributes_scheduledEventId :: Lens' ActivityTaskCanceledEventAttributes Integer
activityTaskCanceledEventAttributes_scheduledEventId = 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 :: Lens' ActivityTaskCanceledEventAttributes Integer
activityTaskCanceledEventAttributes_startedEventId = 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
Data.FromJSON
ActivityTaskCanceledEventAttributes
where
parseJSON :: Value -> Parser ActivityTaskCanceledEventAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActivityTaskCanceledEventAttributes"
( \Object
x ->
Maybe Text
-> Maybe Integer
-> Integer
-> Integer
-> ActivityTaskCanceledEventAttributes
ActivityTaskCanceledEventAttributes'
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
"latestCancelRequestedEventId")
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
ActivityTaskCanceledEventAttributes
where
hashWithSalt :: Int -> ActivityTaskCanceledEventAttributes -> Int
hashWithSalt
Int
_salt
ActivityTaskCanceledEventAttributes' {Integer
Maybe Integer
Maybe Text
startedEventId :: Integer
scheduledEventId :: Integer
latestCancelRequestedEventId :: Maybe Integer
details :: Maybe Text
$sel:startedEventId:ActivityTaskCanceledEventAttributes' :: ActivityTaskCanceledEventAttributes -> Integer
$sel:scheduledEventId:ActivityTaskCanceledEventAttributes' :: ActivityTaskCanceledEventAttributes -> Integer
$sel:latestCancelRequestedEventId:ActivityTaskCanceledEventAttributes' :: ActivityTaskCanceledEventAttributes -> Maybe Integer
$sel:details:ActivityTaskCanceledEventAttributes' :: ActivityTaskCanceledEventAttributes -> 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 Integer
latestCancelRequestedEventId
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
ActivityTaskCanceledEventAttributes
where
rnf :: ActivityTaskCanceledEventAttributes -> ()
rnf ActivityTaskCanceledEventAttributes' {Integer
Maybe Integer
Maybe Text
startedEventId :: Integer
scheduledEventId :: Integer
latestCancelRequestedEventId :: Maybe Integer
details :: Maybe Text
$sel:startedEventId:ActivityTaskCanceledEventAttributes' :: ActivityTaskCanceledEventAttributes -> Integer
$sel:scheduledEventId:ActivityTaskCanceledEventAttributes' :: ActivityTaskCanceledEventAttributes -> Integer
$sel:latestCancelRequestedEventId:ActivityTaskCanceledEventAttributes' :: ActivityTaskCanceledEventAttributes -> Maybe Integer
$sel:details:ActivityTaskCanceledEventAttributes' :: ActivityTaskCanceledEventAttributes -> 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 Integer
latestCancelRequestedEventId
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