module Stratosphere.AutoScaling.WarmPool (
        module Exports, WarmPool(..), mkWarmPool
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AutoScaling.WarmPool.InstanceReusePolicyProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data WarmPool
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html>
    WarmPool {WarmPool -> ()
haddock_workaround_ :: (),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-autoscalinggroupname>
              WarmPool -> Value Text
autoScalingGroupName :: (Value Prelude.Text),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-instancereusepolicy>
              WarmPool -> Maybe InstanceReusePolicyProperty
instanceReusePolicy :: (Prelude.Maybe InstanceReusePolicyProperty),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-maxgrouppreparedcapacity>
              WarmPool -> Maybe (Value Integer)
maxGroupPreparedCapacity :: (Prelude.Maybe (Value Prelude.Integer)),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-minsize>
              WarmPool -> Maybe (Value Integer)
minSize :: (Prelude.Maybe (Value Prelude.Integer)),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-warmpool.html#cfn-autoscaling-warmpool-poolstate>
              WarmPool -> Maybe (Value Text)
poolState :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (WarmPool -> WarmPool -> Bool
(WarmPool -> WarmPool -> Bool)
-> (WarmPool -> WarmPool -> Bool) -> Eq WarmPool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WarmPool -> WarmPool -> Bool
== :: WarmPool -> WarmPool -> Bool
$c/= :: WarmPool -> WarmPool -> Bool
/= :: WarmPool -> WarmPool -> Bool
Prelude.Eq, Int -> WarmPool -> ShowS
[WarmPool] -> ShowS
WarmPool -> String
(Int -> WarmPool -> ShowS)
-> (WarmPool -> String) -> ([WarmPool] -> ShowS) -> Show WarmPool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WarmPool -> ShowS
showsPrec :: Int -> WarmPool -> ShowS
$cshow :: WarmPool -> String
show :: WarmPool -> String
$cshowList :: [WarmPool] -> ShowS
showList :: [WarmPool] -> ShowS
Prelude.Show)
mkWarmPool :: Value Prelude.Text -> WarmPool
mkWarmPool :: Value Text -> WarmPool
mkWarmPool Value Text
autoScalingGroupName
  = WarmPool
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       autoScalingGroupName :: Value Text
autoScalingGroupName = Value Text
autoScalingGroupName,
       instanceReusePolicy :: Maybe InstanceReusePolicyProperty
instanceReusePolicy = Maybe InstanceReusePolicyProperty
forall a. Maybe a
Prelude.Nothing,
       maxGroupPreparedCapacity :: Maybe (Value Integer)
maxGroupPreparedCapacity = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       minSize :: Maybe (Value Integer)
minSize = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, poolState :: Maybe (Value Text)
poolState = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WarmPool where
  toResourceProperties :: WarmPool -> ResourceProperties
toResourceProperties WarmPool {Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: WarmPool -> ()
autoScalingGroupName :: WarmPool -> Value Text
instanceReusePolicy :: WarmPool -> Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: WarmPool -> Maybe (Value Integer)
minSize :: WarmPool -> Maybe (Value Integer)
poolState :: WarmPool -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AutoScaling::WarmPool",
         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
"AutoScalingGroupName" 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
autoScalingGroupName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> InstanceReusePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InstanceReusePolicy" (InstanceReusePolicyProperty -> (Key, Value))
-> Maybe InstanceReusePolicyProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceReusePolicyProperty
instanceReusePolicy,
                               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
"MaxGroupPreparedCapacity"
                                 (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)
maxGroupPreparedCapacity,
                               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
"MinSize" (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)
minSize,
                               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
"PoolState" (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)
poolState]))}
instance JSON.ToJSON WarmPool where
  toJSON :: WarmPool -> Value
toJSON WarmPool {Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: WarmPool -> ()
autoScalingGroupName :: WarmPool -> Value Text
instanceReusePolicy :: WarmPool -> Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: WarmPool -> Maybe (Value Integer)
minSize :: WarmPool -> Maybe (Value Integer)
poolState :: WarmPool -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: 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
"AutoScalingGroupName" 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
autoScalingGroupName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> InstanceReusePolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InstanceReusePolicy" (InstanceReusePolicyProperty -> (Key, Value))
-> Maybe InstanceReusePolicyProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceReusePolicyProperty
instanceReusePolicy,
                  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
"MaxGroupPreparedCapacity"
                    (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)
maxGroupPreparedCapacity,
                  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
"MinSize" (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)
minSize,
                  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
"PoolState" (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)
poolState])))
instance Property "AutoScalingGroupName" WarmPool where
  type PropertyType "AutoScalingGroupName" WarmPool = Value Prelude.Text
  set :: PropertyType "AutoScalingGroupName" WarmPool
