module Stratosphere.ApplicationAutoScaling.ScalingPolicy.PredictiveScalingMetricStatProperty (
module Exports, PredictiveScalingMetricStatProperty(..),
mkPredictiveScalingMetricStatProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ApplicationAutoScaling.ScalingPolicy.PredictiveScalingMetricProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PredictiveScalingMetricStatProperty
=
PredictiveScalingMetricStatProperty {PredictiveScalingMetricStatProperty -> ()
haddock_workaround_ :: (),
PredictiveScalingMetricStatProperty
-> Maybe PredictiveScalingMetricProperty
metric :: (Prelude.Maybe PredictiveScalingMetricProperty),
PredictiveScalingMetricStatProperty -> Maybe (Value Text)
stat :: (Prelude.Maybe (Value Prelude.Text)),
PredictiveScalingMetricStatProperty -> Maybe (Value Text)
unit :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty -> Bool
(PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty -> Bool)
-> (PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty -> Bool)
-> Eq PredictiveScalingMetricStatProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty -> Bool
== :: PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty -> Bool
$c/= :: PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty -> Bool
/= :: PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty -> Bool
Prelude.Eq, Int -> PredictiveScalingMetricStatProperty -> ShowS
[PredictiveScalingMetricStatProperty] -> ShowS
PredictiveScalingMetricStatProperty -> String
(Int -> PredictiveScalingMetricStatProperty -> ShowS)
-> (PredictiveScalingMetricStatProperty -> String)
-> ([PredictiveScalingMetricStatProperty] -> ShowS)
-> Show PredictiveScalingMetricStatProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PredictiveScalingMetricStatProperty -> ShowS
showsPrec :: Int -> PredictiveScalingMetricStatProperty -> ShowS
$cshow :: PredictiveScalingMetricStatProperty -> String
show :: PredictiveScalingMetricStatProperty -> String
$cshowList :: [PredictiveScalingMetricStatProperty] -> ShowS
showList :: [PredictiveScalingMetricStatProperty] -> ShowS
Prelude.Show)
mkPredictiveScalingMetricStatProperty ::
PredictiveScalingMetricStatProperty
mkPredictiveScalingMetricStatProperty :: PredictiveScalingMetricStatProperty
mkPredictiveScalingMetricStatProperty
= PredictiveScalingMetricStatProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), metric :: Maybe PredictiveScalingMetricProperty
metric = Maybe PredictiveScalingMetricProperty
forall a. Maybe a
Prelude.Nothing,
stat :: Maybe (Value Text)
stat = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, unit :: Maybe (Value Text)
unit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PredictiveScalingMetricStatProperty where
toResourceProperties :: PredictiveScalingMetricStatProperty -> ResourceProperties
toResourceProperties PredictiveScalingMetricStatProperty {Maybe (Value Text)
Maybe PredictiveScalingMetricProperty
()
haddock_workaround_ :: PredictiveScalingMetricStatProperty -> ()
metric :: PredictiveScalingMetricStatProperty
-> Maybe PredictiveScalingMetricProperty
stat :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
unit :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApplicationAutoScaling::ScalingPolicy.PredictiveScalingMetricStat",
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 -> PredictiveScalingMetricProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Metric" (PredictiveScalingMetricProperty -> (Key, Value))
-> Maybe PredictiveScalingMetricProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PredictiveScalingMetricProperty
metric,
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
"Stat" (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)
stat,
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
"Unit" (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)
unit])}
instance JSON.ToJSON PredictiveScalingMetricStatProperty where
toJSON :: PredictiveScalingMetricStatProperty -> Value
toJSON PredictiveScalingMetricStatProperty {Maybe (Value Text)
Maybe PredictiveScalingMetricProperty
()
haddock_workaround_ :: PredictiveScalingMetricStatProperty -> ()
metric :: PredictiveScalingMetricStatProperty
-> Maybe PredictiveScalingMetricProperty
stat :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
unit :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
= [(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 -> PredictiveScalingMetricProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Metric" (PredictiveScalingMetricProperty -> (Key, Value))
-> Maybe PredictiveScalingMetricProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PredictiveScalingMetricProperty
metric,
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
"Stat" (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)
stat,
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
"Unit" (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)
unit]))
instance Property "Metric" PredictiveScalingMetricStatProperty where
type PropertyType "Metric" PredictiveScalingMetricStatProperty = PredictiveScalingMetricProperty
set :: PropertyType "Metric" PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty
set PropertyType "Metric" PredictiveScalingMetricStatProperty
newValue PredictiveScalingMetricStatProperty {Maybe (Value Text)
Maybe PredictiveScalingMetricProperty
()
haddock_workaround_ :: PredictiveScalingMetricStatProperty -> ()
metric :: PredictiveScalingMetricStatProperty
-> Maybe PredictiveScalingMetricProperty
stat :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
unit :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
= PredictiveScalingMetricStatProperty
{metric :: Maybe PredictiveScalingMetricProperty
metric = PredictiveScalingMetricProperty
-> Maybe PredictiveScalingMetricProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Metric" PredictiveScalingMetricStatProperty
PredictiveScalingMetricProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
instance Property "Stat" PredictiveScalingMetricStatProperty where
type PropertyType "Stat" PredictiveScalingMetricStatProperty = Value Prelude.Text
set :: PropertyType "Stat" PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty
set PropertyType "Stat" PredictiveScalingMetricStatProperty
newValue PredictiveScalingMetricStatProperty {Maybe (Value Text)
Maybe PredictiveScalingMetricProperty
()
haddock_workaround_ :: PredictiveScalingMetricStatProperty -> ()
metric :: PredictiveScalingMetricStatProperty
-> Maybe PredictiveScalingMetricProperty
stat :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
unit :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
= PredictiveScalingMetricStatProperty
{stat :: Maybe (Value Text)
stat = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Stat" PredictiveScalingMetricStatProperty
Value Text
newValue, Maybe (Value Text)
Maybe PredictiveScalingMetricProperty
()
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
unit :: Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
unit :: Maybe (Value Text)
..}
instance Property "Unit" PredictiveScalingMetricStatProperty where
type PropertyType "Unit" PredictiveScalingMetricStatProperty = Value Prelude.Text
set :: PropertyType "Unit" PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty
-> PredictiveScalingMetricStatProperty
set PropertyType "Unit" PredictiveScalingMetricStatProperty
newValue PredictiveScalingMetricStatProperty {Maybe (Value Text)
Maybe PredictiveScalingMetricProperty
()
haddock_workaround_ :: PredictiveScalingMetricStatProperty -> ()
metric :: PredictiveScalingMetricStatProperty
-> Maybe PredictiveScalingMetricProperty
stat :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
unit :: PredictiveScalingMetricStatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
stat :: Maybe (Value Text)
unit :: Maybe (Value Text)
..}
= PredictiveScalingMetricStatProperty
{unit :: Maybe (Value Text)
unit = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Unit" PredictiveScalingMetricStatProperty
Value Text
newValue, Maybe (Value Text)
Maybe PredictiveScalingMetricProperty
()
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
stat :: Maybe (Value Text)
haddock_workaround_ :: ()
metric :: Maybe PredictiveScalingMetricProperty
stat :: Maybe (Value Text)
..}