module Stratosphere.IoTEvents.DetectorModel.SetTimerProperty (
SetTimerProperty(..), mkSetTimerProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SetTimerProperty
=
SetTimerProperty {SetTimerProperty -> ()
haddock_workaround_ :: (),
SetTimerProperty -> Maybe (Value Text)
durationExpression :: (Prelude.Maybe (Value Prelude.Text)),
SetTimerProperty -> Maybe (Value Integer)
seconds :: (Prelude.Maybe (Value Prelude.Integer)),
SetTimerProperty -> Value Text
timerName :: (Value Prelude.Text)}
deriving stock (SetTimerProperty -> SetTimerProperty -> Bool
(SetTimerProperty -> SetTimerProperty -> Bool)
-> (SetTimerProperty -> SetTimerProperty -> Bool)
-> Eq SetTimerProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetTimerProperty -> SetTimerProperty -> Bool
== :: SetTimerProperty -> SetTimerProperty -> Bool
$c/= :: SetTimerProperty -> SetTimerProperty -> Bool
/= :: SetTimerProperty -> SetTimerProperty -> Bool
Prelude.Eq, Int -> SetTimerProperty -> ShowS
[SetTimerProperty] -> ShowS
SetTimerProperty -> String
(Int -> SetTimerProperty -> ShowS)
-> (SetTimerProperty -> String)
-> ([SetTimerProperty] -> ShowS)
-> Show SetTimerProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetTimerProperty -> ShowS
showsPrec :: Int -> SetTimerProperty -> ShowS
$cshow :: SetTimerProperty -> String
show :: SetTimerProperty -> String
$cshowList :: [SetTimerProperty] -> ShowS
showList :: [SetTimerProperty] -> ShowS
Prelude.Show)
mkSetTimerProperty :: Value Prelude.Text -> SetTimerProperty
mkSetTimerProperty :: Value Text -> SetTimerProperty
mkSetTimerProperty Value Text
timerName
= SetTimerProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), timerName :: Value Text
timerName = Value Text
timerName,
durationExpression :: Maybe (Value Text)
durationExpression = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, seconds :: Maybe (Value Integer)
seconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SetTimerProperty where
toResourceProperties :: SetTimerProperty -> ResourceProperties
toResourceProperties SetTimerProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SetTimerProperty -> ()
durationExpression :: SetTimerProperty -> Maybe (Value Text)
seconds :: SetTimerProperty -> Maybe (Value Integer)
timerName :: SetTimerProperty -> Value Text
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
seconds :: Maybe (Value Integer)
timerName :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTEvents::DetectorModel.SetTimer",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"TimerName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
timerName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DurationExpression" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
durationExpression,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Seconds" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
seconds]))}
instance JSON.ToJSON SetTimerProperty where
toJSON :: SetTimerProperty -> Value
toJSON SetTimerProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SetTimerProperty -> ()
durationExpression :: SetTimerProperty -> Maybe (Value Text)
seconds :: SetTimerProperty -> Maybe (Value Integer)
timerName :: SetTimerProperty -> Value Text
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
seconds :: Maybe (Value Integer)
timerName :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"TimerName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
timerName]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DurationExpression" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
durationExpression,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Seconds" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
seconds])))
instance Property "DurationExpression" SetTimerProperty where
type PropertyType "DurationExpression" SetTimerProperty = Value Prelude.Text
set :: PropertyType "DurationExpression" SetTimerProperty
-> SetTimerProperty -> SetTimerProperty
set PropertyType "DurationExpression" SetTimerProperty
newValue SetTimerProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SetTimerProperty -> ()
durationExpression :: SetTimerProperty -> Maybe (Value Text)
seconds :: SetTimerProperty -> Maybe (Value Integer)
timerName :: SetTimerProperty -> Value Text
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
seconds :: Maybe (Value Integer)
timerName :: Value Text
..}
= SetTimerProperty {durationExpression :: Maybe (Value Text)
durationExpression = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DurationExpression" SetTimerProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
seconds :: Maybe (Value Integer)
timerName :: Value Text
haddock_workaround_ :: ()
seconds :: Maybe (Value Integer)
timerName :: Value Text
..}
instance Property "Seconds" SetTimerProperty where
type PropertyType "Seconds" SetTimerProperty = Value Prelude.Integer
set :: PropertyType "Seconds" SetTimerProperty
-> SetTimerProperty -> SetTimerProperty
set PropertyType "Seconds" SetTimerProperty
newValue SetTimerProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SetTimerProperty -> ()
durationExpression :: SetTimerProperty -> Maybe (Value Text)
seconds :: SetTimerProperty -> Maybe (Value Integer)
timerName :: SetTimerProperty -> Value Text
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
seconds :: Maybe (Value Integer)
timerName :: Value Text
..}
= SetTimerProperty {seconds :: Maybe (Value Integer)
seconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Seconds" SetTimerProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
timerName :: Value Text
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
timerName :: Value Text
..}
instance Property "TimerName" SetTimerProperty where
type PropertyType "TimerName" SetTimerProperty = Value Prelude.Text
set :: PropertyType "TimerName" SetTimerProperty
-> SetTimerProperty -> SetTimerProperty
set PropertyType "TimerName" SetTimerProperty
newValue SetTimerProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SetTimerProperty -> ()
durationExpression :: SetTimerProperty -> Maybe (Value Text)
seconds :: SetTimerProperty -> Maybe (Value Integer)
timerName :: SetTimerProperty -> Value Text
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
seconds :: Maybe (Value Integer)
timerName :: Value Text
..}
= SetTimerProperty {timerName :: Value Text
timerName = PropertyType "TimerName" SetTimerProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
seconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
durationExpression :: Maybe (Value Text)
seconds :: Maybe (Value Integer)
..}