module Stratosphere.AutoScaling.ScalingPolicy.TargetTrackingConfigurationProperty (
        module Exports, TargetTrackingConfigurationProperty(..),
        mkTargetTrackingConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AutoScaling.ScalingPolicy.CustomizedMetricSpecificationProperty as Exports
import {-# SOURCE #-} Stratosphere.AutoScaling.ScalingPolicy.PredefinedMetricSpecificationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetTrackingConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html>
    TargetTrackingConfigurationProperty {TargetTrackingConfigurationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-customizedmetricspecification>
                                         TargetTrackingConfigurationProperty
-> Maybe CustomizedMetricSpecificationProperty
customizedMetricSpecification :: (Prelude.Maybe CustomizedMetricSpecificationProperty),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-disablescalein>
                                         TargetTrackingConfigurationProperty -> Maybe (Value Bool)
disableScaleIn :: (Prelude.Maybe (Value Prelude.Bool)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-predefinedmetricspecification>
                                         TargetTrackingConfigurationProperty
-> Maybe PredefinedMetricSpecificationProperty
predefinedMetricSpecification :: (Prelude.Maybe PredefinedMetricSpecificationProperty),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-targettrackingconfiguration.html#cfn-autoscaling-scalingpolicy-targettrackingconfiguration-targetvalue>
                                         TargetTrackingConfigurationProperty -> Value Double
targetValue :: (Value Prelude.Double)}
  deriving stock (TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty -> Bool
(TargetTrackingConfigurationProperty
 -> TargetTrackingConfigurationProperty -> Bool)
-> (TargetTrackingConfigurationProperty
    -> TargetTrackingConfigurationProperty -> Bool)
-> Eq TargetTrackingConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty -> Bool
== :: TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty -> Bool
$c/= :: TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty -> Bool
/= :: TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty -> Bool
Prelude.Eq, Int -> TargetTrackingConfigurationProperty -> ShowS
[TargetTrackingConfigurationProperty] -> ShowS
TargetTrackingConfigurationProperty -> String
(Int -> TargetTrackingConfigurationProperty -> ShowS)
-> (TargetTrackingConfigurationProperty -> String)
-> ([TargetTrackingConfigurationProperty] -> ShowS)
-> Show TargetTrackingConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetTrackingConfigurationProperty -> ShowS
showsPrec :: Int -> TargetTrackingConfigurationProperty -> ShowS
$cshow :: TargetTrackingConfigurationProperty -> String
show :: TargetTrackingConfigurationProperty -> String
$cshowList :: [TargetTrackingConfigurationProperty] -> ShowS
showList :: [TargetTrackingConfigurationProperty] -> ShowS
Prelude.Show)
mkTargetTrackingConfigurationProperty ::
  Value Prelude.Double -> TargetTrackingConfigurationProperty
mkTargetTrackingConfigurationProperty :: Value Double -> TargetTrackingConfigurationProperty
mkTargetTrackingConfigurationProperty Value Double
targetValue
  = TargetTrackingConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), targetValue :: Value Double
targetValue = Value Double
targetValue,
       customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
customizedMetricSpecification = Maybe CustomizedMetricSpecificationProperty
forall a. Maybe a
Prelude.Nothing,
       disableScaleIn :: Maybe (Value Bool)
disableScaleIn = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
predefinedMetricSpecification = Maybe PredefinedMetricSpecificationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetTrackingConfigurationProperty where
  toResourceProperties :: TargetTrackingConfigurationProperty -> ResourceProperties
toResourceProperties TargetTrackingConfigurationProperty {Maybe (Value Bool)
Maybe PredefinedMetricSpecificationProperty
Maybe CustomizedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: TargetTrackingConfigurationProperty -> ()
customizedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: TargetTrackingConfigurationProperty -> Maybe (Value Bool)
predefinedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe PredefinedMetricSpecificationProperty
targetValue :: TargetTrackingConfigurationProperty -> Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AutoScaling::ScalingPolicy.TargetTrackingConfiguration",
         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
"TargetValue" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
targetValue]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> CustomizedMetricSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomizedMetricSpecification"
                                 (CustomizedMetricSpecificationProperty -> (Key, Value))
-> Maybe CustomizedMetricSpecificationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CustomizedMetricSpecificationProperty
customizedMetricSpecification,
                               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
"DisableScaleIn" (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)
disableScaleIn,
                               Key -> PredefinedMetricSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PredefinedMetricSpecification"
                                 (PredefinedMetricSpecificationProperty -> (Key, Value))
-> Maybe PredefinedMetricSpecificationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PredefinedMetricSpecificationProperty
predefinedMetricSpecification]))}
instance JSON.ToJSON TargetTrackingConfigurationProperty where
  toJSON :: TargetTrackingConfigurationProperty -> Value
