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