module Stratosphere.EC2.LaunchTemplate.MonitoringProperty (
        MonitoringProperty(..), mkMonitoringProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MonitoringProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-monitoring.html>
    MonitoringProperty {MonitoringProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-monitoring.html#cfn-ec2-launchtemplate-monitoring-enabled>
                        MonitoringProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (MonitoringProperty -> MonitoringProperty -> Bool
(MonitoringProperty -> MonitoringProperty -> Bool)
-> (MonitoringProperty -> MonitoringProperty -> Bool)
-> Eq MonitoringProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MonitoringProperty -> MonitoringProperty -> Bool
== :: MonitoringProperty -> MonitoringProperty -> Bool
$c/= :: MonitoringProperty -> MonitoringProperty -> Bool
/= :: MonitoringProperty -> MonitoringProperty -> Bool
Prelude.Eq, Int -> MonitoringProperty -> ShowS
[MonitoringProperty] -> ShowS
MonitoringProperty -> String
(Int -> MonitoringProperty -> ShowS)
-> (MonitoringProperty -> String)
-> ([MonitoringProperty] -> ShowS)
-> Show MonitoringProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MonitoringProperty -> ShowS
showsPrec :: Int -> MonitoringProperty -> ShowS
$cshow :: MonitoringProperty -> String
show :: MonitoringProperty -> String
$cshowList :: [MonitoringProperty] -> ShowS
showList :: [MonitoringProperty] -> ShowS
Prelude.Show)
mkMonitoringProperty :: MonitoringProperty
mkMonitoringProperty :: MonitoringProperty
mkMonitoringProperty
  = MonitoringProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MonitoringProperty where
  toResourceProperties :: MonitoringProperty -> ResourceProperties
toResourceProperties MonitoringProperty {Maybe (Value Bool)
()
haddock_workaround_ :: MonitoringProperty -> ()
enabled :: MonitoringProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.Monitoring",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled])}
instance JSON.ToJSON MonitoringProperty where
  toJSON :: MonitoringProperty -> Value
toJSON MonitoringProperty {Maybe (Value Bool)
()
haddock_workaround_ :: MonitoringProperty -> ()
enabled :: MonitoringProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled]))
instance Property "Enabled" MonitoringProperty where
  type PropertyType "Enabled" MonitoringProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" MonitoringProperty
-> MonitoringProperty -> MonitoringProperty
set PropertyType "Enabled" MonitoringProperty
newValue MonitoringProperty {Maybe (Value Bool)
()
haddock_workaround_ :: MonitoringProperty -> ()
enabled :: MonitoringProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
    = MonitoringProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" MonitoringProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}