module Stratosphere.CloudWatch.AnomalyDetector.MetricCharacteristicsProperty (
MetricCharacteristicsProperty(..), mkMetricCharacteristicsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MetricCharacteristicsProperty
=
MetricCharacteristicsProperty {MetricCharacteristicsProperty -> ()
haddock_workaround_ :: (),
MetricCharacteristicsProperty -> Maybe (Value Bool)
periodicSpikes :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (MetricCharacteristicsProperty
-> MetricCharacteristicsProperty -> Bool
(MetricCharacteristicsProperty
-> MetricCharacteristicsProperty -> Bool)
-> (MetricCharacteristicsProperty
-> MetricCharacteristicsProperty -> Bool)
-> Eq MetricCharacteristicsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetricCharacteristicsProperty
-> MetricCharacteristicsProperty -> Bool
== :: MetricCharacteristicsProperty
-> MetricCharacteristicsProperty -> Bool
$c/= :: MetricCharacteristicsProperty
-> MetricCharacteristicsProperty -> Bool
/= :: MetricCharacteristicsProperty
-> MetricCharacteristicsProperty -> Bool
Prelude.Eq, Int -> MetricCharacteristicsProperty -> ShowS
[MetricCharacteristicsProperty] -> ShowS
MetricCharacteristicsProperty -> String
(Int -> MetricCharacteristicsProperty -> ShowS)
-> (MetricCharacteristicsProperty -> String)
-> ([MetricCharacteristicsProperty] -> ShowS)
-> Show MetricCharacteristicsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MetricCharacteristicsProperty -> ShowS
showsPrec :: Int -> MetricCharacteristicsProperty -> ShowS
$cshow :: MetricCharacteristicsProperty -> String
show :: MetricCharacteristicsProperty -> String
$cshowList :: [MetricCharacteristicsProperty] -> ShowS
showList :: [MetricCharacteristicsProperty] -> ShowS
Prelude.Show)
mkMetricCharacteristicsProperty :: MetricCharacteristicsProperty
mkMetricCharacteristicsProperty :: MetricCharacteristicsProperty
mkMetricCharacteristicsProperty
= MetricCharacteristicsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), periodicSpikes :: Maybe (Value Bool)
periodicSpikes = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MetricCharacteristicsProperty where
toResourceProperties :: MetricCharacteristicsProperty -> ResourceProperties
toResourceProperties MetricCharacteristicsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: MetricCharacteristicsProperty -> ()
periodicSpikes :: MetricCharacteristicsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
periodicSpikes :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CloudWatch::AnomalyDetector.MetricCharacteristics",
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
"PeriodicSpikes" (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)
periodicSpikes])}
instance JSON.ToJSON MetricCharacteristicsProperty where
toJSON :: MetricCharacteristicsProperty -> Value
toJSON MetricCharacteristicsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: MetricCharacteristicsProperty -> ()
periodicSpikes :: MetricCharacteristicsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
periodicSpikes :: 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
"PeriodicSpikes" (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)
periodicSpikes]))
instance Property "PeriodicSpikes" MetricCharacteristicsProperty where
type PropertyType "PeriodicSpikes" MetricCharacteristicsProperty = Value Prelude.Bool
set :: PropertyType "PeriodicSpikes" MetricCharacteristicsProperty
-> MetricCharacteristicsProperty -> MetricCharacteristicsProperty
set PropertyType "PeriodicSpikes" MetricCharacteristicsProperty
newValue MetricCharacteristicsProperty {Maybe (Value Bool)
()
haddock_workaround_ :: MetricCharacteristicsProperty -> ()
periodicSpikes :: MetricCharacteristicsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
periodicSpikes :: Maybe (Value Bool)
..}
= MetricCharacteristicsProperty
{periodicSpikes :: Maybe (Value Bool)
periodicSpikes = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PeriodicSpikes" MetricCharacteristicsProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}