module Stratosphere.ApplicationInsights.Application.AlarmProperty (
        AlarmProperty(..), mkAlarmProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AlarmProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html>
    AlarmProperty {AlarmProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html#cfn-applicationinsights-application-alarm-alarmname>
                   AlarmProperty -> Value Text
alarmName :: (Value Prelude.Text),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html#cfn-applicationinsights-application-alarm-severity>
                   AlarmProperty -> Maybe (Value Text)
severity :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AlarmProperty -> AlarmProperty -> Bool
(AlarmProperty -> AlarmProperty -> Bool)
-> (AlarmProperty -> AlarmProperty -> Bool) -> Eq AlarmProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AlarmProperty -> AlarmProperty -> Bool
== :: AlarmProperty -> AlarmProperty -> Bool
$c/= :: AlarmProperty -> AlarmProperty -> Bool
/= :: AlarmProperty -> AlarmProperty -> Bool
Prelude.Eq, Int -> AlarmProperty -> ShowS
[AlarmProperty] -> ShowS
AlarmProperty -> String
(Int -> AlarmProperty -> ShowS)
-> (AlarmProperty -> String)
-> ([AlarmProperty] -> ShowS)
-> Show AlarmProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AlarmProperty -> ShowS
showsPrec :: Int -> AlarmProperty -> ShowS
$cshow :: AlarmProperty -> String
show :: AlarmProperty -> String
$cshowList :: [AlarmProperty] -> ShowS
showList :: [AlarmProperty] -> ShowS
Prelude.Show)
mkAlarmProperty :: Value Prelude.Text -> AlarmProperty
mkAlarmProperty :: Value Text -> AlarmProperty
mkAlarmProperty Value Text
alarmName
  = AlarmProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), alarmName :: Value Text
alarmName = Value Text
alarmName,
       severity :: Maybe (Value Text)
severity = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AlarmProperty where
  toResourceProperties :: AlarmProperty -> ResourceProperties
toResourceProperties AlarmProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AlarmProperty -> ()
alarmName :: AlarmProperty -> Value Text
severity :: AlarmProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmName :: Value Text
severity :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationInsights::Application.Alarm",
         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
"AlarmName" 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
alarmName]
                           ([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
"Severity" (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)
severity]))}
instance JSON.ToJSON AlarmProperty where
  toJSON :: AlarmProperty -> Value
toJSON AlarmProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AlarmProperty -> ()
alarmName :: AlarmProperty -> Value Text
severity :: AlarmProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmName :: Value Text
severity :: Maybe (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
"AlarmName" 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
alarmName]
              ([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
"Severity" (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)
severity])))
instance Property "AlarmName" AlarmProperty where
  type PropertyType "AlarmName" AlarmProperty = Value Prelude.Text
  set :: PropertyType "AlarmName" AlarmProperty
-> AlarmProperty -> AlarmProperty
set PropertyType "AlarmName" AlarmProperty
newValue AlarmProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AlarmProperty -> ()
alarmName :: AlarmProperty -> Value Text
severity :: AlarmProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmName :: Value Text
severity :: Maybe (Value Text)
..}
    = AlarmProperty {alarmName :: Value Text
alarmName = PropertyType "AlarmName" AlarmProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
severity :: Maybe (Value Text)
haddock_workaround_ :: ()
severity :: Maybe (Value Text)
..}
instance Property "Severity" AlarmProperty where
  type PropertyType "Severity" AlarmProperty = Value Prelude.Text
  set :: PropertyType "Severity" AlarmProperty
-> AlarmProperty -> AlarmProperty
set PropertyType "Severity" AlarmProperty
newValue AlarmProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AlarmProperty -> ()
alarmName :: AlarmProperty -> Value Text
severity :: AlarmProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmName :: Value Text
severity :: Maybe (Value Text)
..}
    = AlarmProperty {severity :: Maybe (Value Text)
severity = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Severity" AlarmProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
alarmName :: Value Text
haddock_workaround_ :: ()
alarmName :: Value Text
..}