module Stratosphere.AutoScaling.ScalingPolicy.PredictiveScalingPredefinedMetricPairProperty (
PredictiveScalingPredefinedMetricPairProperty(..),
mkPredictiveScalingPredefinedMetricPairProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PredictiveScalingPredefinedMetricPairProperty
=
PredictiveScalingPredefinedMetricPairProperty {PredictiveScalingPredefinedMetricPairProperty -> ()
haddock_workaround_ :: (),
PredictiveScalingPredefinedMetricPairProperty -> Value Text
predefinedMetricType :: (Value Prelude.Text),
PredictiveScalingPredefinedMetricPairProperty -> Maybe (Value Text)
resourceLabel :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty -> Bool
(PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty -> Bool)
-> (PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty -> Bool)
-> Eq PredictiveScalingPredefinedMetricPairProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty -> Bool
== :: PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty -> Bool
$c/= :: PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty -> Bool
/= :: PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty -> Bool
Prelude.Eq, Int -> PredictiveScalingPredefinedMetricPairProperty -> ShowS
[PredictiveScalingPredefinedMetricPairProperty] -> ShowS
PredictiveScalingPredefinedMetricPairProperty -> String
(Int -> PredictiveScalingPredefinedMetricPairProperty -> ShowS)
-> (PredictiveScalingPredefinedMetricPairProperty -> String)
-> ([PredictiveScalingPredefinedMetricPairProperty] -> ShowS)
-> Show PredictiveScalingPredefinedMetricPairProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PredictiveScalingPredefinedMetricPairProperty -> ShowS
showsPrec :: Int -> PredictiveScalingPredefinedMetricPairProperty -> ShowS
$cshow :: PredictiveScalingPredefinedMetricPairProperty -> String
show :: PredictiveScalingPredefinedMetricPairProperty -> String
$cshowList :: [PredictiveScalingPredefinedMetricPairProperty] -> ShowS
showList :: [PredictiveScalingPredefinedMetricPairProperty] -> ShowS
Prelude.Show)
mkPredictiveScalingPredefinedMetricPairProperty ::
Value Prelude.Text -> PredictiveScalingPredefinedMetricPairProperty
mkPredictiveScalingPredefinedMetricPairProperty :: Value Text -> PredictiveScalingPredefinedMetricPairProperty
mkPredictiveScalingPredefinedMetricPairProperty
Value Text
predefinedMetricType
= PredictiveScalingPredefinedMetricPairProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
predefinedMetricType :: Value Text
predefinedMetricType = Value Text
predefinedMetricType,
resourceLabel :: Maybe (Value Text)
resourceLabel = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PredictiveScalingPredefinedMetricPairProperty where
toResourceProperties :: PredictiveScalingPredefinedMetricPairProperty -> ResourceProperties
toResourceProperties
PredictiveScalingPredefinedMetricPairProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PredictiveScalingPredefinedMetricPairProperty -> ()
predefinedMetricType :: PredictiveScalingPredefinedMetricPairProperty -> Value Text
resourceLabel :: PredictiveScalingPredefinedMetricPairProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
resourceLabel :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AutoScaling::ScalingPolicy.PredictiveScalingPredefinedMetricPair",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"PredefinedMetricType" 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
predefinedMetricType]
([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
"ResourceLabel" (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)
resourceLabel]))}
instance JSON.ToJSON PredictiveScalingPredefinedMetricPairProperty where
toJSON :: PredictiveScalingPredefinedMetricPairProperty -> Value
toJSON PredictiveScalingPredefinedMetricPairProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PredictiveScalingPredefinedMetricPairProperty -> ()
predefinedMetricType :: PredictiveScalingPredefinedMetricPairProperty -> Value Text
resourceLabel :: PredictiveScalingPredefinedMetricPairProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
resourceLabel :: Maybe (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
"PredefinedMetricType" 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
predefinedMetricType]
([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
"ResourceLabel" (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)
resourceLabel])))
instance Property "PredefinedMetricType" PredictiveScalingPredefinedMetricPairProperty where
type PropertyType "PredefinedMetricType" PredictiveScalingPredefinedMetricPairProperty = Value Prelude.Text
set :: PropertyType
"PredefinedMetricType"
PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty
set PropertyType
"PredefinedMetricType"
PredictiveScalingPredefinedMetricPairProperty
newValue PredictiveScalingPredefinedMetricPairProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PredictiveScalingPredefinedMetricPairProperty -> ()
predefinedMetricType :: PredictiveScalingPredefinedMetricPairProperty -> Value Text
resourceLabel :: PredictiveScalingPredefinedMetricPairProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
resourceLabel :: Maybe (Value Text)
..}
= PredictiveScalingPredefinedMetricPairProperty
{predefinedMetricType :: Value Text
predefinedMetricType = PropertyType
"PredefinedMetricType"
PredictiveScalingPredefinedMetricPairProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
resourceLabel :: Maybe (Value Text)
haddock_workaround_ :: ()
resourceLabel :: Maybe (Value Text)
..}
instance Property "ResourceLabel" PredictiveScalingPredefinedMetricPairProperty where
type PropertyType "ResourceLabel" PredictiveScalingPredefinedMetricPairProperty = Value Prelude.Text
set :: PropertyType
"ResourceLabel" PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty
-> PredictiveScalingPredefinedMetricPairProperty
set PropertyType
"ResourceLabel" PredictiveScalingPredefinedMetricPairProperty
newValue PredictiveScalingPredefinedMetricPairProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PredictiveScalingPredefinedMetricPairProperty -> ()
predefinedMetricType :: PredictiveScalingPredefinedMetricPairProperty -> Value Text
resourceLabel :: PredictiveScalingPredefinedMetricPairProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
resourceLabel :: Maybe (Value Text)
..}
= PredictiveScalingPredefinedMetricPairProperty
{resourceLabel :: Maybe (Value Text)
resourceLabel = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"ResourceLabel" PredictiveScalingPredefinedMetricPairProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
haddock_workaround_ :: ()
predefinedMetricType :: Value Text
..}