{-# 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.ScaleInPolicyDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ScaleInPolicyDescription = ScaleInPolicyDescription'
{
ScaleInPolicyDescription -> Maybe Int
cpuUtilizationPercentage :: Prelude.Maybe Prelude.Int
}
deriving (ScaleInPolicyDescription -> ScaleInPolicyDescription -> Bool
(ScaleInPolicyDescription -> ScaleInPolicyDescription -> Bool)
-> (ScaleInPolicyDescription -> ScaleInPolicyDescription -> Bool)
-> Eq ScaleInPolicyDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScaleInPolicyDescription -> ScaleInPolicyDescription -> Bool
$c/= :: ScaleInPolicyDescription -> ScaleInPolicyDescription -> Bool
== :: ScaleInPolicyDescription -> ScaleInPolicyDescription -> Bool
$c== :: ScaleInPolicyDescription -> ScaleInPolicyDescription -> Bool
Prelude.Eq, ReadPrec [ScaleInPolicyDescription]
ReadPrec ScaleInPolicyDescription
Int -> ReadS ScaleInPolicyDescription
ReadS [ScaleInPolicyDescription]
(Int -> ReadS ScaleInPolicyDescription)
-> ReadS [ScaleInPolicyDescription]
-> ReadPrec ScaleInPolicyDescription
-> ReadPrec [ScaleInPolicyDescription]
-> Read ScaleInPolicyDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScaleInPolicyDescription]
$creadListPrec :: ReadPrec [ScaleInPolicyDescription]
readPrec :: ReadPrec ScaleInPolicyDescription
$creadPrec :: ReadPrec ScaleInPolicyDescription
readList :: ReadS [ScaleInPolicyDescription]
$creadList :: ReadS [ScaleInPolicyDescription]
readsPrec :: Int -> ReadS ScaleInPolicyDescription
$creadsPrec :: Int -> ReadS ScaleInPolicyDescription
Prelude.Read, Int -> ScaleInPolicyDescription -> ShowS
[ScaleInPolicyDescription] -> ShowS
ScaleInPolicyDescription -> String
(Int -> ScaleInPolicyDescription -> ShowS)
-> (ScaleInPolicyDescription -> String)
-> ([ScaleInPolicyDescription] -> ShowS)
-> Show ScaleInPolicyDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScaleInPolicyDescription] -> ShowS
$cshowList :: [ScaleInPolicyDescription] -> ShowS
show :: ScaleInPolicyDescription -> String
$cshow :: ScaleInPolicyDescription -> String
showsPrec :: Int -> ScaleInPolicyDescription -> ShowS
$cshowsPrec :: Int -> ScaleInPolicyDescription -> ShowS
Prelude.Show, (forall x.
ScaleInPolicyDescription -> Rep ScaleInPolicyDescription x)
-> (forall x.
Rep ScaleInPolicyDescription x -> ScaleInPolicyDescription)
-> Generic ScaleInPolicyDescription
forall x.
Rep ScaleInPolicyDescription x -> ScaleInPolicyDescription
forall x.
ScaleInPolicyDescription -> Rep ScaleInPolicyDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ScaleInPolicyDescription x -> ScaleInPolicyDescription
$cfrom :: forall x.
ScaleInPolicyDescription -> Rep ScaleInPolicyDescription x
Prelude.Generic)
newScaleInPolicyDescription ::
ScaleInPolicyDescription
newScaleInPolicyDescription :: ScaleInPolicyDescription
newScaleInPolicyDescription =
ScaleInPolicyDescription' :: Maybe Int -> ScaleInPolicyDescription
ScaleInPolicyDescription'
{ $sel:cpuUtilizationPercentage:ScaleInPolicyDescription' :: Maybe Int
cpuUtilizationPercentage =
Maybe Int
forall a. Maybe a
Prelude.Nothing
}
scaleInPolicyDescription_cpuUtilizationPercentage :: Lens.Lens' ScaleInPolicyDescription (Prelude.Maybe Prelude.Int)
scaleInPolicyDescription_cpuUtilizationPercentage :: (Maybe Int -> f (Maybe Int))
-> ScaleInPolicyDescription -> f ScaleInPolicyDescription
scaleInPolicyDescription_cpuUtilizationPercentage = (ScaleInPolicyDescription -> Maybe Int)
-> (ScaleInPolicyDescription
-> Maybe Int -> ScaleInPolicyDescription)
-> Lens
ScaleInPolicyDescription
ScaleInPolicyDescription
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScaleInPolicyDescription' {Maybe Int
cpuUtilizationPercentage :: Maybe Int
$sel:cpuUtilizationPercentage:ScaleInPolicyDescription' :: ScaleInPolicyDescription -> Maybe Int
cpuUtilizationPercentage} -> Maybe Int
cpuUtilizationPercentage) (\s :: ScaleInPolicyDescription
s@ScaleInPolicyDescription' {} Maybe Int
a -> ScaleInPolicyDescription
s {$sel:cpuUtilizationPercentage:ScaleInPolicyDescription' :: Maybe Int
cpuUtilizationPercentage = Maybe Int
a} :: ScaleInPolicyDescription)
instance Core.FromJSON ScaleInPolicyDescription where
parseJSON :: Value -> Parser ScaleInPolicyDescription
parseJSON =
String
-> (Object -> Parser ScaleInPolicyDescription)
-> Value
-> Parser ScaleInPolicyDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ScaleInPolicyDescription"
( \Object
x ->
Maybe Int -> ScaleInPolicyDescription
ScaleInPolicyDescription'
(Maybe Int -> ScaleInPolicyDescription)
-> Parser (Maybe Int) -> Parser ScaleInPolicyDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cpuUtilizationPercentage")
)
instance Prelude.Hashable ScaleInPolicyDescription
instance Prelude.NFData ScaleInPolicyDescription