{-# 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.AutoScalingSettingsUpdate where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.AutoScalingPolicyUpdate
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutoScalingSettingsUpdate = AutoScalingSettingsUpdate'
{
AutoScalingSettingsUpdate -> Maybe Bool
autoScalingDisabled :: Prelude.Maybe Prelude.Bool,
AutoScalingSettingsUpdate -> Maybe Natural
minimumUnits :: Prelude.Maybe Prelude.Natural,
AutoScalingSettingsUpdate -> Maybe AutoScalingPolicyUpdate
scalingPolicyUpdate :: Prelude.Maybe AutoScalingPolicyUpdate,
AutoScalingSettingsUpdate -> Maybe Natural
maximumUnits :: Prelude.Maybe Prelude.Natural,
AutoScalingSettingsUpdate -> Maybe Text
autoScalingRoleArn :: Prelude.Maybe Prelude.Text
}
deriving (AutoScalingSettingsUpdate -> AutoScalingSettingsUpdate -> Bool
(AutoScalingSettingsUpdate -> AutoScalingSettingsUpdate -> Bool)
-> (AutoScalingSettingsUpdate -> AutoScalingSettingsUpdate -> Bool)
-> Eq AutoScalingSettingsUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoScalingSettingsUpdate -> AutoScalingSettingsUpdate -> Bool
$c/= :: AutoScalingSettingsUpdate -> AutoScalingSettingsUpdate -> Bool
== :: AutoScalingSettingsUpdate -> AutoScalingSettingsUpdate -> Bool
$c== :: AutoScalingSettingsUpdate -> AutoScalingSettingsUpdate -> Bool
Prelude.Eq, ReadPrec [AutoScalingSettingsUpdate]
ReadPrec AutoScalingSettingsUpdate
Int -> ReadS AutoScalingSettingsUpdate
ReadS [AutoScalingSettingsUpdate]
(Int -> ReadS AutoScalingSettingsUpdate)
-> ReadS [AutoScalingSettingsUpdate]
-> ReadPrec AutoScalingSettingsUpdate
-> ReadPrec [AutoScalingSettingsUpdate]
-> Read AutoScalingSettingsUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoScalingSettingsUpdate]
$creadListPrec :: ReadPrec [AutoScalingSettingsUpdate]
readPrec :: ReadPrec AutoScalingSettingsUpdate
$creadPrec :: ReadPrec AutoScalingSettingsUpdate
readList :: ReadS [AutoScalingSettingsUpdate]
$creadList :: ReadS [AutoScalingSettingsUpdate]
readsPrec :: Int -> ReadS AutoScalingSettingsUpdate
$creadsPrec :: Int -> ReadS AutoScalingSettingsUpdate
Prelude.Read, Int -> AutoScalingSettingsUpdate -> ShowS
[AutoScalingSettingsUpdate] -> ShowS
AutoScalingSettingsUpdate -> String
(Int -> AutoScalingSettingsUpdate -> ShowS)
-> (AutoScalingSettingsUpdate -> String)
-> ([AutoScalingSettingsUpdate] -> ShowS)
-> Show AutoScalingSettingsUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoScalingSettingsUpdate] -> ShowS
$cshowList :: [AutoScalingSettingsUpdate] -> ShowS
show :: AutoScalingSettingsUpdate -> String
$cshow :: AutoScalingSettingsUpdate -> String
showsPrec :: Int -> AutoScalingSettingsUpdate -> ShowS
$cshowsPrec :: Int -> AutoScalingSettingsUpdate -> ShowS
Prelude.Show, (forall x.
AutoScalingSettingsUpdate -> Rep AutoScalingSettingsUpdate x)
-> (forall x.
Rep AutoScalingSettingsUpdate x -> AutoScalingSettingsUpdate)
-> Generic AutoScalingSettingsUpdate
forall x.
Rep AutoScalingSettingsUpdate x -> AutoScalingSettingsUpdate
forall x.
AutoScalingSettingsUpdate -> Rep AutoScalingSettingsUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AutoScalingSettingsUpdate x -> AutoScalingSettingsUpdate
$cfrom :: forall x.
AutoScalingSettingsUpdate -> Rep AutoScalingSettingsUpdate x
Prelude.Generic)
newAutoScalingSettingsUpdate ::
AutoScalingSettingsUpdate
newAutoScalingSettingsUpdate :: AutoScalingSettingsUpdate
newAutoScalingSettingsUpdate =
AutoScalingSettingsUpdate' :: Maybe Bool
-> Maybe Natural
-> Maybe AutoScalingPolicyUpdate
-> Maybe Natural
-> Maybe Text
-> AutoScalingSettingsUpdate
AutoScalingSettingsUpdate'
{ $sel:autoScalingDisabled:AutoScalingSettingsUpdate' :: Maybe Bool
autoScalingDisabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:minimumUnits:AutoScalingSettingsUpdate' :: Maybe Natural
minimumUnits = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:scalingPolicyUpdate:AutoScalingSettingsUpdate' :: Maybe AutoScalingPolicyUpdate
scalingPolicyUpdate = Maybe AutoScalingPolicyUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:maximumUnits:AutoScalingSettingsUpdate' :: Maybe Natural
maximumUnits = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:autoScalingRoleArn:AutoScalingSettingsUpdate' :: Maybe Text
autoScalingRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
autoScalingSettingsUpdate_autoScalingDisabled :: Lens.Lens' AutoScalingSettingsUpdate (Prelude.Maybe Prelude.Bool)
autoScalingSettingsUpdate_autoScalingDisabled :: (Maybe Bool -> f (Maybe Bool))
-> AutoScalingSettingsUpdate -> f AutoScalingSettingsUpdate
autoScalingSettingsUpdate_autoScalingDisabled = (AutoScalingSettingsUpdate -> Maybe Bool)
-> (AutoScalingSettingsUpdate
-> Maybe Bool -> AutoScalingSettingsUpdate)
-> Lens
AutoScalingSettingsUpdate
AutoScalingSettingsUpdate
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingSettingsUpdate' {Maybe Bool
autoScalingDisabled :: Maybe Bool
$sel:autoScalingDisabled:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe Bool
autoScalingDisabled} -> Maybe Bool
autoScalingDisabled) (\s :: AutoScalingSettingsUpdate
s@AutoScalingSettingsUpdate' {} Maybe Bool
a -> AutoScalingSettingsUpdate
s {$sel:autoScalingDisabled:AutoScalingSettingsUpdate' :: Maybe Bool
autoScalingDisabled = Maybe Bool
a} :: AutoScalingSettingsUpdate)
autoScalingSettingsUpdate_minimumUnits :: Lens.Lens' AutoScalingSettingsUpdate (Prelude.Maybe Prelude.Natural)
autoScalingSettingsUpdate_minimumUnits :: (Maybe Natural -> f (Maybe Natural))
-> AutoScalingSettingsUpdate -> f AutoScalingSettingsUpdate
autoScalingSettingsUpdate_minimumUnits = (AutoScalingSettingsUpdate -> Maybe Natural)
-> (AutoScalingSettingsUpdate
-> Maybe Natural -> AutoScalingSettingsUpdate)
-> Lens
AutoScalingSettingsUpdate
AutoScalingSettingsUpdate
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingSettingsUpdate' {Maybe Natural
minimumUnits :: Maybe Natural
$sel:minimumUnits:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe Natural
minimumUnits} -> Maybe Natural
minimumUnits) (\s :: AutoScalingSettingsUpdate
s@AutoScalingSettingsUpdate' {} Maybe Natural
a -> AutoScalingSettingsUpdate
s {$sel:minimumUnits:AutoScalingSettingsUpdate' :: Maybe Natural
minimumUnits = Maybe Natural
a} :: AutoScalingSettingsUpdate)
autoScalingSettingsUpdate_scalingPolicyUpdate :: Lens.Lens' AutoScalingSettingsUpdate (Prelude.Maybe AutoScalingPolicyUpdate)
autoScalingSettingsUpdate_scalingPolicyUpdate :: (Maybe AutoScalingPolicyUpdate
-> f (Maybe AutoScalingPolicyUpdate))
-> AutoScalingSettingsUpdate -> f AutoScalingSettingsUpdate
autoScalingSettingsUpdate_scalingPolicyUpdate = (AutoScalingSettingsUpdate -> Maybe AutoScalingPolicyUpdate)
-> (AutoScalingSettingsUpdate
-> Maybe AutoScalingPolicyUpdate -> AutoScalingSettingsUpdate)
-> Lens
AutoScalingSettingsUpdate
AutoScalingSettingsUpdate
(Maybe AutoScalingPolicyUpdate)
(Maybe AutoScalingPolicyUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingSettingsUpdate' {Maybe AutoScalingPolicyUpdate
scalingPolicyUpdate :: Maybe AutoScalingPolicyUpdate
$sel:scalingPolicyUpdate:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe AutoScalingPolicyUpdate
scalingPolicyUpdate} -> Maybe AutoScalingPolicyUpdate
scalingPolicyUpdate) (\s :: AutoScalingSettingsUpdate
s@AutoScalingSettingsUpdate' {} Maybe AutoScalingPolicyUpdate
a -> AutoScalingSettingsUpdate
s {$sel:scalingPolicyUpdate:AutoScalingSettingsUpdate' :: Maybe AutoScalingPolicyUpdate
scalingPolicyUpdate = Maybe AutoScalingPolicyUpdate
a} :: AutoScalingSettingsUpdate)
autoScalingSettingsUpdate_maximumUnits :: Lens.Lens' AutoScalingSettingsUpdate (Prelude.Maybe Prelude.Natural)
autoScalingSettingsUpdate_maximumUnits :: (Maybe Natural -> f (Maybe Natural))
-> AutoScalingSettingsUpdate -> f AutoScalingSettingsUpdate
autoScalingSettingsUpdate_maximumUnits = (AutoScalingSettingsUpdate -> Maybe Natural)
-> (AutoScalingSettingsUpdate
-> Maybe Natural -> AutoScalingSettingsUpdate)
-> Lens
AutoScalingSettingsUpdate
AutoScalingSettingsUpdate
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingSettingsUpdate' {Maybe Natural
maximumUnits :: Maybe Natural
$sel:maximumUnits:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe Natural
maximumUnits} -> Maybe Natural
maximumUnits) (\s :: AutoScalingSettingsUpdate
s@AutoScalingSettingsUpdate' {} Maybe Natural
a -> AutoScalingSettingsUpdate
s {$sel:maximumUnits:AutoScalingSettingsUpdate' :: Maybe Natural
maximumUnits = Maybe Natural
a} :: AutoScalingSettingsUpdate)
autoScalingSettingsUpdate_autoScalingRoleArn :: Lens.Lens' AutoScalingSettingsUpdate (Prelude.Maybe Prelude.Text)
autoScalingSettingsUpdate_autoScalingRoleArn :: (Maybe Text -> f (Maybe Text))
-> AutoScalingSettingsUpdate -> f AutoScalingSettingsUpdate
autoScalingSettingsUpdate_autoScalingRoleArn = (AutoScalingSettingsUpdate -> Maybe Text)
-> (AutoScalingSettingsUpdate
-> Maybe Text -> AutoScalingSettingsUpdate)
-> Lens
AutoScalingSettingsUpdate
AutoScalingSettingsUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingSettingsUpdate' {Maybe Text
autoScalingRoleArn :: Maybe Text
$sel:autoScalingRoleArn:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe Text
autoScalingRoleArn} -> Maybe Text
autoScalingRoleArn) (\s :: AutoScalingSettingsUpdate
s@AutoScalingSettingsUpdate' {} Maybe Text
a -> AutoScalingSettingsUpdate
s {$sel:autoScalingRoleArn:AutoScalingSettingsUpdate' :: Maybe Text
autoScalingRoleArn = Maybe Text
a} :: AutoScalingSettingsUpdate)
instance Prelude.Hashable AutoScalingSettingsUpdate
instance Prelude.NFData AutoScalingSettingsUpdate
instance Core.ToJSON AutoScalingSettingsUpdate where
toJSON :: AutoScalingSettingsUpdate -> Value
toJSON AutoScalingSettingsUpdate' {Maybe Bool
Maybe Natural
Maybe Text
Maybe AutoScalingPolicyUpdate
autoScalingRoleArn :: Maybe Text
maximumUnits :: Maybe Natural
scalingPolicyUpdate :: Maybe AutoScalingPolicyUpdate
minimumUnits :: Maybe Natural
autoScalingDisabled :: Maybe Bool
$sel:autoScalingRoleArn:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe Text
$sel:maximumUnits:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe Natural
$sel:scalingPolicyUpdate:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe AutoScalingPolicyUpdate
$sel:minimumUnits:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe Natural
$sel:autoScalingDisabled:AutoScalingSettingsUpdate' :: AutoScalingSettingsUpdate -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AutoScalingDisabled" 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
autoScalingDisabled,
(Text
"MinimumUnits" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
minimumUnits,
(Text
"ScalingPolicyUpdate" Text -> AutoScalingPolicyUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AutoScalingPolicyUpdate -> Pair)
-> Maybe AutoScalingPolicyUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoScalingPolicyUpdate
scalingPolicyUpdate,
(Text
"MaximumUnits" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maximumUnits,
(Text
"AutoScalingRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
autoScalingRoleArn
]
)