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