module Stratosphere.AppConfig.Environment.MonitorProperty (
        MonitorProperty(..), mkMonitorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MonitorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appconfig-environment-monitor.html>
    MonitorProperty {MonitorProperty -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appconfig-environment-monitor.html#cfn-appconfig-environment-monitor-alarmarn>
                     MonitorProperty -> Value Text
alarmArn :: (Value Prelude.Text),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appconfig-environment-monitor.html#cfn-appconfig-environment-monitor-alarmrolearn>
                     MonitorProperty -> Maybe (Value Text)
alarmRoleArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (MonitorProperty -> MonitorProperty -> Bool
(MonitorProperty -> MonitorProperty -> Bool)
-> (MonitorProperty -> MonitorProperty -> Bool)
-> Eq MonitorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MonitorProperty -> MonitorProperty -> Bool
== :: MonitorProperty -> MonitorProperty -> Bool
$c/= :: MonitorProperty -> MonitorProperty -> Bool
/= :: MonitorProperty -> MonitorProperty -> Bool
Prelude.Eq, Int -> MonitorProperty -> ShowS
[MonitorProperty] -> ShowS
MonitorProperty -> String
(Int -> MonitorProperty -> ShowS)
-> (MonitorProperty -> String)
-> ([MonitorProperty] -> ShowS)
-> Show MonitorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MonitorProperty -> ShowS
showsPrec :: Int -> MonitorProperty -> ShowS
$cshow :: MonitorProperty -> String
show :: MonitorProperty -> String
$cshowList :: [MonitorProperty] -> ShowS
showList :: [MonitorProperty] -> ShowS
Prelude.Show)
mkMonitorProperty :: Value Prelude.Text -> MonitorProperty
mkMonitorProperty :: Value Text -> MonitorProperty
mkMonitorProperty Value Text
alarmArn
  = MonitorProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), alarmArn :: Value Text
alarmArn = Value Text
alarmArn,
       alarmRoleArn :: Maybe (Value Text)
alarmRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MonitorProperty where
  toResourceProperties :: MonitorProperty -> ResourceProperties
toResourceProperties MonitorProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MonitorProperty -> ()
alarmArn :: MonitorProperty -> Value Text
alarmRoleArn :: MonitorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmArn :: Value Text
alarmRoleArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppConfig::Environment.Monitor",
         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
"AlarmArn" 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
alarmArn]
                           ([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]))}
instance JSON.ToJSON MonitorProperty where
  toJSON :: MonitorProperty -> Value
toJSON MonitorProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MonitorProperty -> ()
alarmArn :: MonitorProperty -> Value Text
alarmRoleArn :: MonitorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmArn :: Value Text
alarmRoleArn :: 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
"AlarmArn" 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
alarmArn]
              ([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])))
instance Property "AlarmArn" MonitorProperty where
  type PropertyType "AlarmArn" MonitorProperty = Value Prelude.Text
  set :: PropertyType "AlarmArn" MonitorProperty
-> MonitorProperty -> MonitorProperty
set PropertyType "AlarmArn" MonitorProperty
newValue MonitorProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MonitorProperty -> ()
alarmArn :: MonitorProperty -> Value Text
alarmRoleArn :: MonitorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmArn :: Value Text
alarmRoleArn :: Maybe (Value Text)
..}
    = MonitorProperty {alarmArn :: Value Text
alarmArn = PropertyType "AlarmArn" MonitorProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
alarmRoleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
alarmRoleArn :: Maybe (Value Text)
..}
instance Property "AlarmRoleArn" MonitorProperty where
  type PropertyType "AlarmRoleArn" MonitorProperty = Value Prelude.Text
  set :: PropertyType "AlarmRoleArn" MonitorProperty
-> MonitorProperty -> MonitorProperty
set PropertyType "AlarmRoleArn" MonitorProperty
newValue MonitorProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: MonitorProperty -> ()
alarmArn :: MonitorProperty -> Value Text
alarmRoleArn :: MonitorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alarmArn :: Value Text
alarmRoleArn :: Maybe (Value Text)
..}
    = MonitorProperty {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" MonitorProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
alarmArn :: Value Text
haddock_workaround_ :: ()
alarmArn :: Value Text
..}