{-# 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.ReplicaGlobalSecondaryIndexSettingsUpdate 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 ReplicaGlobalSecondaryIndexSettingsUpdate = ReplicaGlobalSecondaryIndexSettingsUpdate'
{
ReplicaGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingSettingsUpdate :: Prelude.Maybe AutoScalingSettingsUpdate,
ReplicaGlobalSecondaryIndexSettingsUpdate -> Maybe Natural
provisionedReadCapacityUnits :: Prelude.Maybe Prelude.Natural,
ReplicaGlobalSecondaryIndexSettingsUpdate -> Text
indexName :: Prelude.Text
}
deriving (ReplicaGlobalSecondaryIndexSettingsUpdate
-> ReplicaGlobalSecondaryIndexSettingsUpdate -> Bool
(ReplicaGlobalSecondaryIndexSettingsUpdate
-> ReplicaGlobalSecondaryIndexSettingsUpdate -> Bool)
-> (ReplicaGlobalSecondaryIndexSettingsUpdate
-> ReplicaGlobalSecondaryIndexSettingsUpdate -> Bool)
-> Eq ReplicaGlobalSecondaryIndexSettingsUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicaGlobalSecondaryIndexSettingsUpdate
-> ReplicaGlobalSecondaryIndexSettingsUpdate -> Bool
$c/= :: ReplicaGlobalSecondaryIndexSettingsUpdate
-> ReplicaGlobalSecondaryIndexSettingsUpdate -> Bool
== :: ReplicaGlobalSecondaryIndexSettingsUpdate
-> ReplicaGlobalSecondaryIndexSettingsUpdate -> Bool
$c== :: ReplicaGlobalSecondaryIndexSettingsUpdate
-> ReplicaGlobalSecondaryIndexSettingsUpdate -> Bool
Prelude.Eq, ReadPrec [ReplicaGlobalSecondaryIndexSettingsUpdate]
ReadPrec ReplicaGlobalSecondaryIndexSettingsUpdate
Int -> ReadS ReplicaGlobalSecondaryIndexSettingsUpdate
ReadS [ReplicaGlobalSecondaryIndexSettingsUpdate]
(Int -> ReadS ReplicaGlobalSecondaryIndexSettingsUpdate)
-> ReadS [ReplicaGlobalSecondaryIndexSettingsUpdate]
-> ReadPrec ReplicaGlobalSecondaryIndexSettingsUpdate
-> ReadPrec [ReplicaGlobalSecondaryIndexSettingsUpdate]
-> Read ReplicaGlobalSecondaryIndexSettingsUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexSettingsUpdate]
$creadListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexSettingsUpdate]
readPrec :: ReadPrec ReplicaGlobalSecondaryIndexSettingsUpdate
$creadPrec :: ReadPrec ReplicaGlobalSecondaryIndexSettingsUpdate
readList :: ReadS [ReplicaGlobalSecondaryIndexSettingsUpdate]
$creadList :: ReadS [ReplicaGlobalSecondaryIndexSettingsUpdate]
readsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexSettingsUpdate
$creadsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexSettingsUpdate
Prelude.Read, Int -> ReplicaGlobalSecondaryIndexSettingsUpdate -> ShowS
[ReplicaGlobalSecondaryIndexSettingsUpdate] -> ShowS
ReplicaGlobalSecondaryIndexSettingsUpdate -> String
(Int -> ReplicaGlobalSecondaryIndexSettingsUpdate -> ShowS)
-> (ReplicaGlobalSecondaryIndexSettingsUpdate -> String)
-> ([ReplicaGlobalSecondaryIndexSettingsUpdate] -> ShowS)
-> Show ReplicaGlobalSecondaryIndexSettingsUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicaGlobalSecondaryIndexSettingsUpdate] -> ShowS
$cshowList :: [ReplicaGlobalSecondaryIndexSettingsUpdate] -> ShowS
show :: ReplicaGlobalSecondaryIndexSettingsUpdate -> String
$cshow :: ReplicaGlobalSecondaryIndexSettingsUpdate -> String
showsPrec :: Int -> ReplicaGlobalSecondaryIndexSettingsUpdate -> ShowS
$cshowsPrec :: Int -> ReplicaGlobalSecondaryIndexSettingsUpdate -> ShowS
Prelude.Show, (forall x.
ReplicaGlobalSecondaryIndexSettingsUpdate
-> Rep ReplicaGlobalSecondaryIndexSettingsUpdate x)
-> (forall x.
Rep ReplicaGlobalSecondaryIndexSettingsUpdate x
-> ReplicaGlobalSecondaryIndexSettingsUpdate)
-> Generic ReplicaGlobalSecondaryIndexSettingsUpdate
forall x.
Rep ReplicaGlobalSecondaryIndexSettingsUpdate x
-> ReplicaGlobalSecondaryIndexSettingsUpdate
forall x.
ReplicaGlobalSecondaryIndexSettingsUpdate
-> Rep ReplicaGlobalSecondaryIndexSettingsUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicaGlobalSecondaryIndexSettingsUpdate x
-> ReplicaGlobalSecondaryIndexSettingsUpdate
$cfrom :: forall x.
ReplicaGlobalSecondaryIndexSettingsUpdate
-> Rep ReplicaGlobalSecondaryIndexSettingsUpdate x
Prelude.Generic)
newReplicaGlobalSecondaryIndexSettingsUpdate ::
Prelude.Text ->
ReplicaGlobalSecondaryIndexSettingsUpdate
newReplicaGlobalSecondaryIndexSettingsUpdate :: Text -> ReplicaGlobalSecondaryIndexSettingsUpdate
newReplicaGlobalSecondaryIndexSettingsUpdate
Text
pIndexName_ =
ReplicaGlobalSecondaryIndexSettingsUpdate' :: Maybe AutoScalingSettingsUpdate
-> Maybe Natural
-> Text
-> ReplicaGlobalSecondaryIndexSettingsUpdate
ReplicaGlobalSecondaryIndexSettingsUpdate'
{ $sel:provisionedReadCapacityAutoScalingSettingsUpdate:ReplicaGlobalSecondaryIndexSettingsUpdate' :: Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingSettingsUpdate =
Maybe AutoScalingSettingsUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedReadCapacityUnits:ReplicaGlobalSecondaryIndexSettingsUpdate' :: Maybe Natural
provisionedReadCapacityUnits =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:indexName:ReplicaGlobalSecondaryIndexSettingsUpdate' :: Text
indexName = Text
pIndexName_
}
replicaGlobalSecondaryIndexSettingsUpdate_provisionedReadCapacityAutoScalingSettingsUpdate :: Lens.Lens' ReplicaGlobalSecondaryIndexSettingsUpdate (Prelude.Maybe AutoScalingSettingsUpdate)
replicaGlobalSecondaryIndexSettingsUpdate_provisionedReadCapacityAutoScalingSettingsUpdate :: (Maybe AutoScalingSettingsUpdate
-> f (Maybe AutoScalingSettingsUpdate))
-> ReplicaGlobalSecondaryIndexSettingsUpdate
-> f ReplicaGlobalSecondaryIndexSettingsUpdate
replicaGlobalSecondaryIndexSettingsUpdate_provisionedReadCapacityAutoScalingSettingsUpdate = (ReplicaGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate)
-> (ReplicaGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate
-> ReplicaGlobalSecondaryIndexSettingsUpdate)
-> Lens
ReplicaGlobalSecondaryIndexSettingsUpdate
ReplicaGlobalSecondaryIndexSettingsUpdate
(Maybe AutoScalingSettingsUpdate)
(Maybe AutoScalingSettingsUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexSettingsUpdate' {Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingSettingsUpdate :: Maybe AutoScalingSettingsUpdate
$sel:provisionedReadCapacityAutoScalingSettingsUpdate:ReplicaGlobalSecondaryIndexSettingsUpdate' :: ReplicaGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingSettingsUpdate} -> Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingSettingsUpdate) (\s :: ReplicaGlobalSecondaryIndexSettingsUpdate
s@ReplicaGlobalSecondaryIndexSettingsUpdate' {} Maybe AutoScalingSettingsUpdate
a -> ReplicaGlobalSecondaryIndexSettingsUpdate
s {$sel:provisionedReadCapacityAutoScalingSettingsUpdate:ReplicaGlobalSecondaryIndexSettingsUpdate' :: Maybe AutoScalingSettingsUpdate
provisionedReadCapacityAutoScalingSettingsUpdate = Maybe AutoScalingSettingsUpdate
a} :: ReplicaGlobalSecondaryIndexSettingsUpdate)
replicaGlobalSecondaryIndexSettingsUpdate_provisionedReadCapacityUnits :: Lens.Lens' ReplicaGlobalSecondaryIndexSettingsUpdate (Prelude.Maybe Prelude.Natural)
replicaGlobalSecondaryIndexSettingsUpdate_provisionedReadCapacityUnits :: (Maybe Natural -> f (Maybe Natural))
-> ReplicaGlobalSecondaryIndexSettingsUpdate
-> f ReplicaGlobalSecondaryIndexSettingsUpdate
replicaGlobalSecondaryIndexSettingsUpdate_provisionedReadCapacityUnits = (ReplicaGlobalSecondaryIndexSettingsUpdate -> Maybe Natural)
-> (ReplicaGlobalSecondaryIndexSettingsUpdate
-> Maybe Natural -> ReplicaGlobalSecondaryIndexSettingsUpdate)
-> Lens
ReplicaGlobalSecondaryIndexSettingsUpdate
ReplicaGlobalSecondaryIndexSettingsUpdate
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexSettingsUpdate' {Maybe Natural
provisionedReadCapacityUnits :: Maybe Natural
$sel:provisionedReadCapacityUnits:ReplicaGlobalSecondaryIndexSettingsUpdate' :: ReplicaGlobalSecondaryIndexSettingsUpdate -> Maybe Natural
provisionedReadCapacityUnits} -> Maybe Natural
provisionedReadCapacityUnits) (\s :: ReplicaGlobalSecondaryIndexSettingsUpdate
s@ReplicaGlobalSecondaryIndexSettingsUpdate' {} Maybe Natural
a -> ReplicaGlobalSecondaryIndexSettingsUpdate
s {$sel:provisionedReadCapacityUnits:ReplicaGlobalSecondaryIndexSettingsUpdate' :: Maybe Natural
provisionedReadCapacityUnits = Maybe Natural
a} :: ReplicaGlobalSecondaryIndexSettingsUpdate)
replicaGlobalSecondaryIndexSettingsUpdate_indexName :: Lens.Lens' ReplicaGlobalSecondaryIndexSettingsUpdate Prelude.Text
replicaGlobalSecondaryIndexSettingsUpdate_indexName :: (Text -> f Text)
-> ReplicaGlobalSecondaryIndexSettingsUpdate
-> f ReplicaGlobalSecondaryIndexSettingsUpdate
replicaGlobalSecondaryIndexSettingsUpdate_indexName = (ReplicaGlobalSecondaryIndexSettingsUpdate -> Text)
-> (ReplicaGlobalSecondaryIndexSettingsUpdate
-> Text -> ReplicaGlobalSecondaryIndexSettingsUpdate)
-> Lens
ReplicaGlobalSecondaryIndexSettingsUpdate
ReplicaGlobalSecondaryIndexSettingsUpdate
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexSettingsUpdate' {Text
indexName :: Text
$sel:indexName:ReplicaGlobalSecondaryIndexSettingsUpdate' :: ReplicaGlobalSecondaryIndexSettingsUpdate -> Text
indexName} -> Text
indexName) (\s :: ReplicaGlobalSecondaryIndexSettingsUpdate
s@ReplicaGlobalSecondaryIndexSettingsUpdate' {} Text
a -> ReplicaGlobalSecondaryIndexSettingsUpdate
s {$sel:indexName:ReplicaGlobalSecondaryIndexSettingsUpdate' :: Text
indexName = Text
a} :: ReplicaGlobalSecondaryIndexSettingsUpdate)
instance
Prelude.Hashable
ReplicaGlobalSecondaryIndexSettingsUpdate
instance
Prelude.NFData
ReplicaGlobalSecondaryIndexSettingsUpdate
instance
Core.ToJSON
ReplicaGlobalSecondaryIndexSettingsUpdate
where
toJSON :: ReplicaGlobalSecondaryIndexSettingsUpdate -> Value
toJSON ReplicaGlobalSecondaryIndexSettingsUpdate' {Maybe Natural
Maybe AutoScalingSettingsUpdate
Text
indexName :: Text
provisionedReadCapacityUnits :: Maybe Natural
provisionedReadCapacityAutoScalingSettingsUpdate :: Maybe AutoScalingSettingsUpdate
$sel:indexName:ReplicaGlobalSecondaryIndexSettingsUpdate' :: ReplicaGlobalSecondaryIndexSettingsUpdate -> Text
$sel:provisionedReadCapacityUnits:ReplicaGlobalSecondaryIndexSettingsUpdate' :: ReplicaGlobalSecondaryIndexSettingsUpdate -> Maybe Natural
$sel:provisionedReadCapacityAutoScalingSettingsUpdate:ReplicaGlobalSecondaryIndexSettingsUpdate' :: ReplicaGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ ( Text
"ProvisionedReadCapacityAutoScalingSettingsUpdate"
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
provisionedReadCapacityAutoScalingSettingsUpdate,
(Text
"ProvisionedReadCapacityUnits" 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
provisionedReadCapacityUnits,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IndexName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
indexName)
]
)