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