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