-> WarmPool -> WarmPool
set PropertyType "AutoScalingGroupName" WarmPool
newValue WarmPool {Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: WarmPool -> ()
autoScalingGroupName :: WarmPool -> Value Text
instanceReusePolicy :: WarmPool -> Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: WarmPool -> Maybe (Value Integer)
minSize :: WarmPool -> Maybe (Value Integer)
poolState :: WarmPool -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
    = WarmPool {autoScalingGroupName :: Value Text
autoScalingGroupName = PropertyType "AutoScalingGroupName" WarmPool
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
haddock_workaround_ :: ()
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
instance Property "InstanceReusePolicy" WarmPool where
  type PropertyType "InstanceReusePolicy" WarmPool = InstanceReusePolicyProperty
  set :: PropertyType "InstanceReusePolicy" WarmPool -> WarmPool -> WarmPool
set PropertyType "InstanceReusePolicy" WarmPool
newValue WarmPool {Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: WarmPool -> ()
autoScalingGroupName :: WarmPool -> Value Text
instanceReusePolicy :: WarmPool -> Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: WarmPool -> Maybe (Value Integer)
minSize :: WarmPool -> Maybe (Value Integer)
poolState :: WarmPool -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
    = WarmPool {instanceReusePolicy :: Maybe InstanceReusePolicyProperty
instanceReusePolicy = InstanceReusePolicyProperty -> Maybe InstanceReusePolicyProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InstanceReusePolicy" WarmPool
InstanceReusePolicyProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
instance Property "MaxGroupPreparedCapacity" WarmPool where
  type PropertyType "MaxGroupPreparedCapacity" WarmPool = Value Prelude.Integer
  set :: PropertyType "MaxGroupPreparedCapacity" WarmPool
-> WarmPool -> WarmPool
set PropertyType "MaxGroupPreparedCapacity" WarmPool
newValue WarmPool {Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: WarmPool -> ()
autoScalingGroupName :: WarmPool -> Value Text
instanceReusePolicy :: WarmPool -> Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: WarmPool -> Maybe (Value Integer)
minSize :: WarmPool -> Maybe (Value Integer)
poolState :: WarmPool -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
    = WarmPool {maxGroupPreparedCapacity :: Maybe (Value Integer)
maxGroupPreparedCapacity = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxGroupPreparedCapacity" WarmPool
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
instance Property "MinSize" WarmPool where
  type PropertyType "MinSize" WarmPool = Value Prelude.Integer
  set :: PropertyType "MinSize" WarmPool -> WarmPool -> WarmPool
set PropertyType "MinSize" WarmPool
newValue WarmPool {Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: WarmPool -> ()
autoScalingGroupName :: WarmPool -> Value Text
instanceReusePolicy :: WarmPool -> Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: WarmPool -> Maybe (Value Integer)
minSize :: WarmPool -> Maybe (Value Integer)
poolState :: WarmPool -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
    = WarmPool {minSize :: Maybe (Value Integer)
minSize = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MinSize" WarmPool
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
instance Property "PoolState" WarmPool where
  type PropertyType "PoolState" WarmPool = Value Prelude.Text
  set :: PropertyType "PoolState" WarmPool -> WarmPool -> WarmPool
set PropertyType "PoolState" WarmPool
newValue WarmPool {Maybe (Value Integer)
Maybe (Value Text)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: WarmPool -> ()
autoScalingGroupName :: WarmPool -> Value Text
instanceReusePolicy :: WarmPool -> Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: WarmPool -> Maybe (Value Integer)
minSize :: WarmPool -> Maybe (Value Integer)
poolState :: WarmPool -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
poolState :: Maybe (Value Text)
..}
    = WarmPool {poolState :: Maybe (Value Text)
poolState = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PoolState" WarmPool
Value Text
newValue, Maybe (Value Integer)
Maybe InstanceReusePolicyProperty
()
Value Text
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
haddock_workaround_ :: ()
autoScalingGroupName :: Value Text
instanceReusePolicy :: Maybe InstanceReusePolicyProperty
maxGroupPreparedCapacity :: Maybe (Value Integer)
minSize :: Maybe (Value Integer)
..}