module Stratosphere.ApplicationAutoScaling.ScalingPolicy.StepAdjustmentProperty (
        StepAdjustmentProperty(..), mkStepAdjustmentProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StepAdjustmentProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-stepadjustment.html>
    StepAdjustmentProperty {StepAdjustmentProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-stepadjustment.html#cfn-applicationautoscaling-scalingpolicy-stepadjustment-metricintervallowerbound>
                            StepAdjustmentProperty -> Maybe (Value Double)
metricIntervalLowerBound :: (Prelude.Maybe (Value Prelude.Double)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-stepadjustment.html#cfn-applicationautoscaling-scalingpolicy-stepadjustment-metricintervalupperbound>
                            StepAdjustmentProperty -> Maybe (Value Double)
metricIntervalUpperBound :: (Prelude.Maybe (Value Prelude.Double)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-stepadjustment.html#cfn-applicationautoscaling-scalingpolicy-stepadjustment-scalingadjustment>
                            StepAdjustmentProperty -> Value Integer
scalingAdjustment :: (Value Prelude.Integer)}
  deriving stock (StepAdjustmentProperty -> StepAdjustmentProperty -> Bool
(StepAdjustmentProperty -> StepAdjustmentProperty -> Bool)
-> (StepAdjustmentProperty -> StepAdjustmentProperty -> Bool)
-> Eq StepAdjustmentProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StepAdjustmentProperty -> StepAdjustmentProperty -> Bool
== :: StepAdjustmentProperty -> StepAdjustmentProperty -> Bool
$c/= :: StepAdjustmentProperty -> StepAdjustmentProperty -> Bool
/= :: StepAdjustmentProperty -> StepAdjustmentProperty -> Bool
Prelude.Eq, Int -> StepAdjustmentProperty -> ShowS
[StepAdjustmentProperty] -> ShowS
StepAdjustmentProperty -> String
(Int -> StepAdjustmentProperty -> ShowS)
-> (StepAdjustmentProperty -> String)
-> ([StepAdjustmentProperty] -> ShowS)
-> Show StepAdjustmentProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StepAdjustmentProperty -> ShowS
showsPrec :: Int -> StepAdjustmentProperty -> ShowS
$cshow :: StepAdjustmentProperty -> String
show :: StepAdjustmentProperty -> String
$cshowList :: [StepAdjustmentProperty] -> ShowS
showList :: [StepAdjustmentProperty] -> ShowS
Prelude.Show)
mkStepAdjustmentProperty ::
  Value Prelude.Integer -> StepAdjustmentProperty
mkStepAdjustmentProperty :: Value Integer -> StepAdjustmentProperty
mkStepAdjustmentProperty Value Integer
scalingAdjustment
  = StepAdjustmentProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), scalingAdjustment :: Value Integer
scalingAdjustment = Value Integer
scalingAdjustment,
       metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalLowerBound = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
       metricIntervalUpperBound :: Maybe (Value Double)
metricIntervalUpperBound = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StepAdjustmentProperty where
  toResourceProperties :: StepAdjustmentProperty -> ResourceProperties
toResourceProperties StepAdjustmentProperty {Maybe (Value Double)
()
Value Integer
haddock_workaround_ :: StepAdjustmentProperty -> ()
metricIntervalLowerBound :: StepAdjustmentProperty -> Maybe (Value Double)
metricIntervalUpperBound :: StepAdjustmentProperty -> Maybe (Value Double)
scalingAdjustment :: StepAdjustmentProperty -> Value Integer
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalUpperBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApplicationAutoScaling::ScalingPolicy.StepAdjustment",
         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
"ScalingAdjustment" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
scalingAdjustment]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [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..=) Key
"MetricIntervalLowerBound"
                                 (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
metricIntervalLowerBound,
                               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..=) Key
"MetricIntervalUpperBound"
                                 (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
metricIntervalUpperBound]))}
instance JSON.ToJSON StepAdjustmentProperty where
  toJSON :: StepAdjustmentProperty -> Value
