module Stratosphere.ECS.CapacityProvider.ManagedScalingProperty (
        ManagedScalingProperty(..), mkManagedScalingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ManagedScalingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html>
    ManagedScalingProperty {ManagedScalingProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-instancewarmupperiod>
                            ManagedScalingProperty -> Maybe (Value Integer)
instanceWarmupPeriod :: (Prelude.Maybe (Value Prelude.Integer)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-maximumscalingstepsize>
                            ManagedScalingProperty -> Maybe (Value Integer)
maximumScalingStepSize :: (Prelude.Maybe (Value Prelude.Integer)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-minimumscalingstepsize>
                            ManagedScalingProperty -> Maybe (Value Integer)
minimumScalingStepSize :: (Prelude.Maybe (Value Prelude.Integer)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-status>
                            ManagedScalingProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-targetcapacity>
                            ManagedScalingProperty -> Maybe (Value Integer)
targetCapacity :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (ManagedScalingProperty -> ManagedScalingProperty -> Bool
(ManagedScalingProperty -> ManagedScalingProperty -> Bool)
-> (ManagedScalingProperty -> ManagedScalingProperty -> Bool)
-> Eq ManagedScalingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ManagedScalingProperty -> ManagedScalingProperty -> Bool
== :: ManagedScalingProperty -> ManagedScalingProperty -> Bool
$c/= :: ManagedScalingProperty -> ManagedScalingProperty -> Bool
/= :: ManagedScalingProperty -> ManagedScalingProperty -> Bool
Prelude.Eq, Int -> ManagedScalingProperty -> ShowS
[ManagedScalingProperty] -> ShowS
ManagedScalingProperty -> String
(Int -> ManagedScalingProperty -> ShowS)
-> (ManagedScalingProperty -> String)
-> ([ManagedScalingProperty] -> ShowS)
-> Show ManagedScalingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ManagedScalingProperty -> ShowS
showsPrec :: Int -> ManagedScalingProperty -> ShowS
$cshow :: ManagedScalingProperty -> String
show :: ManagedScalingProperty -> String
$cshowList :: [ManagedScalingProperty] -> ShowS
showList :: [ManagedScalingProperty] -> ShowS
Prelude.Show)
mkManagedScalingProperty :: ManagedScalingProperty
mkManagedScalingProperty :: ManagedScalingProperty
mkManagedScalingProperty
  = ManagedScalingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), instanceWarmupPeriod :: Maybe (Value Integer)
instanceWarmupPeriod = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       maximumScalingStepSize :: Maybe (Value Integer)
maximumScalingStepSize = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       minimumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       targetCapacity :: Maybe (Value Integer)
targetCapacity = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ManagedScalingProperty where
  toResourceProperties :: ManagedScalingProperty -> ResourceProperties
toResourceProperties ManagedScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedScalingProperty -> ()
instanceWarmupPeriod :: ManagedScalingProperty -> Maybe (Value Integer)
maximumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
minimumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
status :: ManagedScalingProperty -> Maybe (Value Text)
targetCapacity :: ManagedScalingProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::CapacityProvider.ManagedScaling",
         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 -> 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..=) Key
"InstanceWarmupPeriod" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
instanceWarmupPeriod,
                            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..=) Key
"MaximumScalingStepSize"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumScalingStepSize,
                            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..=) Key
"MinimumScalingStepSize"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
minimumScalingStepSize,
                            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
"Status" (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)
status,
                            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..=) Key
"TargetCapacity" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
targetCapacity])}
instance JSON.ToJSON ManagedScalingProperty where
  toJSON :: ManagedScalingProperty -> Value
toJSON ManagedScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedScalingProperty -> ()
instanceWarmupPeriod :: ManagedScalingProperty -> Maybe (Value Integer)
maximumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
minimumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
status :: ManagedScalingProperty -> Maybe (Value Text)
targetCapacity :: ManagedScalingProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
    = [(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 -> 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..=) Key
"InstanceWarmupPeriod" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
instanceWarmupPeriod,
               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..=) Key
"MaximumScalingStepSize"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumScalingStepSize,
               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..=) Key
"MinimumScalingStepSize"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
minimumScalingStepSize,
               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
"Status" (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)
status,
               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..=) Key
