{-# 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.StartTimerDecisionAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StartTimerDecisionAttributes = StartTimerDecisionAttributes'
{
StartTimerDecisionAttributes -> Maybe Text
control :: Prelude.Maybe Prelude.Text,
StartTimerDecisionAttributes -> Text
timerId :: Prelude.Text,
StartTimerDecisionAttributes -> Text
startToFireTimeout :: Prelude.Text
}
deriving (StartTimerDecisionAttributes
-> StartTimerDecisionAttributes -> Bool
(StartTimerDecisionAttributes
-> StartTimerDecisionAttributes -> Bool)
-> (StartTimerDecisionAttributes
-> StartTimerDecisionAttributes -> Bool)
-> Eq StartTimerDecisionAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTimerDecisionAttributes
-> StartTimerDecisionAttributes -> Bool
$c/= :: StartTimerDecisionAttributes
-> StartTimerDecisionAttributes -> Bool
== :: StartTimerDecisionAttributes
-> StartTimerDecisionAttributes -> Bool
$c== :: StartTimerDecisionAttributes
-> StartTimerDecisionAttributes -> Bool
Prelude.Eq, ReadPrec [StartTimerDecisionAttributes]
ReadPrec StartTimerDecisionAttributes
Int -> ReadS StartTimerDecisionAttributes
ReadS [StartTimerDecisionAttributes]
(Int -> ReadS StartTimerDecisionAttributes)
-> ReadS [StartTimerDecisionAttributes]
-> ReadPrec StartTimerDecisionAttributes
-> ReadPrec [StartTimerDecisionAttributes]
-> Read StartTimerDecisionAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTimerDecisionAttributes]
$creadListPrec :: ReadPrec [StartTimerDecisionAttributes]
readPrec :: ReadPrec StartTimerDecisionAttributes
$creadPrec :: ReadPrec StartTimerDecisionAttributes
readList :: ReadS [StartTimerDecisionAttributes]
$creadList :: ReadS [StartTimerDecisionAttributes]
readsPrec :: Int -> ReadS StartTimerDecisionAttributes
$creadsPrec :: Int -> ReadS StartTimerDecisionAttributes
Prelude.Read, Int -> StartTimerDecisionAttributes -> ShowS
[StartTimerDecisionAttributes] -> ShowS
StartTimerDecisionAttributes -> String
(Int -> StartTimerDecisionAttributes -> ShowS)
-> (StartTimerDecisionAttributes -> String)
-> ([StartTimerDecisionAttributes] -> ShowS)
-> Show StartTimerDecisionAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTimerDecisionAttributes] -> ShowS
$cshowList :: [StartTimerDecisionAttributes] -> ShowS
show :: StartTimerDecisionAttributes -> String
$cshow :: StartTimerDecisionAttributes -> String
showsPrec :: Int -> StartTimerDecisionAttributes -> ShowS
$cshowsPrec :: Int -> StartTimerDecisionAttributes -> ShowS
Prelude.Show, (forall x.
StartTimerDecisionAttributes -> Rep StartTimerDecisionAttributes x)
-> (forall x.
Rep StartTimerDecisionAttributes x -> StartTimerDecisionAttributes)
-> Generic StartTimerDecisionAttributes
forall x.
Rep StartTimerDecisionAttributes x -> StartTimerDecisionAttributes
forall x.
StartTimerDecisionAttributes -> Rep StartTimerDecisionAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartTimerDecisionAttributes x -> StartTimerDecisionAttributes
$cfrom :: forall x.
StartTimerDecisionAttributes -> Rep StartTimerDecisionAttributes x
Prelude.Generic)
newStartTimerDecisionAttributes ::
Prelude.Text ->
Prelude.Text ->
StartTimerDecisionAttributes
newStartTimerDecisionAttributes :: Text -> Text -> StartTimerDecisionAttributes
newStartTimerDecisionAttributes
Text
pTimerId_
Text
pStartToFireTimeout_ =
StartTimerDecisionAttributes' :: Maybe Text -> Text -> Text -> StartTimerDecisionAttributes
StartTimerDecisionAttributes'
{ $sel:control:StartTimerDecisionAttributes' :: Maybe Text
control =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timerId:StartTimerDecisionAttributes' :: Text
timerId = Text
pTimerId_,
$sel:startToFireTimeout:StartTimerDecisionAttributes' :: Text
startToFireTimeout = Text
pStartToFireTimeout_
}
startTimerDecisionAttributes_control :: Lens.Lens' StartTimerDecisionAttributes (Prelude.Maybe Prelude.Text)
startTimerDecisionAttributes_control :: (Maybe Text -> f (Maybe Text))
-> StartTimerDecisionAttributes -> f StartTimerDecisionAttributes
startTimerDecisionAttributes_control = (StartTimerDecisionAttributes -> Maybe Text)
-> (StartTimerDecisionAttributes
-> Maybe Text -> StartTimerDecisionAttributes)
-> Lens
StartTimerDecisionAttributes
StartTimerDecisionAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTimerDecisionAttributes' {Maybe Text
control :: Maybe Text
$sel:control:StartTimerDecisionAttributes' :: StartTimerDecisionAttributes -> Maybe Text
control} -> Maybe Text
control) (\s :: StartTimerDecisionAttributes
s@StartTimerDecisionAttributes' {} Maybe Text
a -> StartTimerDecisionAttributes
s {$sel:control:StartTimerDecisionAttributes' :: Maybe Text
control = Maybe Text
a} :: StartTimerDecisionAttributes)
startTimerDecisionAttributes_timerId :: Lens.Lens' StartTimerDecisionAttributes Prelude.Text
startTimerDecisionAttributes_timerId :: (Text -> f Text)
-> StartTimerDecisionAttributes -> f StartTimerDecisionAttributes
startTimerDecisionAttributes_timerId = (StartTimerDecisionAttributes -> Text)
-> (StartTimerDecisionAttributes
-> Text -> StartTimerDecisionAttributes)
-> Lens
StartTimerDecisionAttributes StartTimerDecisionAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTimerDecisionAttributes' {Text
timerId :: Text
$sel:timerId:StartTimerDecisionAttributes' :: StartTimerDecisionAttributes -> Text
timerId} -> Text
timerId) (\s :: StartTimerDecisionAttributes
s@StartTimerDecisionAttributes' {} Text
a -> StartTimerDecisionAttributes
s {$sel:timerId:StartTimerDecisionAttributes' :: Text
timerId = Text
a} :: StartTimerDecisionAttributes)
startTimerDecisionAttributes_startToFireTimeout :: Lens.Lens' StartTimerDecisionAttributes Prelude.Text
startTimerDecisionAttributes_startToFireTimeout :: (Text -> f Text)
-> StartTimerDecisionAttributes -> f StartTimerDecisionAttributes
startTimerDecisionAttributes_startToFireTimeout = (StartTimerDecisionAttributes -> Text)
-> (StartTimerDecisionAttributes
-> Text -> StartTimerDecisionAttributes)
-> Lens
StartTimerDecisionAttributes StartTimerDecisionAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTimerDecisionAttributes' {Text
startToFireTimeout :: Text
$sel:startToFireTimeout:StartTimerDecisionAttributes' :: StartTimerDecisionAttributes -> Text
startToFireTimeout} -> Text
startToFireTimeout) (\s :: StartTimerDecisionAttributes
s@StartTimerDecisionAttributes' {} Text
a -> StartTimerDecisionAttributes
s {$sel:startToFireTimeout:StartTimerDecisionAttributes' :: Text
startToFireTimeout = Text
a} :: StartTimerDecisionAttributes)
instance
Prelude.Hashable
StartTimerDecisionAttributes
instance Prelude.NFData StartTimerDecisionAttributes
instance Core.ToJSON StartTimerDecisionAttributes where
toJSON :: StartTimerDecisionAttributes -> Value
toJSON StartTimerDecisionAttributes' {Maybe Text
Text
startToFireTimeout :: Text
timerId :: Text
control :: Maybe Text
$sel:startToFireTimeout:StartTimerDecisionAttributes' :: StartTimerDecisionAttributes -> Text
$sel:timerId:StartTimerDecisionAttributes' :: StartTimerDecisionAttributes -> Text
$sel:control:StartTimerDecisionAttributes' :: StartTimerDecisionAttributes -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"control" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
control,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"timerId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
timerId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"startToFireTimeout" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
startToFireTimeout)
]
)