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