{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:identity:ActivityTaskStartedEventAttributes' :: Maybe Text
identity =
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledEventId:ActivityTaskStartedEventAttributes' :: Integer
scheduledEventId = Integer
pScheduledEventId_
}
activityTaskStartedEventAttributes_identity :: Lens.Lens' ActivityTaskStartedEventAttributes (Prelude.Maybe Prelude.Text)
activityTaskStartedEventAttributes_identity :: Lens' ActivityTaskStartedEventAttributes (Maybe Text)
activityTaskStartedEventAttributes_identity = 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 :: Lens' ActivityTaskStartedEventAttributes Integer
activityTaskStartedEventAttributes_scheduledEventId = 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
Data.FromJSON
ActivityTaskStartedEventAttributes
where
parseJSON :: Value -> Parser ActivityTaskStartedEventAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActivityTaskStartedEventAttributes"
( \Object
x ->
Maybe Text -> Integer -> ActivityTaskStartedEventAttributes
ActivityTaskStartedEventAttributes'
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
"identity")
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")
)
instance
Prelude.Hashable
ActivityTaskStartedEventAttributes
where
hashWithSalt :: Int -> ActivityTaskStartedEventAttributes -> Int
hashWithSalt
Int
_salt
ActivityTaskStartedEventAttributes' {Integer
Maybe Text
scheduledEventId :: Integer
identity :: Maybe Text
$sel:scheduledEventId:ActivityTaskStartedEventAttributes' :: ActivityTaskStartedEventAttributes -> Integer
$sel:identity:ActivityTaskStartedEventAttributes' :: ActivityTaskStartedEventAttributes -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
identity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
scheduledEventId
instance
Prelude.NFData
ActivityTaskStartedEventAttributes
where
rnf :: ActivityTaskStartedEventAttributes -> ()
rnf ActivityTaskStartedEventAttributes' {Integer
Maybe Text
scheduledEventId :: Integer
identity :: Maybe Text
$sel:scheduledEventId:ActivityTaskStartedEventAttributes' :: ActivityTaskStartedEventAttributes -> Integer
$sel:identity:ActivityTaskStartedEventAttributes' :: ActivityTaskStartedEventAttributes -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
identity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
scheduledEventId