{-# 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.DynamoDB.Types.AutoScalingTargetTrackingScalingPolicyConfigurationDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutoScalingTargetTrackingScalingPolicyConfigurationDescription = AutoScalingTargetTrackingScalingPolicyConfigurationDescription'
{
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Int
scaleInCooldown :: Prelude.Maybe Prelude.Int,
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Bool
disableScaleIn :: Prelude.Maybe Prelude.Bool,
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Int
scaleOutCooldown :: Prelude.Maybe Prelude.Int,
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Double
targetValue :: Prelude.Double
}
deriving (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Bool
(AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Bool)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Bool)
-> Eq
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Bool
$c/= :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Bool
== :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Bool
$c== :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Bool
Prelude.Eq, ReadPrec
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
ReadPrec
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
Int
-> ReadS
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
ReadS
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
(Int
-> ReadS
AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> ReadS
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
-> ReadPrec
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> ReadPrec
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
-> Read
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
$creadListPrec :: ReadPrec
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
readPrec :: ReadPrec
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
$creadPrec :: ReadPrec
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
readList :: ReadS
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
$creadList :: ReadS
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
readsPrec :: Int
-> ReadS
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
$creadsPrec :: Int
-> ReadS
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
Prelude.Read, Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> ShowS
[AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
-> ShowS
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> String
(Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> ShowS)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> String)
-> ([AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
-> ShowS)
-> Show
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
-> ShowS
$cshowList :: [AutoScalingTargetTrackingScalingPolicyConfigurationDescription]
-> ShowS
show :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> String
$cshow :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> String
showsPrec :: Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> ShowS
$cshowsPrec :: Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> ShowS
Prelude.Show, (forall x.
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Rep
AutoScalingTargetTrackingScalingPolicyConfigurationDescription x)
-> (forall x.
Rep
AutoScalingTargetTrackingScalingPolicyConfigurationDescription x
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Generic
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
forall x.
Rep
AutoScalingTargetTrackingScalingPolicyConfigurationDescription x
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
forall x.
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Rep
AutoScalingTargetTrackingScalingPolicyConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep
AutoScalingTargetTrackingScalingPolicyConfigurationDescription x
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
$cfrom :: forall x.
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Rep
AutoScalingTargetTrackingScalingPolicyConfigurationDescription x
Prelude.Generic)
newAutoScalingTargetTrackingScalingPolicyConfigurationDescription ::
Prelude.Double ->
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
newAutoScalingTargetTrackingScalingPolicyConfigurationDescription :: Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
newAutoScalingTargetTrackingScalingPolicyConfigurationDescription
Double
pTargetValue_ =
AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Maybe Int
-> Maybe Bool
-> Maybe Int
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
AutoScalingTargetTrackingScalingPolicyConfigurationDescription'
{ $sel:scaleInCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Maybe Int
scaleInCooldown =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:disableScaleIn:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Maybe Bool
disableScaleIn =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:scaleOutCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Maybe Int
scaleOutCooldown =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:targetValue:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Double
targetValue =
Double
pTargetValue_
}
autoScalingTargetTrackingScalingPolicyConfigurationDescription_scaleInCooldown :: Lens.Lens' AutoScalingTargetTrackingScalingPolicyConfigurationDescription (Prelude.Maybe Prelude.Int)
autoScalingTargetTrackingScalingPolicyConfigurationDescription_scaleInCooldown :: (Maybe Int -> f (Maybe Int))
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> f AutoScalingTargetTrackingScalingPolicyConfigurationDescription
autoScalingTargetTrackingScalingPolicyConfigurationDescription_scaleInCooldown = (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Int)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Lens
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingTargetTrackingScalingPolicyConfigurationDescription' {Maybe Int
scaleInCooldown :: Maybe Int
$sel:scaleInCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Int
scaleInCooldown} -> Maybe Int
scaleInCooldown) (\s :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
s@AutoScalingTargetTrackingScalingPolicyConfigurationDescription' {} Maybe Int
a -> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
s {$sel:scaleInCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Maybe Int
scaleInCooldown = Maybe Int
a} :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
autoScalingTargetTrackingScalingPolicyConfigurationDescription_disableScaleIn :: Lens.Lens' AutoScalingTargetTrackingScalingPolicyConfigurationDescription (Prelude.Maybe Prelude.Bool)
autoScalingTargetTrackingScalingPolicyConfigurationDescription_disableScaleIn :: (Maybe Bool -> f (Maybe Bool))
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> f AutoScalingTargetTrackingScalingPolicyConfigurationDescription
autoScalingTargetTrackingScalingPolicyConfigurationDescription_disableScaleIn = (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Bool)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Bool
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Lens
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingTargetTrackingScalingPolicyConfigurationDescription' {Maybe Bool
disableScaleIn :: Maybe Bool
$sel:disableScaleIn:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Bool
disableScaleIn} -> Maybe Bool
disableScaleIn) (\s :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
s@AutoScalingTargetTrackingScalingPolicyConfigurationDescription' {} Maybe Bool
a -> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
s {$sel:disableScaleIn:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Maybe Bool
disableScaleIn = Maybe Bool
a} :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
autoScalingTargetTrackingScalingPolicyConfigurationDescription_scaleOutCooldown :: Lens.Lens' AutoScalingTargetTrackingScalingPolicyConfigurationDescription (Prelude.Maybe Prelude.Int)
autoScalingTargetTrackingScalingPolicyConfigurationDescription_scaleOutCooldown :: (Maybe Int -> f (Maybe Int))
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> f AutoScalingTargetTrackingScalingPolicyConfigurationDescription
autoScalingTargetTrackingScalingPolicyConfigurationDescription_scaleOutCooldown = (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Int)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Lens
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingTargetTrackingScalingPolicyConfigurationDescription' {Maybe Int
scaleOutCooldown :: Maybe Int
$sel:scaleOutCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Maybe Int
scaleOutCooldown} -> Maybe Int
scaleOutCooldown) (\s :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
s@AutoScalingTargetTrackingScalingPolicyConfigurationDescription' {} Maybe Int
a -> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
s {$sel:scaleOutCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Maybe Int
scaleOutCooldown = Maybe Int
a} :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
autoScalingTargetTrackingScalingPolicyConfigurationDescription_targetValue :: Lens.Lens' AutoScalingTargetTrackingScalingPolicyConfigurationDescription Prelude.Double
autoScalingTargetTrackingScalingPolicyConfigurationDescription_targetValue :: (Double -> f Double)
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> f AutoScalingTargetTrackingScalingPolicyConfigurationDescription
autoScalingTargetTrackingScalingPolicyConfigurationDescription_targetValue = (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Double)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Lens
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
Double
Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingTargetTrackingScalingPolicyConfigurationDescription' {Double
targetValue :: Double
$sel:targetValue:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
-> Double
targetValue} -> Double
targetValue) (\s :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription
s@AutoScalingTargetTrackingScalingPolicyConfigurationDescription' {} Double
a -> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
s {$sel:targetValue:AutoScalingTargetTrackingScalingPolicyConfigurationDescription' :: Double
targetValue = Double
a} :: AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
instance
Core.FromJSON
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
where
parseJSON :: Value
-> Parser
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
parseJSON =
String
-> (Object
-> Parser
AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Value
-> Parser
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AutoScalingTargetTrackingScalingPolicyConfigurationDescription"
( \Object
x ->
Maybe Int
-> Maybe Bool
-> Maybe Int
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription
AutoScalingTargetTrackingScalingPolicyConfigurationDescription'
(Maybe Int
-> Maybe Bool
-> Maybe Int
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Parser (Maybe Int)
-> Parser
(Maybe Bool
-> Maybe Int
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
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
"ScaleInCooldown")
Parser
(Maybe Bool
-> Maybe Int
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Parser (Maybe Bool)
-> Parser
(Maybe Int
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisableScaleIn")
Parser
(Maybe Int
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Parser (Maybe Int)
-> Parser
(Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
forall (f :: * -> *) a b. Applicative f => 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
"ScaleOutCooldown")
Parser
(Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationDescription)
-> Parser Double
-> Parser
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Double
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TargetValue")
)
instance
Prelude.Hashable
AutoScalingTargetTrackingScalingPolicyConfigurationDescription
instance
Prelude.NFData
AutoScalingTargetTrackingScalingPolicyConfigurationDescription