{-# 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.ServerlessV2ScalingConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ServerlessV2ScalingConfiguration = ServerlessV2ScalingConfiguration'
{
ServerlessV2ScalingConfiguration -> Maybe Double
maxCapacity :: Prelude.Maybe Prelude.Double,
ServerlessV2ScalingConfiguration -> Maybe Double
minCapacity :: Prelude.Maybe Prelude.Double
}
deriving (ServerlessV2ScalingConfiguration
-> ServerlessV2ScalingConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServerlessV2ScalingConfiguration
-> ServerlessV2ScalingConfiguration -> Bool
$c/= :: ServerlessV2ScalingConfiguration
-> ServerlessV2ScalingConfiguration -> Bool
== :: ServerlessV2ScalingConfiguration
-> ServerlessV2ScalingConfiguration -> Bool
$c== :: ServerlessV2ScalingConfiguration
-> ServerlessV2ScalingConfiguration -> Bool
Prelude.Eq, ReadPrec [ServerlessV2ScalingConfiguration]
ReadPrec ServerlessV2ScalingConfiguration
Int -> ReadS ServerlessV2ScalingConfiguration
ReadS [ServerlessV2ScalingConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServerlessV2ScalingConfiguration]
$creadListPrec :: ReadPrec [ServerlessV2ScalingConfiguration]
readPrec :: ReadPrec ServerlessV2ScalingConfiguration
$creadPrec :: ReadPrec ServerlessV2ScalingConfiguration
readList :: ReadS [ServerlessV2ScalingConfiguration]
$creadList :: ReadS [ServerlessV2ScalingConfiguration]
readsPrec :: Int -> ReadS ServerlessV2ScalingConfiguration
$creadsPrec :: Int -> ReadS ServerlessV2ScalingConfiguration
Prelude.Read, Int -> ServerlessV2ScalingConfiguration -> ShowS
[ServerlessV2ScalingConfiguration] -> ShowS
ServerlessV2ScalingConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServerlessV2ScalingConfiguration] -> ShowS
$cshowList :: [ServerlessV2ScalingConfiguration] -> ShowS
show :: ServerlessV2ScalingConfiguration -> String
$cshow :: ServerlessV2ScalingConfiguration -> String
showsPrec :: Int -> ServerlessV2ScalingConfiguration -> ShowS
$cshowsPrec :: Int -> ServerlessV2ScalingConfiguration -> ShowS
Prelude.Show, forall x.
Rep ServerlessV2ScalingConfiguration x
-> ServerlessV2ScalingConfiguration
forall x.
ServerlessV2ScalingConfiguration
-> Rep ServerlessV2ScalingConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServerlessV2ScalingConfiguration x
-> ServerlessV2ScalingConfiguration
$cfrom :: forall x.
ServerlessV2ScalingConfiguration
-> Rep ServerlessV2ScalingConfiguration x
Prelude.Generic)
newServerlessV2ScalingConfiguration ::
ServerlessV2ScalingConfiguration
newServerlessV2ScalingConfiguration :: ServerlessV2ScalingConfiguration
newServerlessV2ScalingConfiguration =
ServerlessV2ScalingConfiguration'
{ $sel:maxCapacity:ServerlessV2ScalingConfiguration' :: Maybe Double
maxCapacity =
forall a. Maybe a
Prelude.Nothing,
$sel:minCapacity:ServerlessV2ScalingConfiguration' :: Maybe Double
minCapacity = forall a. Maybe a
Prelude.Nothing
}
serverlessV2ScalingConfiguration_maxCapacity :: Lens.Lens' ServerlessV2ScalingConfiguration (Prelude.Maybe Prelude.Double)
serverlessV2ScalingConfiguration_maxCapacity :: Lens' ServerlessV2ScalingConfiguration (Maybe Double)
serverlessV2ScalingConfiguration_maxCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerlessV2ScalingConfiguration' {Maybe Double
maxCapacity :: Maybe Double
$sel:maxCapacity:ServerlessV2ScalingConfiguration' :: ServerlessV2ScalingConfiguration -> Maybe Double
maxCapacity} -> Maybe Double
maxCapacity) (\s :: ServerlessV2ScalingConfiguration
s@ServerlessV2ScalingConfiguration' {} Maybe Double
a -> ServerlessV2ScalingConfiguration
s {$sel:maxCapacity:ServerlessV2ScalingConfiguration' :: Maybe Double
maxCapacity = Maybe Double
a} :: ServerlessV2ScalingConfiguration)
serverlessV2ScalingConfiguration_minCapacity :: Lens.Lens' ServerlessV2ScalingConfiguration (Prelude.Maybe Prelude.Double)
serverlessV2ScalingConfiguration_minCapacity :: Lens' ServerlessV2ScalingConfiguration (Maybe Double)
serverlessV2ScalingConfiguration_minCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServerlessV2ScalingConfiguration' {Maybe Double
minCapacity :: Maybe Double
$sel:minCapacity:ServerlessV2ScalingConfiguration' :: ServerlessV2ScalingConfiguration -> Maybe Double
minCapacity} -> Maybe Double
minCapacity) (\s :: ServerlessV2ScalingConfiguration
s@ServerlessV2ScalingConfiguration' {} Maybe Double
a -> ServerlessV2ScalingConfiguration
s {$sel:minCapacity:ServerlessV2ScalingConfiguration' :: Maybe Double
minCapacity = Maybe Double
a} :: ServerlessV2ScalingConfiguration)
instance
Prelude.Hashable
ServerlessV2ScalingConfiguration
where
hashWithSalt :: Int -> ServerlessV2ScalingConfiguration -> Int
hashWithSalt
Int
_salt
ServerlessV2ScalingConfiguration' {Maybe Double
minCapacity :: Maybe Double
maxCapacity :: Maybe Double
$sel:minCapacity:ServerlessV2ScalingConfiguration' :: ServerlessV2ScalingConfiguration -> Maybe Double
$sel:maxCapacity:ServerlessV2ScalingConfiguration' :: ServerlessV2ScalingConfiguration -> Maybe Double
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
maxCapacity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
minCapacity
instance
Prelude.NFData
ServerlessV2ScalingConfiguration
where
rnf :: ServerlessV2ScalingConfiguration -> ()
rnf ServerlessV2ScalingConfiguration' {Maybe Double
minCapacity :: Maybe Double
maxCapacity :: Maybe Double
$sel:minCapacity:ServerlessV2ScalingConfiguration' :: ServerlessV2ScalingConfiguration -> Maybe Double
$sel:maxCapacity:ServerlessV2ScalingConfiguration' :: ServerlessV2ScalingConfiguration -> Maybe Double
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
maxCapacity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
minCapacity
instance
Data.ToQuery
ServerlessV2ScalingConfiguration
where
toQuery :: ServerlessV2ScalingConfiguration -> QueryString
toQuery ServerlessV2ScalingConfiguration' {Maybe Double
minCapacity :: Maybe Double
maxCapacity :: Maybe Double
$sel:minCapacity:ServerlessV2ScalingConfiguration' :: ServerlessV2ScalingConfiguration -> Maybe Double
$sel:maxCapacity:ServerlessV2ScalingConfiguration' :: ServerlessV2ScalingConfiguration -> Maybe Double
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"MaxCapacity" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Double
maxCapacity,
ByteString
"MinCapacity" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Double
minCapacity
]