module Stratosphere.ApplicationAutoScaling.ScalingPolicy.PredictiveScalingMetricProperty (
        module Exports, PredictiveScalingMetricProperty(..),
        mkPredictiveScalingMetricProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ApplicationAutoScaling.ScalingPolicy.PredictiveScalingMetricDimensionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PredictiveScalingMetricProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predictivescalingmetric.html>
    PredictiveScalingMetricProperty {PredictiveScalingMetricProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predictivescalingmetric.html#cfn-applicationautoscaling-scalingpolicy-predictivescalingmetric-dimensions>
                                     PredictiveScalingMetricProperty
-> Maybe [PredictiveScalingMetricDimensionProperty]
dimensions :: (Prelude.Maybe [PredictiveScalingMetricDimensionProperty]),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predictivescalingmetric.html#cfn-applicationautoscaling-scalingpolicy-predictivescalingmetric-metricname>
                                     PredictiveScalingMetricProperty -> Maybe (Value Text)
metricName :: (Prelude.Maybe (Value Prelude.Text)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predictivescalingmetric.html#cfn-applicationautoscaling-scalingpolicy-predictivescalingmetric-namespace>
                                     PredictiveScalingMetricProperty -> Maybe (Value Text)
namespace :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty -> Bool
(PredictiveScalingMetricProperty
 -> PredictiveScalingMetricProperty -> Bool)
-> (PredictiveScalingMetricProperty
    -> PredictiveScalingMetricProperty -> Bool)
-> Eq PredictiveScalingMetricProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty -> Bool
== :: PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty -> Bool
$c/= :: PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty -> Bool
/= :: PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty -> Bool
Prelude.Eq, Int -> PredictiveScalingMetricProperty -> ShowS
[PredictiveScalingMetricProperty] -> ShowS
PredictiveScalingMetricProperty -> String
(Int -> PredictiveScalingMetricProperty -> ShowS)
-> (PredictiveScalingMetricProperty -> String)
-> ([PredictiveScalingMetricProperty] -> ShowS)
-> Show PredictiveScalingMetricProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PredictiveScalingMetricProperty -> ShowS
showsPrec :: Int -> PredictiveScalingMetricProperty -> ShowS
$cshow :: PredictiveScalingMetricProperty -> String
show :: PredictiveScalingMetricProperty -> String
$cshowList :: [PredictiveScalingMetricProperty] -> ShowS
showList :: [PredictiveScalingMetricProperty] -> ShowS
Prelude.Show)
mkPredictiveScalingMetricProperty ::
  PredictiveScalingMetricProperty
mkPredictiveScalingMetricProperty :: PredictiveScalingMetricProperty
mkPredictiveScalingMetricProperty
  = PredictiveScalingMetricProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
dimensions = Maybe [PredictiveScalingMetricDimensionProperty]
forall a. Maybe a
Prelude.Nothing,
       metricName :: Maybe (Value Text)
metricName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, namespace :: Maybe (Value Text)
namespace = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PredictiveScalingMetricProperty where
  toResourceProperties :: PredictiveScalingMetricProperty -> ResourceProperties
toResourceProperties PredictiveScalingMetricProperty {Maybe [PredictiveScalingMetricDimensionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredictiveScalingMetricProperty -> ()
dimensions :: PredictiveScalingMetricProperty
-> Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: PredictiveScalingMetricProperty -> Maybe (Value Text)
namespace :: PredictiveScalingMetricProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: Maybe (Value Text)
namespace :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationAutoScaling::ScalingPolicy.PredictiveScalingMetric",
         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 -> [PredictiveScalingMetricDimensionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Dimensions" ([PredictiveScalingMetricDimensionProperty] -> (Key, Value))
-> Maybe [PredictiveScalingMetricDimensionProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PredictiveScalingMetricDimensionProperty]
dimensions,
                            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
"MetricName" (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)
metricName,
                            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
"Namespace" (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)
namespace])}
instance JSON.ToJSON PredictiveScalingMetricProperty where
  toJSON :: PredictiveScalingMetricProperty -> Value
toJSON PredictiveScalingMetricProperty {Maybe [PredictiveScalingMetricDimensionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredictiveScalingMetricProperty -> ()
dimensions :: PredictiveScalingMetricProperty
-> Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: PredictiveScalingMetricProperty -> Maybe (Value Text)
namespace :: PredictiveScalingMetricProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: Maybe (Value Text)
namespace :: 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 -> [PredictiveScalingMetricDimensionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Dimensions" ([PredictiveScalingMetricDimensionProperty] -> (Key, Value))
-> Maybe [PredictiveScalingMetricDimensionProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PredictiveScalingMetricDimensionProperty]
dimensions,
               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
"MetricName" (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)
metricName,
               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
"Namespace" (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)
namespace]))
instance Property "Dimensions" PredictiveScalingMetricProperty where
  type PropertyType "Dimensions" PredictiveScalingMetricProperty = [PredictiveScalingMetricDimensionProperty]
  set :: PropertyType "Dimensions" PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty
set PropertyType "Dimensions" PredictiveScalingMetricProperty
newValue PredictiveScalingMetricProperty {Maybe [PredictiveScalingMetricDimensionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredictiveScalingMetricProperty -> ()
dimensions :: PredictiveScalingMetricProperty
-> Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: PredictiveScalingMetricProperty -> Maybe (Value Text)
namespace :: PredictiveScalingMetricProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: Maybe (Value Text)
namespace :: Maybe (Value Text)
..}
    = PredictiveScalingMetricProperty
        {dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
dimensions = [PredictiveScalingMetricDimensionProperty]
-> Maybe [PredictiveScalingMetricDimensionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PredictiveScalingMetricDimensionProperty]
PropertyType "Dimensions" PredictiveScalingMetricProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
metricName :: Maybe (Value Text)
namespace :: Maybe (Value Text)
haddock_workaround_ :: ()
metricName :: Maybe (Value Text)
namespace :: Maybe (Value Text)
..}
instance Property "MetricName" PredictiveScalingMetricProperty where
  type PropertyType "MetricName" PredictiveScalingMetricProperty = Value Prelude.Text
  set :: PropertyType "MetricName" PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty
set PropertyType "MetricName" PredictiveScalingMetricProperty
newValue PredictiveScalingMetricProperty {Maybe [PredictiveScalingMetricDimensionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredictiveScalingMetricProperty -> ()
dimensions :: PredictiveScalingMetricProperty
-> Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: PredictiveScalingMetricProperty -> Maybe (Value Text)
namespace :: PredictiveScalingMetricProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: Maybe (Value Text)
namespace :: Maybe (Value Text)
..}
    = PredictiveScalingMetricProperty
        {metricName :: Maybe (Value Text)
metricName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MetricName" PredictiveScalingMetricProperty
Value Text
newValue, Maybe [PredictiveScalingMetricDimensionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
namespace :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
namespace :: Maybe (Value Text)
..}
instance Property "Namespace" PredictiveScalingMetricProperty where
  type PropertyType "Namespace" PredictiveScalingMetricProperty = Value Prelude.Text
  set :: PropertyType "Namespace" PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty
-> PredictiveScalingMetricProperty
set PropertyType "Namespace" PredictiveScalingMetricProperty
newValue PredictiveScalingMetricProperty {Maybe [PredictiveScalingMetricDimensionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredictiveScalingMetricProperty -> ()
dimensions :: PredictiveScalingMetricProperty
-> Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: PredictiveScalingMetricProperty -> Maybe (Value Text)
namespace :: PredictiveScalingMetricProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: Maybe (Value Text)
namespace :: Maybe (Value Text)
..}
    = PredictiveScalingMetricProperty
        {namespace :: Maybe (Value Text)
namespace = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Namespace" PredictiveScalingMetricProperty
Value Text
newValue, Maybe [PredictiveScalingMetricDimensionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: Maybe (Value Text)
haddock_workaround_ :: ()
dimensions :: Maybe [PredictiveScalingMetricDimensionProperty]
metricName :: Maybe (Value Text)
..}