{-# 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.KafkaConnect.Types.ScaleOutPolicy where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ScaleOutPolicy = ScaleOutPolicy'
{
ScaleOutPolicy -> Natural
cpuUtilizationPercentage :: Prelude.Natural
}
deriving (ScaleOutPolicy -> ScaleOutPolicy -> Bool
(ScaleOutPolicy -> ScaleOutPolicy -> Bool)
-> (ScaleOutPolicy -> ScaleOutPolicy -> Bool) -> Eq ScaleOutPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScaleOutPolicy -> ScaleOutPolicy -> Bool
$c/= :: ScaleOutPolicy -> ScaleOutPolicy -> Bool
== :: ScaleOutPolicy -> ScaleOutPolicy -> Bool
$c== :: ScaleOutPolicy -> ScaleOutPolicy -> Bool
Prelude.Eq, ReadPrec [ScaleOutPolicy]
ReadPrec ScaleOutPolicy
Int -> ReadS ScaleOutPolicy
ReadS [ScaleOutPolicy]
(Int -> ReadS ScaleOutPolicy)
-> ReadS [ScaleOutPolicy]
-> ReadPrec ScaleOutPolicy
-> ReadPrec [ScaleOutPolicy]
-> Read ScaleOutPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScaleOutPolicy]
$creadListPrec :: ReadPrec [ScaleOutPolicy]
readPrec :: ReadPrec ScaleOutPolicy
$creadPrec :: ReadPrec ScaleOutPolicy
readList :: ReadS [ScaleOutPolicy]
$creadList :: ReadS [ScaleOutPolicy]
readsPrec :: Int -> ReadS ScaleOutPolicy
$creadsPrec :: Int -> ReadS ScaleOutPolicy
Prelude.Read, Int -> ScaleOutPolicy -> ShowS
[ScaleOutPolicy] -> ShowS
ScaleOutPolicy -> String
(Int -> ScaleOutPolicy -> ShowS)
-> (ScaleOutPolicy -> String)
-> ([ScaleOutPolicy] -> ShowS)
-> Show ScaleOutPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScaleOutPolicy] -> ShowS
$cshowList :: [ScaleOutPolicy] -> ShowS
show :: ScaleOutPolicy -> String
$cshow :: ScaleOutPolicy -> String
showsPrec :: Int -> ScaleOutPolicy -> ShowS
$cshowsPrec :: Int -> ScaleOutPolicy -> ShowS
Prelude.Show, (forall x. ScaleOutPolicy -> Rep ScaleOutPolicy x)
-> (forall x. Rep ScaleOutPolicy x -> ScaleOutPolicy)
-> Generic ScaleOutPolicy
forall x. Rep ScaleOutPolicy x -> ScaleOutPolicy
forall x. ScaleOutPolicy -> Rep ScaleOutPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScaleOutPolicy x -> ScaleOutPolicy
$cfrom :: forall x. ScaleOutPolicy -> Rep ScaleOutPolicy x
Prelude.Generic)
newScaleOutPolicy ::
Prelude.Natural ->
ScaleOutPolicy
newScaleOutPolicy :: Natural -> ScaleOutPolicy
newScaleOutPolicy Natural
pCpuUtilizationPercentage_ =
ScaleOutPolicy' :: Natural -> ScaleOutPolicy
ScaleOutPolicy'
{ $sel:cpuUtilizationPercentage:ScaleOutPolicy' :: Natural
cpuUtilizationPercentage =
Natural
pCpuUtilizationPercentage_
}
scaleOutPolicy_cpuUtilizationPercentage :: Lens.Lens' ScaleOutPolicy Prelude.Natural
scaleOutPolicy_cpuUtilizationPercentage :: (Natural -> f Natural) -> ScaleOutPolicy -> f ScaleOutPolicy
scaleOutPolicy_cpuUtilizationPercentage = (ScaleOutPolicy -> Natural)
-> (ScaleOutPolicy -> Natural -> ScaleOutPolicy)
-> Lens ScaleOutPolicy ScaleOutPolicy Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScaleOutPolicy' {Natural
cpuUtilizationPercentage :: Natural
$sel:cpuUtilizationPercentage:ScaleOutPolicy' :: ScaleOutPolicy -> Natural
cpuUtilizationPercentage} -> Natural
cpuUtilizationPercentage) (\s :: ScaleOutPolicy
s@ScaleOutPolicy' {} Natural
a -> ScaleOutPolicy
s {$sel:cpuUtilizationPercentage:ScaleOutPolicy' :: Natural
cpuUtilizationPercentage = Natural
a} :: ScaleOutPolicy)
instance Prelude.Hashable ScaleOutPolicy
instance Prelude.NFData ScaleOutPolicy
instance Core.ToJSON ScaleOutPolicy where
toJSON :: ScaleOutPolicy -> Value
toJSON ScaleOutPolicy' {Natural
cpuUtilizationPercentage :: Natural
$sel:cpuUtilizationPercentage:ScaleOutPolicy' :: ScaleOutPolicy -> Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"cpuUtilizationPercentage"
Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
cpuUtilizationPercentage
)
]
)