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