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