module Stratosphere.CodeDeploy.DeploymentGroup.AlarmConfigurationProperty (
        module Exports, AlarmConfigurationProperty(..),
        mkAlarmConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodeDeploy.DeploymentGroup.AlarmProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AlarmConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html>
    AlarmConfigurationProperty {AlarmConfigurationProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html#cfn-codedeploy-deploymentgroup-alarmconfiguration-alarms>
                                AlarmConfigurationProperty -> Maybe [AlarmProperty]
alarms :: (Prelude.Maybe [AlarmProperty]),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html#cfn-codedeploy-deploymentgroup-alarmconfiguration-enabled>
                                AlarmConfigurationProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-alarmconfiguration.html#cfn-codedeploy-deploymentgroup-alarmconfiguration-ignorepollalarmfailure>
                                AlarmConfigurationProperty -> Maybe (Value Bool)
ignorePollAlarmFailure :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (AlarmConfigurationProperty -> AlarmConfigurationProperty -> Bool
(AlarmConfigurationProperty -> AlarmConfigurationProperty -> Bool)
-> (AlarmConfigurationProperty
    -> AlarmConfigurationProperty -> Bool)
-> Eq AlarmConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AlarmConfigurationProperty -> AlarmConfigurationProperty -> Bool
== :: AlarmConfigurationProperty -> AlarmConfigurationProperty -> Bool
$c/= :: AlarmConfigurationProperty -> AlarmConfigurationProperty -> Bool
/= :: AlarmConfigurationProperty -> AlarmConfigurationProperty -> Bool
Prelude.Eq, Int -> AlarmConfigurationProperty -> ShowS
[AlarmConfigurationProperty] -> ShowS
AlarmConfigurationProperty -> String
(Int -> AlarmConfigurationProperty -> ShowS)
-> (AlarmConfigurationProperty -> String)
-> ([AlarmConfigurationProperty] -> ShowS)
-> Show AlarmConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AlarmConfigurationProperty -> ShowS
showsPrec :: Int -> AlarmConfigurationProperty -> ShowS
$cshow :: AlarmConfigurationProperty -> String
show :: AlarmConfigurationProperty -> String
$cshowList :: [AlarmConfigurationProperty] -> ShowS
showList :: [AlarmConfigurationProperty] -> ShowS
Prelude.Show)
mkAlarmConfigurationProperty :: AlarmConfigurationProperty
mkAlarmConfigurationProperty :: AlarmConfigurationProperty
mkAlarmConfigurationProperty
  = AlarmConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), alarms :: Maybe [AlarmProperty]
alarms = Maybe [AlarmProperty]
forall a. Maybe a
Prelude.Nothing,
       enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       ignorePollAlarmFailure :: Maybe (Value Bool)
ignorePollAlarmFailure = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AlarmConfigurationProperty where
  toResourceProperties :: AlarmConfigurationProperty -> ResourceProperties
toResourceProperties AlarmConfigurationProperty {Maybe [AlarmProperty]
Maybe (Value Bool)
()
haddock_workaround_ :: AlarmConfigurationProperty -> ()
alarms :: AlarmConfigurationProperty -> Maybe [AlarmProperty]
enabled :: AlarmConfigurationProperty -> Maybe (Value Bool)
ignorePollAlarmFailure :: AlarmConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
enabled :: Maybe (Value Bool)
ignorePollAlarmFailure :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CodeDeploy::DeploymentGroup.AlarmConfiguration",
         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 -> [AlarmProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Alarms" ([AlarmProperty] -> (Key, Value))
-> Maybe [AlarmProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AlarmProperty]
alarms,
                            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,
                            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
"IgnorePollAlarmFailure"
                              (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)
ignorePollAlarmFailure])}
instance JSON.ToJSON AlarmConfigurationProperty where
  toJSON :: AlarmConfigurationProperty -> Value
