module Stratosphere.ApplicationAutoScaling.ScalableTarget.ScalableTargetActionProperty (
ScalableTargetActionProperty(..), mkScalableTargetActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ScalableTargetActionProperty
=
ScalableTargetActionProperty {ScalableTargetActionProperty -> ()
haddock_workaround_ :: (),
ScalableTargetActionProperty -> Maybe (Value Integer)
maxCapacity :: (Prelude.Maybe (Value Prelude.Integer)),
ScalableTargetActionProperty -> Maybe (Value Integer)
minCapacity :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (ScalableTargetActionProperty
-> ScalableTargetActionProperty -> Bool
(ScalableTargetActionProperty
-> ScalableTargetActionProperty -> Bool)
-> (ScalableTargetActionProperty
-> ScalableTargetActionProperty -> Bool)
-> Eq ScalableTargetActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScalableTargetActionProperty
-> ScalableTargetActionProperty -> Bool
== :: ScalableTargetActionProperty
-> ScalableTargetActionProperty -> Bool
$c/= :: ScalableTargetActionProperty
-> ScalableTargetActionProperty -> Bool
/= :: ScalableTargetActionProperty
-> ScalableTargetActionProperty -> Bool
Prelude.Eq, Int -> ScalableTargetActionProperty -> ShowS
[ScalableTargetActionProperty] -> ShowS
ScalableTargetActionProperty -> String
(Int -> ScalableTargetActionProperty -> ShowS)
-> (ScalableTargetActionProperty -> String)
-> ([ScalableTargetActionProperty] -> ShowS)
-> Show ScalableTargetActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScalableTargetActionProperty -> ShowS
showsPrec :: Int -> ScalableTargetActionProperty -> ShowS
$cshow :: ScalableTargetActionProperty -> String
show :: ScalableTargetActionProperty -> String
$cshowList :: [ScalableTargetActionProperty] -> ShowS
showList :: [ScalableTargetActionProperty] -> ShowS
Prelude.Show)
mkScalableTargetActionProperty :: ScalableTargetActionProperty
mkScalableTargetActionProperty :: ScalableTargetActionProperty
mkScalableTargetActionProperty
= ScalableTargetActionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), maxCapacity :: Maybe (Value Integer)
maxCapacity = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
minCapacity :: Maybe (Value Integer)
minCapacity = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScalableTargetActionProperty where
toResourceProperties :: ScalableTargetActionProperty -> ResourceProperties
toResourceProperties ScalableTargetActionProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ScalableTargetActionProperty -> ()
maxCapacity :: ScalableTargetActionProperty -> Maybe (Value Integer)
minCapacity :: ScalableTargetActionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maxCapacity :: Maybe (Value Integer)
minCapacity :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApplicationAutoScaling::ScalableTarget.ScalableTargetAction",
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
"MaxCapacity" (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)
maxCapacity,
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
"MinCapacity" (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)
minCapacity])}
instance JSON.ToJSON ScalableTargetActionProperty where
toJSON :: ScalableTargetActionProperty -> Value
toJSON ScalableTargetActionProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ScalableTargetActionProperty -> ()
maxCapacity :: ScalableTargetActionProperty -> Maybe (Value Integer)
minCapacity :: ScalableTargetActionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maxCapacity :: Maybe (Value Integer)
minCapacity :: 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
"MaxCapacity" (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)
maxCapacity,
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
"MinCapacity" (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)
minCapacity]))
instance Property "MaxCapacity" ScalableTargetActionProperty where
type PropertyType "MaxCapacity" ScalableTargetActionProperty = Value Prelude.Integer
set :: PropertyType "MaxCapacity" ScalableTargetActionProperty
-> ScalableTargetActionProperty -> ScalableTargetActionProperty
set PropertyType "MaxCapacity" ScalableTargetActionProperty
newValue ScalableTargetActionProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ScalableTargetActionProperty -> ()
maxCapacity :: ScalableTargetActionProperty -> Maybe (Value Integer)
minCapacity :: ScalableTargetActionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maxCapacity :: Maybe (Value Integer)
minCapacity :: Maybe (Value Integer)
..}
= ScalableTargetActionProperty
{maxCapacity :: Maybe (Value Integer)
maxCapacity = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxCapacity" ScalableTargetActionProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
minCapacity :: Maybe (Value Integer)
haddock_workaround_ :: ()
minCapacity :: Maybe (Value Integer)
..}
instance Property "MinCapacity" ScalableTargetActionProperty where
type PropertyType "MinCapacity" ScalableTargetActionProperty = Value Prelude.Integer
set :: PropertyType "MinCapacity" ScalableTargetActionProperty
-> ScalableTargetActionProperty -> ScalableTargetActionProperty
set PropertyType "MinCapacity" ScalableTargetActionProperty
newValue ScalableTargetActionProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ScalableTargetActionProperty -> ()
maxCapacity :: ScalableTargetActionProperty -> Maybe (Value Integer)
minCapacity :: ScalableTargetActionProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
maxCapacity :: Maybe (Value Integer)
minCapacity :: Maybe (Value Integer)
..}
= ScalableTargetActionProperty
{minCapacity :: Maybe (Value Integer)
minCapacity = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MinCapacity" ScalableTargetActionProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maxCapacity :: Maybe (Value Integer)
haddock_workaround_ :: ()
maxCapacity :: Maybe (Value Integer)
..}