{-# 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.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutoScalingTargetTrackingScalingPolicyConfigurationUpdate = AutoScalingTargetTrackingScalingPolicyConfigurationUpdate'
{
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int
scaleInCooldown :: Prelude.Maybe Prelude.Int,
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Bool
disableScaleIn :: Prelude.Maybe Prelude.Bool,
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int
scaleOutCooldown :: Prelude.Maybe Prelude.Int,
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate -> Double
targetValue :: Prelude.Double
}
deriving (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Bool
(AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Bool)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Bool)
-> Eq AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Bool
$c/= :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Bool
== :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Bool
$c== :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Bool
Prelude.Eq, ReadPrec
[AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
ReadPrec AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
Int
-> ReadS AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
ReadS [AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
(Int
-> ReadS AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
-> ReadS
[AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
-> ReadPrec
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> ReadPrec
[AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
-> Read AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
[AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
$creadListPrec :: ReadPrec
[AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
readPrec :: ReadPrec AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
$creadPrec :: ReadPrec AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
readList :: ReadS [AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
$creadList :: ReadS [AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
readsPrec :: Int
-> ReadS AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
$creadsPrec :: Int
-> ReadS AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
Prelude.Read, Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> ShowS
[AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
-> ShowS
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate -> String
(Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> ShowS)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> String)
-> ([AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
-> ShowS)
-> Show AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
-> ShowS
$cshowList :: [AutoScalingTargetTrackingScalingPolicyConfigurationUpdate]
-> ShowS
show :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate -> String
$cshow :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate -> String
showsPrec :: Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> ShowS
$cshowsPrec :: Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> ShowS
Prelude.Show, (forall x.
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Rep AutoScalingTargetTrackingScalingPolicyConfigurationUpdate x)
-> (forall x.
Rep AutoScalingTargetTrackingScalingPolicyConfigurationUpdate x
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
-> Generic
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
forall x.
Rep AutoScalingTargetTrackingScalingPolicyConfigurationUpdate x
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
forall x.
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Rep AutoScalingTargetTrackingScalingPolicyConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AutoScalingTargetTrackingScalingPolicyConfigurationUpdate x
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
$cfrom :: forall x.
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Rep AutoScalingTargetTrackingScalingPolicyConfigurationUpdate x
Prelude.Generic)
newAutoScalingTargetTrackingScalingPolicyConfigurationUpdate ::
Prelude.Double ->
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
newAutoScalingTargetTrackingScalingPolicyConfigurationUpdate :: Double -> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
newAutoScalingTargetTrackingScalingPolicyConfigurationUpdate
Double
pTargetValue_ =
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Maybe Int
-> Maybe Bool
-> Maybe Int
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate'
{ $sel:scaleInCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Maybe Int
scaleInCooldown =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:disableScaleIn:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Maybe Bool
disableScaleIn =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:scaleOutCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Maybe Int
scaleOutCooldown =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:targetValue:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Double
targetValue =
Double
pTargetValue_
}
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_scaleInCooldown :: Lens.Lens' AutoScalingTargetTrackingScalingPolicyConfigurationUpdate (Prelude.Maybe Prelude.Int)
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_scaleInCooldown :: (Maybe Int -> f (Maybe Int))
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> f AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_scaleInCooldown = (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
-> Lens
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {Maybe Int
scaleInCooldown :: Maybe Int
$sel:scaleInCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int
scaleInCooldown} -> Maybe Int
scaleInCooldown) (\s :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
s@AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {} Maybe Int
a -> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
s {$sel:scaleInCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Maybe Int
scaleInCooldown = Maybe Int
a} :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_disableScaleIn :: Lens.Lens' AutoScalingTargetTrackingScalingPolicyConfigurationUpdate (Prelude.Maybe Prelude.Bool)
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_disableScaleIn :: (Maybe Bool -> f (Maybe Bool))
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> f AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_disableScaleIn = (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Bool)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Bool
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
-> Lens
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {Maybe Bool
disableScaleIn :: Maybe Bool
$sel:disableScaleIn:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Bool
disableScaleIn} -> Maybe Bool
disableScaleIn) (\s :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
s@AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {} Maybe Bool
a -> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
s {$sel:disableScaleIn:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Maybe Bool
disableScaleIn = Maybe Bool
a} :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_scaleOutCooldown :: Lens.Lens' AutoScalingTargetTrackingScalingPolicyConfigurationUpdate (Prelude.Maybe Prelude.Int)
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_scaleOutCooldown :: (Maybe Int -> f (Maybe Int))
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> f AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_scaleOutCooldown = (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
-> Lens
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {Maybe Int
scaleOutCooldown :: Maybe Int
$sel:scaleOutCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int
scaleOutCooldown} -> Maybe Int
scaleOutCooldown) (\s :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
s@AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {} Maybe Int
a -> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
s {$sel:scaleOutCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Maybe Int
scaleOutCooldown = Maybe Int
a} :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_targetValue :: Lens.Lens' AutoScalingTargetTrackingScalingPolicyConfigurationUpdate Prelude.Double
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_targetValue :: (Double -> f Double)
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> f AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
autoScalingTargetTrackingScalingPolicyConfigurationUpdate_targetValue = (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Double)
-> (AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Double
-> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
-> Lens
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
Double
Double
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {Double
targetValue :: Double
$sel:targetValue:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate -> Double
targetValue} -> Double
targetValue) (\s :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
s@AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {} Double
a -> AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
s {$sel:targetValue:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: Double
targetValue = Double
a} :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)
instance
Prelude.Hashable
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
instance
Prelude.NFData
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
instance
Core.ToJSON
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
where
toJSON :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate -> Value
toJSON
AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' {Double
Maybe Bool
Maybe Int
targetValue :: Double
scaleOutCooldown :: Maybe Int
disableScaleIn :: Maybe Bool
scaleInCooldown :: Maybe Int
$sel:targetValue:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate -> Double
$sel:scaleOutCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int
$sel:disableScaleIn:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Bool
$sel:scaleInCooldown:AutoScalingTargetTrackingScalingPolicyConfigurationUpdate' :: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate
-> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ScaleInCooldown" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
scaleInCooldown,
(Text
"DisableScaleIn" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableScaleIn,
(Text
"ScaleOutCooldown" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
scaleOutCooldown,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TargetValue" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Double
targetValue)
]
)