{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.RDS.Types.ScalingConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ScalingConfiguration = ScalingConfiguration'
{
ScalingConfiguration -> Maybe Int
secondsUntilAutoPause :: Prelude.Maybe Prelude.Int,
ScalingConfiguration -> Maybe Text
timeoutAction :: Prelude.Maybe Prelude.Text,
ScalingConfiguration -> Maybe Bool
autoPause :: Prelude.Maybe Prelude.Bool,
ScalingConfiguration -> Maybe Int
maxCapacity :: Prelude.Maybe Prelude.Int,
ScalingConfiguration -> Maybe Int
minCapacity :: Prelude.Maybe Prelude.Int,
ScalingConfiguration -> Maybe Int
secondsBeforeTimeout :: Prelude.Maybe Prelude.Int
}
deriving (ScalingConfiguration -> ScalingConfiguration -> Bool
(ScalingConfiguration -> ScalingConfiguration -> Bool)
-> (ScalingConfiguration -> ScalingConfiguration -> Bool)
-> Eq ScalingConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScalingConfiguration -> ScalingConfiguration -> Bool
$c/= :: ScalingConfiguration -> ScalingConfiguration -> Bool
== :: ScalingConfiguration -> ScalingConfiguration -> Bool
$c== :: ScalingConfiguration -> ScalingConfiguration -> Bool
Prelude.Eq, ReadPrec [ScalingConfiguration]
ReadPrec ScalingConfiguration
Int -> ReadS ScalingConfiguration
ReadS [ScalingConfiguration]
(Int -> ReadS ScalingConfiguration)
-> ReadS [ScalingConfiguration]
-> ReadPrec ScalingConfiguration
-> ReadPrec [ScalingConfiguration]
-> Read ScalingConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScalingConfiguration]
$creadListPrec :: ReadPrec [ScalingConfiguration]
readPrec :: ReadPrec ScalingConfiguration
$creadPrec :: ReadPrec ScalingConfiguration
readList :: ReadS [ScalingConfiguration]
$creadList :: ReadS [ScalingConfiguration]
readsPrec :: Int -> ReadS ScalingConfiguration
$creadsPrec :: Int -> ReadS ScalingConfiguration
Prelude.Read, Int -> ScalingConfiguration -> ShowS
[ScalingConfiguration] -> ShowS
ScalingConfiguration -> String
(Int -> ScalingConfiguration -> ShowS)
-> (ScalingConfiguration -> String)
-> ([ScalingConfiguration] -> ShowS)
-> Show ScalingConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScalingConfiguration] -> ShowS
$cshowList :: [ScalingConfiguration] -> ShowS
show :: ScalingConfiguration -> String
$cshow :: ScalingConfiguration -> String
showsPrec :: Int -> ScalingConfiguration -> ShowS
$cshowsPrec :: Int -> ScalingConfiguration -> ShowS
Prelude.Show, (forall x. ScalingConfiguration -> Rep ScalingConfiguration x)
-> (forall x. Rep ScalingConfiguration x -> ScalingConfiguration)
-> Generic ScalingConfiguration
forall x. Rep ScalingConfiguration x -> ScalingConfiguration
forall x. ScalingConfiguration -> Rep ScalingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScalingConfiguration x -> ScalingConfiguration
$cfrom :: forall x. ScalingConfiguration -> Rep ScalingConfiguration x
Prelude.Generic)
newScalingConfiguration ::
ScalingConfiguration
newScalingConfiguration :: ScalingConfiguration
newScalingConfiguration =
ScalingConfiguration' :: Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> ScalingConfiguration
ScalingConfiguration'
{ $sel:secondsUntilAutoPause:ScalingConfiguration' :: Maybe Int
secondsUntilAutoPause =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutAction:ScalingConfiguration' :: Maybe Text
timeoutAction = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:autoPause:ScalingConfiguration' :: Maybe Bool
autoPause = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:maxCapacity:ScalingConfiguration' :: Maybe Int
maxCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:minCapacity:ScalingConfiguration' :: Maybe Int
minCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:secondsBeforeTimeout:ScalingConfiguration' :: Maybe Int
secondsBeforeTimeout = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
scalingConfiguration_secondsUntilAutoPause :: Lens.Lens' ScalingConfiguration (Prelude.Maybe Prelude.Int)
scalingConfiguration_secondsUntilAutoPause :: (Maybe Int -> f (Maybe Int))
-> ScalingConfiguration -> f ScalingConfiguration
scalingConfiguration_secondsUntilAutoPause = (ScalingConfiguration -> Maybe Int)
-> (ScalingConfiguration -> Maybe Int -> ScalingConfiguration)
-> Lens
ScalingConfiguration ScalingConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfiguration' {Maybe Int
secondsUntilAutoPause :: Maybe Int
$sel:secondsUntilAutoPause:ScalingConfiguration' :: ScalingConfiguration -> Maybe Int
secondsUntilAutoPause} -> Maybe Int
secondsUntilAutoPause) (\s :: ScalingConfiguration
s@ScalingConfiguration' {} Maybe Int
a -> ScalingConfiguration
s {$sel:secondsUntilAutoPause:ScalingConfiguration' :: Maybe Int
secondsUntilAutoPause = Maybe Int
a} :: ScalingConfiguration)
scalingConfiguration_timeoutAction :: Lens.Lens' ScalingConfiguration (Prelude.Maybe Prelude.Text)
scalingConfiguration_timeoutAction :: (Maybe Text -> f (Maybe Text))
-> ScalingConfiguration -> f ScalingConfiguration
scalingConfiguration_timeoutAction = (ScalingConfiguration -> Maybe Text)
-> (ScalingConfiguration -> Maybe Text -> ScalingConfiguration)
-> Lens
ScalingConfiguration ScalingConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfiguration' {Maybe Text
timeoutAction :: Maybe Text
$sel:timeoutAction:ScalingConfiguration' :: ScalingConfiguration -> Maybe Text
timeoutAction} -> Maybe Text
timeoutAction) (\s :: ScalingConfiguration
s@ScalingConfiguration' {} Maybe Text
a -> ScalingConfiguration
s {$sel:timeoutAction:ScalingConfiguration' :: Maybe Text
timeoutAction = Maybe Text
a} :: ScalingConfiguration)
scalingConfiguration_autoPause :: Lens.Lens' ScalingConfiguration (Prelude.Maybe Prelude.Bool)
scalingConfiguration_autoPause :: (Maybe Bool -> f (Maybe Bool))
-> ScalingConfiguration -> f ScalingConfiguration
scalingConfiguration_autoPause = (ScalingConfiguration -> Maybe Bool)
-> (ScalingConfiguration -> Maybe Bool -> ScalingConfiguration)
-> Lens
ScalingConfiguration ScalingConfiguration (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfiguration' {Maybe Bool
autoPause :: Maybe Bool
$sel:autoPause:ScalingConfiguration' :: ScalingConfiguration -> Maybe Bool
autoPause} -> Maybe Bool
autoPause) (\s :: ScalingConfiguration
s@ScalingConfiguration' {} Maybe Bool
a -> ScalingConfiguration
s {$sel:autoPause:ScalingConfiguration' :: Maybe Bool
autoPause = Maybe Bool
a} :: ScalingConfiguration)
scalingConfiguration_maxCapacity :: Lens.Lens' ScalingConfiguration (Prelude.Maybe Prelude.Int)
scalingConfiguration_maxCapacity :: (Maybe Int -> f (Maybe Int))
-> ScalingConfiguration -> f ScalingConfiguration
scalingConfiguration_maxCapacity = (ScalingConfiguration -> Maybe Int)
-> (ScalingConfiguration -> Maybe Int -> ScalingConfiguration)
-> Lens
ScalingConfiguration ScalingConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfiguration' {Maybe Int
maxCapacity :: Maybe Int
$sel:maxCapacity:ScalingConfiguration' :: ScalingConfiguration -> Maybe Int
maxCapacity} -> Maybe Int
maxCapacity) (\s :: ScalingConfiguration
s@ScalingConfiguration' {} Maybe Int
a -> ScalingConfiguration
s {$sel:maxCapacity:ScalingConfiguration' :: Maybe Int
maxCapacity = Maybe Int
a} :: ScalingConfiguration)
scalingConfiguration_minCapacity :: Lens.Lens' ScalingConfiguration (Prelude.Maybe Prelude.Int)
scalingConfiguration_minCapacity :: (Maybe Int -> f (Maybe Int))
-> ScalingConfiguration -> f ScalingConfiguration
scalingConfiguration_minCapacity = (ScalingConfiguration -> Maybe Int)
-> (ScalingConfiguration -> Maybe Int -> ScalingConfiguration)
-> Lens
ScalingConfiguration ScalingConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfiguration' {Maybe Int
minCapacity :: Maybe Int
$sel:minCapacity:ScalingConfiguration' :: ScalingConfiguration -> Maybe Int
minCapacity} -> Maybe Int
minCapacity) (\s :: ScalingConfiguration
s@ScalingConfiguration' {} Maybe Int
a -> ScalingConfiguration
s {$sel:minCapacity:ScalingConfiguration' :: Maybe Int
minCapacity = Maybe Int
a} :: ScalingConfiguration)
scalingConfiguration_secondsBeforeTimeout :: Lens.Lens' ScalingConfiguration (Prelude.Maybe Prelude.Int)
scalingConfiguration_secondsBeforeTimeout :: (Maybe Int -> f (Maybe Int))
-> ScalingConfiguration -> f ScalingConfiguration
scalingConfiguration_secondsBeforeTimeout = (ScalingConfiguration -> Maybe Int)
-> (ScalingConfiguration -> Maybe Int -> ScalingConfiguration)
-> Lens
ScalingConfiguration ScalingConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfiguration' {Maybe Int
secondsBeforeTimeout :: Maybe Int
$sel:secondsBeforeTimeout:ScalingConfiguration' :: ScalingConfiguration -> Maybe Int
secondsBeforeTimeout} -> Maybe Int
secondsBeforeTimeout) (\s :: ScalingConfiguration
s@ScalingConfiguration' {} Maybe Int
a -> ScalingConfiguration
s {$sel:secondsBeforeTimeout:ScalingConfiguration' :: Maybe Int
secondsBeforeTimeout = Maybe Int
a} :: ScalingConfiguration)
instance Prelude.Hashable ScalingConfiguration
instance Prelude.NFData ScalingConfiguration
instance Core.ToQuery ScalingConfiguration where
toQuery :: ScalingConfiguration -> QueryString
toQuery ScalingConfiguration' {Maybe Bool
Maybe Int
Maybe Text
secondsBeforeTimeout :: Maybe Int
minCapacity :: Maybe Int
maxCapacity :: Maybe Int
autoPause :: Maybe Bool
timeoutAction :: Maybe Text
secondsUntilAutoPause :: Maybe Int
$sel:secondsBeforeTimeout:ScalingConfiguration' :: ScalingConfiguration -> Maybe Int
$sel:minCapacity:ScalingConfiguration' :: ScalingConfiguration -> Maybe Int
$sel:maxCapacity:ScalingConfiguration' :: ScalingConfiguration -> Maybe Int
$sel:autoPause:ScalingConfiguration' :: ScalingConfiguration -> Maybe Bool
$sel:timeoutAction:ScalingConfiguration' :: ScalingConfiguration -> Maybe Text
$sel:secondsUntilAutoPause:ScalingConfiguration' :: ScalingConfiguration -> Maybe Int
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"SecondsUntilAutoPause"
ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
secondsUntilAutoPause,
ByteString
"TimeoutAction" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
timeoutAction,
ByteString
"AutoPause" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
autoPause,
ByteString
"MaxCapacity" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxCapacity,
ByteString
"MinCapacity" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
minCapacity,
ByteString
"SecondsBeforeTimeout" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
secondsBeforeTimeout
]