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