toJSON TargetTrackingConfigurationProperty {Maybe (Value Bool)
Maybe PredefinedMetricSpecificationProperty
Maybe CustomizedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: TargetTrackingConfigurationProperty -> ()
customizedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: TargetTrackingConfigurationProperty -> Maybe (Value Bool)
predefinedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe PredefinedMetricSpecificationProperty
targetValue :: TargetTrackingConfigurationProperty -> Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
..}
    = [(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
"TargetValue" Key -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Double
targetValue]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> CustomizedMetricSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomizedMetricSpecification"
                    (CustomizedMetricSpecificationProperty -> (Key, Value))
-> Maybe CustomizedMetricSpecificationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CustomizedMetricSpecificationProperty
customizedMetricSpecification,
                  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
"DisableScaleIn" (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)
disableScaleIn,
                  Key -> PredefinedMetricSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PredefinedMetricSpecification"
                    (PredefinedMetricSpecificationProperty -> (Key, Value))
-> Maybe PredefinedMetricSpecificationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PredefinedMetricSpecificationProperty
predefinedMetricSpecification])))
instance Property "CustomizedMetricSpecification" TargetTrackingConfigurationProperty where
  type PropertyType "CustomizedMetricSpecification" TargetTrackingConfigurationProperty = CustomizedMetricSpecificationProperty
  set :: PropertyType
  "CustomizedMetricSpecification" TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty
set PropertyType
  "CustomizedMetricSpecification" TargetTrackingConfigurationProperty
newValue TargetTrackingConfigurationProperty {Maybe (Value Bool)
Maybe PredefinedMetricSpecificationProperty
Maybe CustomizedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: TargetTrackingConfigurationProperty -> ()
customizedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: TargetTrackingConfigurationProperty -> Maybe (Value Bool)
predefinedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe PredefinedMetricSpecificationProperty
targetValue :: TargetTrackingConfigurationProperty -> Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
..}
    = TargetTrackingConfigurationProperty
        {customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
customizedMetricSpecification = CustomizedMetricSpecificationProperty
-> Maybe CustomizedMetricSpecificationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CustomizedMetricSpecification" TargetTrackingConfigurationProperty
CustomizedMetricSpecificationProperty
newValue, Maybe (Value Bool)
Maybe PredefinedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: ()
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
haddock_workaround_ :: ()
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
..}
instance Property "DisableScaleIn" TargetTrackingConfigurationProperty where
  type PropertyType "DisableScaleIn" TargetTrackingConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "DisableScaleIn" TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty
set PropertyType "DisableScaleIn" TargetTrackingConfigurationProperty
newValue TargetTrackingConfigurationProperty {Maybe (Value Bool)
Maybe PredefinedMetricSpecificationProperty
Maybe CustomizedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: TargetTrackingConfigurationProperty -> ()
customizedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: TargetTrackingConfigurationProperty -> Maybe (Value Bool)
predefinedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe PredefinedMetricSpecificationProperty
targetValue :: TargetTrackingConfigurationProperty -> Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
..}
    = TargetTrackingConfigurationProperty
        {disableScaleIn :: Maybe (Value Bool)
disableScaleIn = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DisableScaleIn" TargetTrackingConfigurationProperty
Value Bool
newValue, Maybe PredefinedMetricSpecificationProperty
Maybe CustomizedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
..}
instance Property "PredefinedMetricSpecification" TargetTrackingConfigurationProperty where
  type PropertyType "PredefinedMetricSpecification" TargetTrackingConfigurationProperty = PredefinedMetricSpecificationProperty
  set :: PropertyType
  "PredefinedMetricSpecification" TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty
set PropertyType
  "PredefinedMetricSpecification" TargetTrackingConfigurationProperty
newValue TargetTrackingConfigurationProperty {Maybe (Value Bool)
Maybe PredefinedMetricSpecificationProperty
Maybe CustomizedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: TargetTrackingConfigurationProperty -> ()
customizedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: TargetTrackingConfigurationProperty -> Maybe (Value Bool)
predefinedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe PredefinedMetricSpecificationProperty
targetValue :: TargetTrackingConfigurationProperty -> Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
..}
    = TargetTrackingConfigurationProperty
        {predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
predefinedMetricSpecification = PredefinedMetricSpecificationProperty
-> Maybe PredefinedMetricSpecificationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "PredefinedMetricSpecification" TargetTrackingConfigurationProperty
PredefinedMetricSpecificationProperty
newValue, Maybe (Value Bool)
Maybe CustomizedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
targetValue :: Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
targetValue :: Value Double
..}
instance Property "TargetValue" TargetTrackingConfigurationProperty where
  type PropertyType "TargetValue" TargetTrackingConfigurationProperty = Value Prelude.Double
  set :: PropertyType "TargetValue" TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty
-> TargetTrackingConfigurationProperty
set PropertyType "TargetValue" TargetTrackingConfigurationProperty
newValue TargetTrackingConfigurationProperty {Maybe (Value Bool)
Maybe PredefinedMetricSpecificationProperty
Maybe CustomizedMetricSpecificationProperty
()
Value Double
haddock_workaround_ :: TargetTrackingConfigurationProperty -> ()
customizedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: TargetTrackingConfigurationProperty -> Maybe (Value Bool)
predefinedMetricSpecification :: TargetTrackingConfigurationProperty
-> Maybe PredefinedMetricSpecificationProperty
targetValue :: TargetTrackingConfigurationProperty -> Value Double
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
targetValue :: Value Double
..}
    = TargetTrackingConfigurationProperty {targetValue :: Value Double
targetValue = PropertyType "TargetValue" TargetTrackingConfigurationProperty
Value Double
newValue, Maybe (Value Bool)
Maybe PredefinedMetricSpecificationProperty
Maybe CustomizedMetricSpecificationProperty
()
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
haddock_workaround_ :: ()
customizedMetricSpecification :: Maybe CustomizedMetricSpecificationProperty
disableScaleIn :: Maybe (Value Bool)
predefinedMetricSpecification :: Maybe PredefinedMetricSpecificationProperty
..}