module Stratosphere.MediaLive.CloudWatchAlarmTemplateGroup (
        CloudWatchAlarmTemplateGroup(..), mkCloudWatchAlarmTemplateGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CloudWatchAlarmTemplateGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-cloudwatchalarmtemplategroup.html>
    CloudWatchAlarmTemplateGroup {CloudWatchAlarmTemplateGroup -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-cloudwatchalarmtemplategroup.html#cfn-medialive-cloudwatchalarmtemplategroup-description>
                                  CloudWatchAlarmTemplateGroup -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-cloudwatchalarmtemplategroup.html#cfn-medialive-cloudwatchalarmtemplategroup-name>
                                  CloudWatchAlarmTemplateGroup -> Value Text
name :: (Value Prelude.Text),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-cloudwatchalarmtemplategroup.html#cfn-medialive-cloudwatchalarmtemplategroup-tags>
                                  CloudWatchAlarmTemplateGroup -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
  deriving stock (CloudWatchAlarmTemplateGroup
-> CloudWatchAlarmTemplateGroup -> Bool
(CloudWatchAlarmTemplateGroup
 -> CloudWatchAlarmTemplateGroup -> Bool)
-> (CloudWatchAlarmTemplateGroup
    -> CloudWatchAlarmTemplateGroup -> Bool)
-> Eq CloudWatchAlarmTemplateGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CloudWatchAlarmTemplateGroup
-> CloudWatchAlarmTemplateGroup -> Bool
== :: CloudWatchAlarmTemplateGroup
-> CloudWatchAlarmTemplateGroup -> Bool
$c/= :: CloudWatchAlarmTemplateGroup
-> CloudWatchAlarmTemplateGroup -> Bool
/= :: CloudWatchAlarmTemplateGroup
-> CloudWatchAlarmTemplateGroup -> Bool
Prelude.Eq, Int -> CloudWatchAlarmTemplateGroup -> ShowS
[CloudWatchAlarmTemplateGroup] -> ShowS
CloudWatchAlarmTemplateGroup -> String
(Int -> CloudWatchAlarmTemplateGroup -> ShowS)
-> (CloudWatchAlarmTemplateGroup -> String)
-> ([CloudWatchAlarmTemplateGroup] -> ShowS)
-> Show CloudWatchAlarmTemplateGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CloudWatchAlarmTemplateGroup -> ShowS
showsPrec :: Int -> CloudWatchAlarmTemplateGroup -> ShowS
$cshow :: CloudWatchAlarmTemplateGroup -> String
show :: CloudWatchAlarmTemplateGroup -> String
$cshowList :: [CloudWatchAlarmTemplateGroup] -> ShowS
showList :: [CloudWatchAlarmTemplateGroup] -> ShowS
Prelude.Show)
mkCloudWatchAlarmTemplateGroup ::
  Value Prelude.Text -> CloudWatchAlarmTemplateGroup
mkCloudWatchAlarmTemplateGroup :: Value Text -> CloudWatchAlarmTemplateGroup
mkCloudWatchAlarmTemplateGroup Value Text
name
  = CloudWatchAlarmTemplateGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CloudWatchAlarmTemplateGroup where
  toResourceProperties :: CloudWatchAlarmTemplateGroup -> ResourceProperties
toResourceProperties CloudWatchAlarmTemplateGroup {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudWatchAlarmTemplateGroup -> ()
description :: CloudWatchAlarmTemplateGroup -> Maybe (Value Text)
name :: CloudWatchAlarmTemplateGroup -> Value Text
tags :: CloudWatchAlarmTemplateGroup -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::CloudWatchAlarmTemplateGroup",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Name" 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
name]
                           ([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
"Description" (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)
description,
                               Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON CloudWatchAlarmTemplateGroup where
  toJSON :: CloudWatchAlarmTemplateGroup -> Value
toJSON CloudWatchAlarmTemplateGroup {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudWatchAlarmTemplateGroup -> ()
description :: CloudWatchAlarmTemplateGroup -> Maybe (Value Text)
name :: CloudWatchAlarmTemplateGroup -> Value Text
tags :: CloudWatchAlarmTemplateGroup -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (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
"Name" 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
name]
              ([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
"Description" (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)
description,
                  Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "Description" CloudWatchAlarmTemplateGroup where
  type PropertyType "Description" CloudWatchAlarmTemplateGroup = Value Prelude.Text
  set :: PropertyType "Description" CloudWatchAlarmTemplateGroup
-> CloudWatchAlarmTemplateGroup -> CloudWatchAlarmTemplateGroup
set PropertyType "Description" CloudWatchAlarmTemplateGroup
newValue CloudWatchAlarmTemplateGroup {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudWatchAlarmTemplateGroup -> ()
description :: CloudWatchAlarmTemplateGroup -> Maybe (Value Text)
name :: CloudWatchAlarmTemplateGroup -> Value Text
tags :: CloudWatchAlarmTemplateGroup -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = CloudWatchAlarmTemplateGroup
        {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" CloudWatchAlarmTemplateGroup
Value Text
newValue, Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Name" CloudWatchAlarmTemplateGroup where
  type PropertyType "Name" CloudWatchAlarmTemplateGroup = Value Prelude.Text
  set :: PropertyType "Name" CloudWatchAlarmTemplateGroup
-> CloudWatchAlarmTemplateGroup -> CloudWatchAlarmTemplateGroup
set PropertyType "Name" CloudWatchAlarmTemplateGroup
newValue CloudWatchAlarmTemplateGroup {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudWatchAlarmTemplateGroup -> ()
description :: CloudWatchAlarmTemplateGroup -> Maybe (Value Text)
name :: CloudWatchAlarmTemplateGroup -> Value Text
tags :: CloudWatchAlarmTemplateGroup -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = CloudWatchAlarmTemplateGroup {name :: Value Text
name = PropertyType "Name" CloudWatchAlarmTemplateGroup
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" CloudWatchAlarmTemplateGroup where
  type PropertyType "Tags" CloudWatchAlarmTemplateGroup = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" CloudWatchAlarmTemplateGroup
-> CloudWatchAlarmTemplateGroup -> CloudWatchAlarmTemplateGroup
set PropertyType "Tags" CloudWatchAlarmTemplateGroup
newValue CloudWatchAlarmTemplateGroup {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: CloudWatchAlarmTemplateGroup -> ()
description :: CloudWatchAlarmTemplateGroup -> Maybe (Value Text)
name :: CloudWatchAlarmTemplateGroup -> Value Text
tags :: CloudWatchAlarmTemplateGroup -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = CloudWatchAlarmTemplateGroup {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" CloudWatchAlarmTemplateGroup
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
..}