toJSON StepAdjustmentProperty {Maybe (Value Double)
()
Value Integer
haddock_workaround_ :: StepAdjustmentProperty -> ()
metricIntervalLowerBound :: StepAdjustmentProperty -> Maybe (Value Double)
metricIntervalUpperBound :: StepAdjustmentProperty -> Maybe (Value Double)
scalingAdjustment :: StepAdjustmentProperty -> Value Integer
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalUpperBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
..}
    = [(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
"ScalingAdjustment" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
scalingAdjustment]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [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..=) Key
"MetricIntervalLowerBound"
                    (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
metricIntervalLowerBound,
                  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..=) Key
"MetricIntervalUpperBound"
                    (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
metricIntervalUpperBound])))
instance Property "MetricIntervalLowerBound" StepAdjustmentProperty where
  type PropertyType "MetricIntervalLowerBound" StepAdjustmentProperty = Value Prelude.Double
  set :: PropertyType "MetricIntervalLowerBound" StepAdjustmentProperty
-> StepAdjustmentProperty -> StepAdjustmentProperty
set PropertyType "MetricIntervalLowerBound" StepAdjustmentProperty
newValue StepAdjustmentProperty {Maybe (Value Double)
()
Value Integer
haddock_workaround_ :: StepAdjustmentProperty -> ()
metricIntervalLowerBound :: StepAdjustmentProperty -> Maybe (Value Double)
metricIntervalUpperBound :: StepAdjustmentProperty -> Maybe (Value Double)
scalingAdjustment :: StepAdjustmentProperty -> Value Integer
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalUpperBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
..}
    = StepAdjustmentProperty
        {metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalLowerBound = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MetricIntervalLowerBound" StepAdjustmentProperty
Value Double
newValue, Maybe (Value Double)
()
Value Integer
haddock_workaround_ :: ()
metricIntervalUpperBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
haddock_workaround_ :: ()
metricIntervalUpperBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
..}
instance Property "MetricIntervalUpperBound" StepAdjustmentProperty where
  type PropertyType "MetricIntervalUpperBound" StepAdjustmentProperty = Value Prelude.Double
  set :: PropertyType "MetricIntervalUpperBound" StepAdjustmentProperty
-> StepAdjustmentProperty -> StepAdjustmentProperty
set PropertyType "MetricIntervalUpperBound" StepAdjustmentProperty
newValue StepAdjustmentProperty {Maybe (Value Double)
()
Value Integer
haddock_workaround_ :: StepAdjustmentProperty -> ()
metricIntervalLowerBound :: StepAdjustmentProperty -> Maybe (Value Double)
metricIntervalUpperBound :: StepAdjustmentProperty -> Maybe (Value Double)
scalingAdjustment :: StepAdjustmentProperty -> Value Integer
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalUpperBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
..}
    = StepAdjustmentProperty
        {metricIntervalUpperBound :: Maybe (Value Double)
metricIntervalUpperBound = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MetricIntervalUpperBound" StepAdjustmentProperty
Value Double
newValue, Maybe (Value Double)
()
Value Integer
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
..}
instance Property "ScalingAdjustment" StepAdjustmentProperty where
  type PropertyType "ScalingAdjustment" StepAdjustmentProperty = Value Prelude.Integer
  set :: PropertyType "ScalingAdjustment" StepAdjustmentProperty
-> StepAdjustmentProperty -> StepAdjustmentProperty
set PropertyType "ScalingAdjustment" StepAdjustmentProperty
newValue StepAdjustmentProperty {Maybe (Value Double)
()
Value Integer
haddock_workaround_ :: StepAdjustmentProperty -> ()
metricIntervalLowerBound :: StepAdjustmentProperty -> Maybe (Value Double)
metricIntervalUpperBound :: StepAdjustmentProperty -> Maybe (Value Double)
scalingAdjustment :: StepAdjustmentProperty -> Value Integer
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalUpperBound :: Maybe (Value Double)
scalingAdjustment :: Value Integer
..}
    = StepAdjustmentProperty {scalingAdjustment :: Value Integer
scalingAdjustment = PropertyType "ScalingAdjustment" StepAdjustmentProperty
Value Integer
newValue, Maybe (Value Double)
()
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalUpperBound :: Maybe (Value Double)
haddock_workaround_ :: ()
metricIntervalLowerBound :: Maybe (Value Double)
metricIntervalUpperBound :: Maybe (Value Double)
..}