module Stratosphere.IoTSiteWise.Portal.AlarmsProperty (
AlarmsProperty(..), mkAlarmsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AlarmsProperty
=
AlarmsProperty {AlarmsProperty -> ()
haddock_workaround_ :: (),
AlarmsProperty -> Maybe (Value Text)
alarmRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
AlarmsProperty -> Maybe (Value Text)
notificationLambdaArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (AlarmsProperty -> AlarmsProperty -> Bool
(AlarmsProperty -> AlarmsProperty -> Bool)
-> (AlarmsProperty -> AlarmsProperty -> Bool) -> Eq AlarmsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AlarmsProperty -> AlarmsProperty -> Bool
== :: AlarmsProperty -> AlarmsProperty -> Bool
$c/= :: AlarmsProperty -> AlarmsProperty -> Bool
/= :: AlarmsProperty -> AlarmsProperty -> Bool
Prelude.Eq, Int -> AlarmsProperty -> ShowS
[AlarmsProperty] -> ShowS
AlarmsProperty -> String
(Int -> AlarmsProperty -> ShowS)
-> (AlarmsProperty -> String)
-> ([AlarmsProperty] -> ShowS)
-> Show AlarmsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AlarmsProperty -> ShowS
showsPrec :: Int -> AlarmsProperty -> ShowS
$cshow :: AlarmsProperty -> String
show :: AlarmsProperty -> String
$cshowList :: [AlarmsProperty] -> ShowS
showList :: [AlarmsProperty] -> ShowS
Prelude.Show)
mkAlarmsProperty :: AlarmsProperty
mkAlarmsProperty :: AlarmsProperty
mkAlarmsProperty
= AlarmsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), alarmRoleArn :: Maybe (Value Text)
alarmRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
notificationLambdaArn :: Maybe (Value Text)
notificationLambdaArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AlarmsProperty where
toResourceProperties :: AlarmsProperty -> ResourceProperties
toResourceProperties AlarmsProperty {Maybe (Value Text)
()
haddock_workaround_ :: AlarmsProperty -> ()
alarmRoleArn :: AlarmsProperty -> Maybe (Value Text)
notificationLambdaArn :: AlarmsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmRoleArn :: Maybe (Value Text)
notificationLambdaArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTSiteWise::Portal.Alarms",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"AlarmRoleArn" (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)
alarmRoleArn,
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
"NotificationLambdaArn"
(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)
notificationLambdaArn])}
instance JSON.ToJSON AlarmsProperty where
toJSON :: AlarmsProperty -> Value
toJSON AlarmsProperty {Maybe (Value Text)
()
haddock_workaround_ :: AlarmsProperty -> ()
alarmRoleArn :: AlarmsProperty -> Maybe (Value Text)
notificationLambdaArn :: AlarmsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmRoleArn :: Maybe (Value Text)
notificationLambdaArn :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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
"AlarmRoleArn" (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)
alarmRoleArn,
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
"NotificationLambdaArn"
(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)
notificationLambdaArn]))
instance Property "AlarmRoleArn" AlarmsProperty where
type PropertyType "AlarmRoleArn" AlarmsProperty = Value Prelude.Text
set :: PropertyType "AlarmRoleArn" AlarmsProperty
-> AlarmsProperty -> AlarmsProperty
set PropertyType "AlarmRoleArn" AlarmsProperty
newValue AlarmsProperty {Maybe (Value Text)
()
haddock_workaround_ :: AlarmsProperty -> ()
alarmRoleArn :: AlarmsProperty -> Maybe (Value Text)
notificationLambdaArn :: AlarmsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmRoleArn :: Maybe (Value Text)
notificationLambdaArn :: Maybe (Value Text)
..}
= AlarmsProperty {alarmRoleArn :: Maybe (Value Text)
alarmRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AlarmRoleArn" AlarmsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
notificationLambdaArn :: Maybe (Value Text)
haddock_workaround_ :: ()
notificationLambdaArn :: Maybe (Value Text)
..}
instance Property "NotificationLambdaArn" AlarmsProperty where
type PropertyType "NotificationLambdaArn" AlarmsProperty = Value Prelude.Text
set :: PropertyType "NotificationLambdaArn" AlarmsProperty
-> AlarmsProperty -> AlarmsProperty
set PropertyType "NotificationLambdaArn" AlarmsProperty
newValue AlarmsProperty {Maybe (Value Text)
()
haddock_workaround_ :: AlarmsProperty -> ()
alarmRoleArn :: AlarmsProperty -> Maybe (Value Text)
notificationLambdaArn :: AlarmsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmRoleArn :: Maybe (Value Text)
notificationLambdaArn :: Maybe (Value Text)
..}
= AlarmsProperty
{notificationLambdaArn :: Maybe (Value Text)
notificationLambdaArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NotificationLambdaArn" AlarmsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
alarmRoleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
alarmRoleArn :: Maybe (Value Text)
..}