{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ScaleOutPolicyUpdate = ScaleOutPolicyUpdate'
{
ScaleOutPolicyUpdate -> Natural
cpuUtilizationPercentage :: Prelude.Natural
}
deriving (ScaleOutPolicyUpdate -> ScaleOutPolicyUpdate -> Bool
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]
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
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. 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'
{ $sel:cpuUtilizationPercentage:ScaleOutPolicyUpdate' :: Natural
cpuUtilizationPercentage =
Natural
pCpuUtilizationPercentage_
}
scaleOutPolicyUpdate_cpuUtilizationPercentage :: Lens.Lens' ScaleOutPolicyUpdate Prelude.Natural
scaleOutPolicyUpdate_cpuUtilizationPercentage :: Lens' ScaleOutPolicyUpdate Natural
scaleOutPolicyUpdate_cpuUtilizationPercentage = 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 where
hashWithSalt :: Int -> ScaleOutPolicyUpdate -> Int
hashWithSalt Int
_salt ScaleOutPolicyUpdate' {Natural
cpuUtilizationPercentage :: Natural
$sel:cpuUtilizationPercentage:ScaleOutPolicyUpdate' :: ScaleOutPolicyUpdate -> Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
cpuUtilizationPercentage
instance Prelude.NFData ScaleOutPolicyUpdate where
rnf :: ScaleOutPolicyUpdate -> ()
rnf ScaleOutPolicyUpdate' {Natural
cpuUtilizationPercentage :: Natural
$sel:cpuUtilizationPercentage:ScaleOutPolicyUpdate' :: ScaleOutPolicyUpdate -> Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Natural
cpuUtilizationPercentage
instance Data.ToJSON ScaleOutPolicyUpdate where
toJSON :: ScaleOutPolicyUpdate -> Value
toJSON ScaleOutPolicyUpdate' {Natural
cpuUtilizationPercentage :: Natural
$sel:cpuUtilizationPercentage:ScaleOutPolicyUpdate' :: ScaleOutPolicyUpdate -> Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"cpuUtilizationPercentage"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
cpuUtilizationPercentage
)
]
)