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