"TargetCapacity" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
targetCapacity]))
instance Property "InstanceWarmupPeriod" ManagedScalingProperty where
  type PropertyType "InstanceWarmupPeriod" ManagedScalingProperty = Value Prelude.Integer
  set :: PropertyType "InstanceWarmupPeriod" ManagedScalingProperty
-> ManagedScalingProperty -> ManagedScalingProperty
set PropertyType "InstanceWarmupPeriod" ManagedScalingProperty
newValue ManagedScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedScalingProperty -> ()
instanceWarmupPeriod :: ManagedScalingProperty -> Maybe (Value Integer)
maximumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
minimumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
status :: ManagedScalingProperty -> Maybe (Value Text)
targetCapacity :: ManagedScalingProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
    = ManagedScalingProperty
        {instanceWarmupPeriod :: Maybe (Value Integer)
instanceWarmupPeriod = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InstanceWarmupPeriod" ManagedScalingProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
haddock_workaround_ :: ()
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
instance Property "MaximumScalingStepSize" ManagedScalingProperty where
  type PropertyType "MaximumScalingStepSize" ManagedScalingProperty = Value Prelude.Integer
  set :: PropertyType "MaximumScalingStepSize" ManagedScalingProperty
-> ManagedScalingProperty -> ManagedScalingProperty
set PropertyType "MaximumScalingStepSize" ManagedScalingProperty
newValue ManagedScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedScalingProperty -> ()
instanceWarmupPeriod :: ManagedScalingProperty -> Maybe (Value Integer)
maximumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
minimumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
status :: ManagedScalingProperty -> Maybe (Value Text)
targetCapacity :: ManagedScalingProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
    = ManagedScalingProperty
        {maximumScalingStepSize :: Maybe (Value Integer)
maximumScalingStepSize = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumScalingStepSize" ManagedScalingProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
instance Property "MinimumScalingStepSize" ManagedScalingProperty where
  type PropertyType "MinimumScalingStepSize" ManagedScalingProperty = Value Prelude.Integer
  set :: PropertyType "MinimumScalingStepSize" ManagedScalingProperty
-> ManagedScalingProperty -> ManagedScalingProperty
set PropertyType "MinimumScalingStepSize" ManagedScalingProperty
newValue ManagedScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedScalingProperty -> ()
instanceWarmupPeriod :: ManagedScalingProperty -> Maybe (Value Integer)
maximumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
minimumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
status :: ManagedScalingProperty -> Maybe (Value Text)
targetCapacity :: ManagedScalingProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
    = ManagedScalingProperty
        {minimumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MinimumScalingStepSize" ManagedScalingProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
instance Property "Status" ManagedScalingProperty where
  type PropertyType "Status" ManagedScalingProperty = Value Prelude.Text
  set :: PropertyType "Status" ManagedScalingProperty
-> ManagedScalingProperty -> ManagedScalingProperty
set PropertyType "Status" ManagedScalingProperty
newValue ManagedScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedScalingProperty -> ()
instanceWarmupPeriod :: ManagedScalingProperty -> Maybe (Value Integer)
maximumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
minimumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
status :: ManagedScalingProperty -> Maybe (Value Text)
targetCapacity :: ManagedScalingProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
    = ManagedScalingProperty {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" ManagedScalingProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
targetCapacity :: Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
targetCapacity :: Maybe (Value Integer)
..}
instance Property "TargetCapacity" ManagedScalingProperty where
  type PropertyType "TargetCapacity" ManagedScalingProperty = Value Prelude.Integer
  set :: PropertyType "TargetCapacity" ManagedScalingProperty
-> ManagedScalingProperty -> ManagedScalingProperty
set PropertyType "TargetCapacity" ManagedScalingProperty
newValue ManagedScalingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ManagedScalingProperty -> ()
instanceWarmupPeriod :: ManagedScalingProperty -> Maybe (Value Integer)
maximumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
minimumScalingStepSize :: ManagedScalingProperty -> Maybe (Value Integer)
status :: ManagedScalingProperty -> Maybe (Value Text)
targetCapacity :: ManagedScalingProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
targetCapacity :: Maybe (Value Integer)
..}
    = ManagedScalingProperty
        {targetCapacity :: Maybe (Value Integer)
targetCapacity = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetCapacity" ManagedScalingProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceWarmupPeriod :: Maybe (Value Integer)
maximumScalingStepSize :: Maybe (Value Integer)
minimumScalingStepSize :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}