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