{-# 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.ReplicaGlobalSecondaryIndexAutoScalingUpdate where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.AutoScalingSettingsUpdate
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReplicaGlobalSecondaryIndexAutoScalingUpdate = ReplicaGlobalSecondaryIndexAutoScalingUpdate'
{ ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingUpdate :: Prelude.Maybe AutoScalingSettingsUpdate,
ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text
}
deriving (ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Bool
(ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Bool)
-> (ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Bool)
-> Eq ReplicaGlobalSecondaryIndexAutoScalingUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Bool
$c/= :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Bool
== :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Bool
$c== :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Bool
Prelude.Eq, ReadPrec [ReplicaGlobalSecondaryIndexAutoScalingUpdate]
ReadPrec ReplicaGlobalSecondaryIndexAutoScalingUpdate
Int -> ReadS ReplicaGlobalSecondaryIndexAutoScalingUpdate
ReadS [ReplicaGlobalSecondaryIndexAutoScalingUpdate]
(Int -> ReadS ReplicaGlobalSecondaryIndexAutoScalingUpdate)
-> ReadS [ReplicaGlobalSecondaryIndexAutoScalingUpdate]
-> ReadPrec ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> ReadPrec [ReplicaGlobalSecondaryIndexAutoScalingUpdate]
-> Read ReplicaGlobalSecondaryIndexAutoScalingUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexAutoScalingUpdate]
$creadListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexAutoScalingUpdate]
readPrec :: ReadPrec ReplicaGlobalSecondaryIndexAutoScalingUpdate
$creadPrec :: ReadPrec ReplicaGlobalSecondaryIndexAutoScalingUpdate
readList :: ReadS [ReplicaGlobalSecondaryIndexAutoScalingUpdate]
$creadList :: ReadS [ReplicaGlobalSecondaryIndexAutoScalingUpdate]
readsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexAutoScalingUpdate
$creadsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexAutoScalingUpdate
Prelude.Read, Int -> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> ShowS
[ReplicaGlobalSecondaryIndexAutoScalingUpdate] -> ShowS
ReplicaGlobalSecondaryIndexAutoScalingUpdate -> String
(Int -> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> ShowS)
-> (ReplicaGlobalSecondaryIndexAutoScalingUpdate -> String)
-> ([ReplicaGlobalSecondaryIndexAutoScalingUpdate] -> ShowS)
-> Show ReplicaGlobalSecondaryIndexAutoScalingUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicaGlobalSecondaryIndexAutoScalingUpdate] -> ShowS
$cshowList :: [ReplicaGlobalSecondaryIndexAutoScalingUpdate] -> ShowS
show :: ReplicaGlobalSecondaryIndexAutoScalingUpdate -> String
$cshow :: ReplicaGlobalSecondaryIndexAutoScalingUpdate -> String
showsPrec :: Int -> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> ShowS
$cshowsPrec :: Int -> ReplicaGlobalSecondaryIndexAutoScalingUpdate -> ShowS
Prelude.Show, (forall x.
ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Rep ReplicaGlobalSecondaryIndexAutoScalingUpdate x)
-> (forall x.
Rep ReplicaGlobalSecondaryIndexAutoScalingUpdate x
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate)
-> Generic ReplicaGlobalSecondaryIndexAutoScalingUpdate
forall x.
Rep ReplicaGlobalSecondaryIndexAutoScalingUpdate x
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate
forall x.
ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Rep ReplicaGlobalSecondaryIndexAutoScalingUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicaGlobalSecondaryIndexAutoScalingUpdate x
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate
$cfrom :: forall x.
ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Rep ReplicaGlobalSecondaryIndexAutoScalingUpdate x
Prelude.Generic)
newReplicaGlobalSecondaryIndexAutoScalingUpdate ::
ReplicaGlobalSecondaryIndexAutoScalingUpdate
newReplicaGlobalSecondaryIndexAutoScalingUpdate :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
newReplicaGlobalSecondaryIndexAutoScalingUpdate =
ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: Maybe AutoScalingSettingsUpdate
-> Maybe Text -> ReplicaGlobalSecondaryIndexAutoScalingUpdate
ReplicaGlobalSecondaryIndexAutoScalingUpdate'
{ $sel:provisionedReadCapacityAutoScalingUpdate:ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingUpdate =
Maybe AutoScalingSettingsUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: Maybe Text
indexName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
replicaGlobalSecondaryIndexAutoScalingUpdate_provisionedReadCapacityAutoScalingUpdate :: Lens.Lens' ReplicaGlobalSecondaryIndexAutoScalingUpdate (Prelude.Maybe AutoScalingSettingsUpdate)
replicaGlobalSecondaryIndexAutoScalingUpdate_provisionedReadCapacityAutoScalingUpdate :: (Maybe AutoScalingSettingsUpdate
-> f (Maybe AutoScalingSettingsUpdate))
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> f ReplicaGlobalSecondaryIndexAutoScalingUpdate
replicaGlobalSecondaryIndexAutoScalingUpdate_provisionedReadCapacityAutoScalingUpdate = (ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate)
-> (ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate)
-> Lens
ReplicaGlobalSecondaryIndexAutoScalingUpdate
ReplicaGlobalSecondaryIndexAutoScalingUpdate
(Maybe AutoScalingSettingsUpdate)
(Maybe AutoScalingSettingsUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexAutoScalingUpdate' {Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingUpdate :: Maybe AutoScalingSettingsUpdate
$sel:provisionedReadCapacityAutoScalingUpdate:ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingUpdate} -> Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingUpdate) (\s :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
s@ReplicaGlobalSecondaryIndexAutoScalingUpdate' {} Maybe AutoScalingSettingsUpdate
a -> ReplicaGlobalSecondaryIndexAutoScalingUpdate
s {$sel:provisionedReadCapacityAutoScalingUpdate:ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingUpdate = Maybe AutoScalingSettingsUpdate
a} :: ReplicaGlobalSecondaryIndexAutoScalingUpdate)
replicaGlobalSecondaryIndexAutoScalingUpdate_indexName :: Lens.Lens' ReplicaGlobalSecondaryIndexAutoScalingUpdate (Prelude.Maybe Prelude.Text)
replicaGlobalSecondaryIndexAutoScalingUpdate_indexName :: (Maybe Text -> f (Maybe Text))
-> ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> f ReplicaGlobalSecondaryIndexAutoScalingUpdate
replicaGlobalSecondaryIndexAutoScalingUpdate_indexName = (ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Maybe Text)
-> (ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Maybe Text -> ReplicaGlobalSecondaryIndexAutoScalingUpdate)
-> Lens
ReplicaGlobalSecondaryIndexAutoScalingUpdate
ReplicaGlobalSecondaryIndexAutoScalingUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexAutoScalingUpdate' {Maybe Text
indexName :: Maybe Text
$sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
s@ReplicaGlobalSecondaryIndexAutoScalingUpdate' {} Maybe Text
a -> ReplicaGlobalSecondaryIndexAutoScalingUpdate
s {$sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: Maybe Text
indexName = Maybe Text
a} :: ReplicaGlobalSecondaryIndexAutoScalingUpdate)
instance
Prelude.Hashable
ReplicaGlobalSecondaryIndexAutoScalingUpdate
instance
Prelude.NFData
ReplicaGlobalSecondaryIndexAutoScalingUpdate
instance
Core.ToJSON
ReplicaGlobalSecondaryIndexAutoScalingUpdate
where
toJSON :: ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Value
toJSON
ReplicaGlobalSecondaryIndexAutoScalingUpdate' {Maybe Text
Maybe AutoScalingSettingsUpdate
indexName :: Maybe Text
provisionedReadCapacityAutoScalingUpdate :: Maybe AutoScalingSettingsUpdate
$sel:indexName:ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: ReplicaGlobalSecondaryIndexAutoScalingUpdate -> Maybe Text
$sel:provisionedReadCapacityAutoScalingUpdate:ReplicaGlobalSecondaryIndexAutoScalingUpdate' :: ReplicaGlobalSecondaryIndexAutoScalingUpdate
-> Maybe AutoScalingSettingsUpdate
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ProvisionedReadCapacityAutoScalingUpdate" Text -> AutoScalingSettingsUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AutoScalingSettingsUpdate -> Pair)
-> Maybe AutoScalingSettingsUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingUpdate,
(Text
"IndexName" 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
indexName
]
)