toJSON AlarmConfigurationProperty {Maybe [AlarmProperty]
Maybe (Value Bool)
()
haddock_workaround_ :: AlarmConfigurationProperty -> ()
alarms :: AlarmConfigurationProperty -> Maybe [AlarmProperty]
enabled :: AlarmConfigurationProperty -> Maybe (Value Bool)
ignorePollAlarmFailure :: AlarmConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
enabled :: Maybe (Value Bool)
ignorePollAlarmFailure :: 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 -> [AlarmProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Alarms" ([AlarmProperty] -> (Key, Value))
-> Maybe [AlarmProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AlarmProperty]
alarms,
               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,
               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
"IgnorePollAlarmFailure"
                 (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)
ignorePollAlarmFailure]))
instance Property "Alarms" AlarmConfigurationProperty where
  type PropertyType "Alarms" AlarmConfigurationProperty = [AlarmProperty]
  set :: PropertyType "Alarms" AlarmConfigurationProperty
-> AlarmConfigurationProperty -> AlarmConfigurationProperty
set PropertyType "Alarms" AlarmConfigurationProperty
newValue AlarmConfigurationProperty {Maybe [AlarmProperty]
Maybe (Value Bool)
()
haddock_workaround_ :: AlarmConfigurationProperty -> ()
alarms :: AlarmConfigurationProperty -> Maybe [AlarmProperty]
enabled :: AlarmConfigurationProperty -> Maybe (Value Bool)
ignorePollAlarmFailure :: AlarmConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
enabled :: Maybe (Value Bool)
ignorePollAlarmFailure :: Maybe (Value Bool)
..}
    = AlarmConfigurationProperty {alarms :: Maybe [AlarmProperty]
alarms = [AlarmProperty] -> Maybe [AlarmProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [AlarmProperty]
PropertyType "Alarms" AlarmConfigurationProperty
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ignorePollAlarmFailure :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
ignorePollAlarmFailure :: Maybe (Value Bool)
..}
instance Property "Enabled" AlarmConfigurationProperty where
  type PropertyType "Enabled" AlarmConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" AlarmConfigurationProperty
-> AlarmConfigurationProperty -> AlarmConfigurationProperty
set PropertyType "Enabled" AlarmConfigurationProperty
newValue AlarmConfigurationProperty {Maybe [AlarmProperty]
Maybe (Value Bool)
()
haddock_workaround_ :: AlarmConfigurationProperty -> ()
alarms :: AlarmConfigurationProperty -> Maybe [AlarmProperty]
enabled :: AlarmConfigurationProperty -> Maybe (Value Bool)
ignorePollAlarmFailure :: AlarmConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
enabled :: Maybe (Value Bool)
ignorePollAlarmFailure :: Maybe (Value Bool)
..}
    = AlarmConfigurationProperty {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" AlarmConfigurationProperty
Value Bool
newValue, Maybe [AlarmProperty]
Maybe (Value Bool)
()
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
ignorePollAlarmFailure :: Maybe (Value Bool)
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
ignorePollAlarmFailure :: Maybe (Value Bool)
..}
instance Property "IgnorePollAlarmFailure" AlarmConfigurationProperty where
  type PropertyType "IgnorePollAlarmFailure" AlarmConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "IgnorePollAlarmFailure" AlarmConfigurationProperty
-> AlarmConfigurationProperty -> AlarmConfigurationProperty
set PropertyType "IgnorePollAlarmFailure" AlarmConfigurationProperty
newValue AlarmConfigurationProperty {Maybe [AlarmProperty]
Maybe (Value Bool)
()
haddock_workaround_ :: AlarmConfigurationProperty -> ()
alarms :: AlarmConfigurationProperty -> Maybe [AlarmProperty]
enabled :: AlarmConfigurationProperty -> Maybe (Value Bool)
ignorePollAlarmFailure :: AlarmConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
enabled :: Maybe (Value Bool)
ignorePollAlarmFailure :: Maybe (Value Bool)
..}
    = AlarmConfigurationProperty
        {ignorePollAlarmFailure :: Maybe (Value Bool)
ignorePollAlarmFailure = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IgnorePollAlarmFailure" AlarmConfigurationProperty
Value Bool
newValue, Maybe [AlarmProperty]
Maybe (Value Bool)
()
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
alarms :: Maybe [AlarmProperty]
enabled :: Maybe (Value Bool)
..}