{-# 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.ScalingConfigurationInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ScalingConfigurationInfo = ScalingConfigurationInfo'
{
ScalingConfigurationInfo -> Maybe Int
secondsUntilAutoPause :: Prelude.Maybe Prelude.Int,
ScalingConfigurationInfo -> Maybe Text
timeoutAction :: Prelude.Maybe Prelude.Text,
ScalingConfigurationInfo -> Maybe Bool
autoPause :: Prelude.Maybe Prelude.Bool,
ScalingConfigurationInfo -> Maybe Int
maxCapacity :: Prelude.Maybe Prelude.Int,
ScalingConfigurationInfo -> Maybe Int
minCapacity :: Prelude.Maybe Prelude.Int,
ScalingConfigurationInfo -> Maybe Int
secondsBeforeTimeout :: Prelude.Maybe Prelude.Int
}
deriving (ScalingConfigurationInfo -> ScalingConfigurationInfo -> Bool
(ScalingConfigurationInfo -> ScalingConfigurationInfo -> Bool)
-> (ScalingConfigurationInfo -> ScalingConfigurationInfo -> Bool)
-> Eq ScalingConfigurationInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScalingConfigurationInfo -> ScalingConfigurationInfo -> Bool
$c/= :: ScalingConfigurationInfo -> ScalingConfigurationInfo -> Bool
== :: ScalingConfigurationInfo -> ScalingConfigurationInfo -> Bool
$c== :: ScalingConfigurationInfo -> ScalingConfigurationInfo -> Bool
Prelude.Eq, ReadPrec [ScalingConfigurationInfo]
ReadPrec ScalingConfigurationInfo
Int -> ReadS ScalingConfigurationInfo
ReadS [ScalingConfigurationInfo]
(Int -> ReadS ScalingConfigurationInfo)
-> ReadS [ScalingConfigurationInfo]
-> ReadPrec ScalingConfigurationInfo
-> ReadPrec [ScalingConfigurationInfo]
-> Read ScalingConfigurationInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScalingConfigurationInfo]
$creadListPrec :: ReadPrec [ScalingConfigurationInfo]
readPrec :: ReadPrec ScalingConfigurationInfo
$creadPrec :: ReadPrec ScalingConfigurationInfo
readList :: ReadS [ScalingConfigurationInfo]
$creadList :: ReadS [ScalingConfigurationInfo]
readsPrec :: Int -> ReadS ScalingConfigurationInfo
$creadsPrec :: Int -> ReadS ScalingConfigurationInfo
Prelude.Read, Int -> ScalingConfigurationInfo -> ShowS
[ScalingConfigurationInfo] -> ShowS
ScalingConfigurationInfo -> String
(Int -> ScalingConfigurationInfo -> ShowS)
-> (ScalingConfigurationInfo -> String)
-> ([ScalingConfigurationInfo] -> ShowS)
-> Show ScalingConfigurationInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScalingConfigurationInfo] -> ShowS
$cshowList :: [ScalingConfigurationInfo] -> ShowS
show :: ScalingConfigurationInfo -> String
$cshow :: ScalingConfigurationInfo -> String
showsPrec :: Int -> ScalingConfigurationInfo -> ShowS
$cshowsPrec :: Int -> ScalingConfigurationInfo -> ShowS
Prelude.Show, (forall x.
ScalingConfigurationInfo -> Rep ScalingConfigurationInfo x)
-> (forall x.
Rep ScalingConfigurationInfo x -> ScalingConfigurationInfo)
-> Generic ScalingConfigurationInfo
forall x.
Rep ScalingConfigurationInfo x -> ScalingConfigurationInfo
forall x.
ScalingConfigurationInfo -> Rep ScalingConfigurationInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScalingConfigurationInfo x -> ScalingConfigurationInfo
$cfrom :: forall x.
ScalingConfigurationInfo -> Rep ScalingConfigurationInfo x
Prelude.Generic)
newScalingConfigurationInfo ::
ScalingConfigurationInfo
newScalingConfigurationInfo :: ScalingConfigurationInfo
newScalingConfigurationInfo =
ScalingConfigurationInfo' :: Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> ScalingConfigurationInfo
ScalingConfigurationInfo'
{ $sel:secondsUntilAutoPause:ScalingConfigurationInfo' :: Maybe Int
secondsUntilAutoPause =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutAction:ScalingConfigurationInfo' :: Maybe Text
timeoutAction = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:autoPause:ScalingConfigurationInfo' :: Maybe Bool
autoPause = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:maxCapacity:ScalingConfigurationInfo' :: Maybe Int
maxCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:minCapacity:ScalingConfigurationInfo' :: Maybe Int
minCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:secondsBeforeTimeout:ScalingConfigurationInfo' :: Maybe Int
secondsBeforeTimeout = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
scalingConfigurationInfo_secondsUntilAutoPause :: Lens.Lens' ScalingConfigurationInfo (Prelude.Maybe Prelude.Int)
scalingConfigurationInfo_secondsUntilAutoPause :: (Maybe Int -> f (Maybe Int))
-> ScalingConfigurationInfo -> f ScalingConfigurationInfo
scalingConfigurationInfo_secondsUntilAutoPause = (ScalingConfigurationInfo -> Maybe Int)
-> (ScalingConfigurationInfo
-> Maybe Int -> ScalingConfigurationInfo)
-> Lens
ScalingConfigurationInfo
ScalingConfigurationInfo
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfigurationInfo' {Maybe Int
secondsUntilAutoPause :: Maybe Int
$sel:secondsUntilAutoPause:ScalingConfigurationInfo' :: ScalingConfigurationInfo -> Maybe Int
secondsUntilAutoPause} -> Maybe Int
secondsUntilAutoPause) (\s :: ScalingConfigurationInfo
s@ScalingConfigurationInfo' {} Maybe Int
a -> ScalingConfigurationInfo
s {$sel:secondsUntilAutoPause:ScalingConfigurationInfo' :: Maybe Int
secondsUntilAutoPause = Maybe Int
a} :: ScalingConfigurationInfo)
scalingConfigurationInfo_timeoutAction :: Lens.Lens' ScalingConfigurationInfo (Prelude.Maybe Prelude.Text)
scalingConfigurationInfo_timeoutAction :: (Maybe Text -> f (Maybe Text))
-> ScalingConfigurationInfo -> f ScalingConfigurationInfo
scalingConfigurationInfo_timeoutAction = (ScalingConfigurationInfo -> Maybe Text)
-> (ScalingConfigurationInfo
-> Maybe Text -> ScalingConfigurationInfo)
-> Lens
ScalingConfigurationInfo
ScalingConfigurationInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfigurationInfo' {Maybe Text
timeoutAction :: Maybe Text
$sel:timeoutAction:ScalingConfigurationInfo' :: ScalingConfigurationInfo -> Maybe Text
timeoutAction} -> Maybe Text
timeoutAction) (\s :: ScalingConfigurationInfo
s@ScalingConfigurationInfo' {} Maybe Text
a -> ScalingConfigurationInfo
s {$sel:timeoutAction:ScalingConfigurationInfo' :: Maybe Text
timeoutAction = Maybe Text
a} :: ScalingConfigurationInfo)
scalingConfigurationInfo_autoPause :: Lens.Lens' ScalingConfigurationInfo (Prelude.Maybe Prelude.Bool)
scalingConfigurationInfo_autoPause :: (Maybe Bool -> f (Maybe Bool))
-> ScalingConfigurationInfo -> f ScalingConfigurationInfo
scalingConfigurationInfo_autoPause = (ScalingConfigurationInfo -> Maybe Bool)
-> (ScalingConfigurationInfo
-> Maybe Bool -> ScalingConfigurationInfo)
-> Lens
ScalingConfigurationInfo
ScalingConfigurationInfo
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfigurationInfo' {Maybe Bool
autoPause :: Maybe Bool
$sel:autoPause:ScalingConfigurationInfo' :: ScalingConfigurationInfo -> Maybe Bool
autoPause} -> Maybe Bool
autoPause) (\s :: ScalingConfigurationInfo
s@ScalingConfigurationInfo' {} Maybe Bool
a -> ScalingConfigurationInfo
s {$sel:autoPause:ScalingConfigurationInfo' :: Maybe Bool
autoPause = Maybe Bool
a} :: ScalingConfigurationInfo)
scalingConfigurationInfo_maxCapacity :: Lens.Lens' ScalingConfigurationInfo (Prelude.Maybe Prelude.Int)
scalingConfigurationInfo_maxCapacity :: (Maybe Int -> f (Maybe Int))
-> ScalingConfigurationInfo -> f ScalingConfigurationInfo
scalingConfigurationInfo_maxCapacity = (ScalingConfigurationInfo -> Maybe Int)
-> (ScalingConfigurationInfo
-> Maybe Int -> ScalingConfigurationInfo)
-> Lens
ScalingConfigurationInfo
ScalingConfigurationInfo
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfigurationInfo' {Maybe Int
maxCapacity :: Maybe Int
$sel:maxCapacity:ScalingConfigurationInfo' :: ScalingConfigurationInfo -> Maybe Int
maxCapacity} -> Maybe Int
maxCapacity) (\s :: ScalingConfigurationInfo
s@ScalingConfigurationInfo' {} Maybe Int
a -> ScalingConfigurationInfo
s {$sel:maxCapacity:ScalingConfigurationInfo' :: Maybe Int
maxCapacity = Maybe Int
a} :: ScalingConfigurationInfo)
scalingConfigurationInfo_minCapacity :: Lens.Lens' ScalingConfigurationInfo (Prelude.Maybe Prelude.Int)
scalingConfigurationInfo_minCapacity :: (Maybe Int -> f (Maybe Int))
-> ScalingConfigurationInfo -> f ScalingConfigurationInfo
scalingConfigurationInfo_minCapacity = (ScalingConfigurationInfo -> Maybe Int)
-> (ScalingConfigurationInfo
-> Maybe Int -> ScalingConfigurationInfo)
-> Lens
ScalingConfigurationInfo
ScalingConfigurationInfo
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfigurationInfo' {Maybe Int
minCapacity :: Maybe Int
$sel:minCapacity:ScalingConfigurationInfo' :: ScalingConfigurationInfo -> Maybe Int
minCapacity} -> Maybe Int
minCapacity) (\s :: ScalingConfigurationInfo
s@ScalingConfigurationInfo' {} Maybe Int
a -> ScalingConfigurationInfo
s {$sel:minCapacity:ScalingConfigurationInfo' :: Maybe Int
minCapacity = Maybe Int
a} :: ScalingConfigurationInfo)
scalingConfigurationInfo_secondsBeforeTimeout :: Lens.Lens' ScalingConfigurationInfo (Prelude.Maybe Prelude.Int)
scalingConfigurationInfo_secondsBeforeTimeout :: (Maybe Int -> f (Maybe Int))
-> ScalingConfigurationInfo -> f ScalingConfigurationInfo
scalingConfigurationInfo_secondsBeforeTimeout = (ScalingConfigurationInfo -> Maybe Int)
-> (ScalingConfigurationInfo
-> Maybe Int -> ScalingConfigurationInfo)
-> Lens
ScalingConfigurationInfo
ScalingConfigurationInfo
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScalingConfigurationInfo' {Maybe Int
secondsBeforeTimeout :: Maybe Int
$sel:secondsBeforeTimeout:ScalingConfigurationInfo' :: ScalingConfigurationInfo -> Maybe Int
secondsBeforeTimeout} -> Maybe Int
secondsBeforeTimeout) (\s :: ScalingConfigurationInfo
s@ScalingConfigurationInfo' {} Maybe Int
a -> ScalingConfigurationInfo
s {$sel:secondsBeforeTimeout:ScalingConfigurationInfo' :: Maybe Int
secondsBeforeTimeout = Maybe Int
a} :: ScalingConfigurationInfo)
instance Core.FromXML ScalingConfigurationInfo where
parseXML :: [Node] -> Either String ScalingConfigurationInfo
parseXML [Node]
x =
Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> ScalingConfigurationInfo
ScalingConfigurationInfo'
(Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> ScalingConfigurationInfo)
-> Either String (Maybe Int)
-> Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> ScalingConfigurationInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SecondsUntilAutoPause")
Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> ScalingConfigurationInfo)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool
-> Maybe Int -> Maybe Int -> Maybe Int -> ScalingConfigurationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TimeoutAction")
Either
String
(Maybe Bool
-> Maybe Int -> Maybe Int -> Maybe Int -> ScalingConfigurationInfo)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Int -> Maybe Int -> Maybe Int -> ScalingConfigurationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutoPause")
Either
String
(Maybe Int -> Maybe Int -> Maybe Int -> ScalingConfigurationInfo)
-> Either String (Maybe Int)
-> Either
String (Maybe Int -> Maybe Int -> ScalingConfigurationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MaxCapacity")
Either String (Maybe Int -> Maybe Int -> ScalingConfigurationInfo)
-> Either String (Maybe Int)
-> Either String (Maybe Int -> ScalingConfigurationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MinCapacity")
Either String (Maybe Int -> ScalingConfigurationInfo)
-> Either String (Maybe Int)
-> Either String ScalingConfigurationInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SecondsBeforeTimeout")
instance Prelude.Hashable ScalingConfigurationInfo
instance Prelude.NFData ScalingConfigurationInfo