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