{-# 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.GlobalTableGlobalSecondaryIndexSettingsUpdate 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 GlobalTableGlobalSecondaryIndexSettingsUpdate = GlobalTableGlobalSecondaryIndexSettingsUpdate'
{
GlobalTableGlobalSecondaryIndexSettingsUpdate -> Maybe Natural
provisionedWriteCapacityUnits :: Prelude.Maybe Prelude.Natural,
GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingSettingsUpdate :: Prelude.Maybe AutoScalingSettingsUpdate,
GlobalTableGlobalSecondaryIndexSettingsUpdate -> Text
indexName :: Prelude.Text
}
deriving (GlobalTableGlobalSecondaryIndexSettingsUpdate
-> GlobalTableGlobalSecondaryIndexSettingsUpdate -> Bool
(GlobalTableGlobalSecondaryIndexSettingsUpdate
-> GlobalTableGlobalSecondaryIndexSettingsUpdate -> Bool)
-> (GlobalTableGlobalSecondaryIndexSettingsUpdate
-> GlobalTableGlobalSecondaryIndexSettingsUpdate -> Bool)
-> Eq GlobalTableGlobalSecondaryIndexSettingsUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlobalTableGlobalSecondaryIndexSettingsUpdate
-> GlobalTableGlobalSecondaryIndexSettingsUpdate -> Bool
$c/= :: GlobalTableGlobalSecondaryIndexSettingsUpdate
-> GlobalTableGlobalSecondaryIndexSettingsUpdate -> Bool
== :: GlobalTableGlobalSecondaryIndexSettingsUpdate
-> GlobalTableGlobalSecondaryIndexSettingsUpdate -> Bool
$c== :: GlobalTableGlobalSecondaryIndexSettingsUpdate
-> GlobalTableGlobalSecondaryIndexSettingsUpdate -> Bool
Prelude.Eq, ReadPrec [GlobalTableGlobalSecondaryIndexSettingsUpdate]
ReadPrec GlobalTableGlobalSecondaryIndexSettingsUpdate
Int -> ReadS GlobalTableGlobalSecondaryIndexSettingsUpdate
ReadS [GlobalTableGlobalSecondaryIndexSettingsUpdate]
(Int -> ReadS GlobalTableGlobalSecondaryIndexSettingsUpdate)
-> ReadS [GlobalTableGlobalSecondaryIndexSettingsUpdate]
-> ReadPrec GlobalTableGlobalSecondaryIndexSettingsUpdate
-> ReadPrec [GlobalTableGlobalSecondaryIndexSettingsUpdate]
-> Read GlobalTableGlobalSecondaryIndexSettingsUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlobalTableGlobalSecondaryIndexSettingsUpdate]
$creadListPrec :: ReadPrec [GlobalTableGlobalSecondaryIndexSettingsUpdate]
readPrec :: ReadPrec GlobalTableGlobalSecondaryIndexSettingsUpdate
$creadPrec :: ReadPrec GlobalTableGlobalSecondaryIndexSettingsUpdate
readList :: ReadS [GlobalTableGlobalSecondaryIndexSettingsUpdate]
$creadList :: ReadS [GlobalTableGlobalSecondaryIndexSettingsUpdate]
readsPrec :: Int -> ReadS GlobalTableGlobalSecondaryIndexSettingsUpdate
$creadsPrec :: Int -> ReadS GlobalTableGlobalSecondaryIndexSettingsUpdate
Prelude.Read, Int -> GlobalTableGlobalSecondaryIndexSettingsUpdate -> ShowS
[GlobalTableGlobalSecondaryIndexSettingsUpdate] -> ShowS
GlobalTableGlobalSecondaryIndexSettingsUpdate -> String
(Int -> GlobalTableGlobalSecondaryIndexSettingsUpdate -> ShowS)
-> (GlobalTableGlobalSecondaryIndexSettingsUpdate -> String)
-> ([GlobalTableGlobalSecondaryIndexSettingsUpdate] -> ShowS)
-> Show GlobalTableGlobalSecondaryIndexSettingsUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlobalTableGlobalSecondaryIndexSettingsUpdate] -> ShowS
$cshowList :: [GlobalTableGlobalSecondaryIndexSettingsUpdate] -> ShowS
show :: GlobalTableGlobalSecondaryIndexSettingsUpdate -> String
$cshow :: GlobalTableGlobalSecondaryIndexSettingsUpdate -> String
showsPrec :: Int -> GlobalTableGlobalSecondaryIndexSettingsUpdate -> ShowS
$cshowsPrec :: Int -> GlobalTableGlobalSecondaryIndexSettingsUpdate -> ShowS
Prelude.Show, (forall x.
GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Rep GlobalTableGlobalSecondaryIndexSettingsUpdate x)
-> (forall x.
Rep GlobalTableGlobalSecondaryIndexSettingsUpdate x
-> GlobalTableGlobalSecondaryIndexSettingsUpdate)
-> Generic GlobalTableGlobalSecondaryIndexSettingsUpdate
forall x.
Rep GlobalTableGlobalSecondaryIndexSettingsUpdate x
-> GlobalTableGlobalSecondaryIndexSettingsUpdate
forall x.
GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Rep GlobalTableGlobalSecondaryIndexSettingsUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GlobalTableGlobalSecondaryIndexSettingsUpdate x
-> GlobalTableGlobalSecondaryIndexSettingsUpdate
$cfrom :: forall x.
GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Rep GlobalTableGlobalSecondaryIndexSettingsUpdate x
Prelude.Generic)
newGlobalTableGlobalSecondaryIndexSettingsUpdate ::
Prelude.Text ->
GlobalTableGlobalSecondaryIndexSettingsUpdate
newGlobalTableGlobalSecondaryIndexSettingsUpdate :: Text -> GlobalTableGlobalSecondaryIndexSettingsUpdate
newGlobalTableGlobalSecondaryIndexSettingsUpdate
Text
pIndexName_ =
GlobalTableGlobalSecondaryIndexSettingsUpdate' :: Maybe Natural
-> Maybe AutoScalingSettingsUpdate
-> Text
-> GlobalTableGlobalSecondaryIndexSettingsUpdate
GlobalTableGlobalSecondaryIndexSettingsUpdate'
{ $sel:provisionedWriteCapacityUnits:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: Maybe Natural
provisionedWriteCapacityUnits =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedWriteCapacityAutoScalingSettingsUpdate:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingSettingsUpdate =
Maybe AutoScalingSettingsUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:indexName:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: Text
indexName = Text
pIndexName_
}
globalTableGlobalSecondaryIndexSettingsUpdate_provisionedWriteCapacityUnits :: Lens.Lens' GlobalTableGlobalSecondaryIndexSettingsUpdate (Prelude.Maybe Prelude.Natural)
globalTableGlobalSecondaryIndexSettingsUpdate_provisionedWriteCapacityUnits :: (Maybe Natural -> f (Maybe Natural))
-> GlobalTableGlobalSecondaryIndexSettingsUpdate
-> f GlobalTableGlobalSecondaryIndexSettingsUpdate
globalTableGlobalSecondaryIndexSettingsUpdate_provisionedWriteCapacityUnits = (GlobalTableGlobalSecondaryIndexSettingsUpdate -> Maybe Natural)
-> (GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Maybe Natural -> GlobalTableGlobalSecondaryIndexSettingsUpdate)
-> Lens
GlobalTableGlobalSecondaryIndexSettingsUpdate
GlobalTableGlobalSecondaryIndexSettingsUpdate
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalTableGlobalSecondaryIndexSettingsUpdate' {Maybe Natural
provisionedWriteCapacityUnits :: Maybe Natural
$sel:provisionedWriteCapacityUnits:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: GlobalTableGlobalSecondaryIndexSettingsUpdate -> Maybe Natural
provisionedWriteCapacityUnits} -> Maybe Natural
provisionedWriteCapacityUnits) (\s :: GlobalTableGlobalSecondaryIndexSettingsUpdate
s@GlobalTableGlobalSecondaryIndexSettingsUpdate' {} Maybe Natural
a -> GlobalTableGlobalSecondaryIndexSettingsUpdate
s {$sel:provisionedWriteCapacityUnits:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: Maybe Natural
provisionedWriteCapacityUnits = Maybe Natural
a} :: GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate_provisionedWriteCapacityAutoScalingSettingsUpdate :: Lens.Lens' GlobalTableGlobalSecondaryIndexSettingsUpdate (Prelude.Maybe AutoScalingSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate_provisionedWriteCapacityAutoScalingSettingsUpdate :: (Maybe AutoScalingSettingsUpdate
-> f (Maybe AutoScalingSettingsUpdate))
-> GlobalTableGlobalSecondaryIndexSettingsUpdate
-> f GlobalTableGlobalSecondaryIndexSettingsUpdate
globalTableGlobalSecondaryIndexSettingsUpdate_provisionedWriteCapacityAutoScalingSettingsUpdate = (GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate)
-> (GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate
-> GlobalTableGlobalSecondaryIndexSettingsUpdate)
-> Lens
GlobalTableGlobalSecondaryIndexSettingsUpdate
GlobalTableGlobalSecondaryIndexSettingsUpdate
(Maybe AutoScalingSettingsUpdate)
(Maybe AutoScalingSettingsUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalTableGlobalSecondaryIndexSettingsUpdate' {Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingSettingsUpdate :: Maybe AutoScalingSettingsUpdate
$sel:provisionedWriteCapacityAutoScalingSettingsUpdate:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingSettingsUpdate} -> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingSettingsUpdate) (\s :: GlobalTableGlobalSecondaryIndexSettingsUpdate
s@GlobalTableGlobalSecondaryIndexSettingsUpdate' {} Maybe AutoScalingSettingsUpdate
a -> GlobalTableGlobalSecondaryIndexSettingsUpdate
s {$sel:provisionedWriteCapacityAutoScalingSettingsUpdate:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingSettingsUpdate = Maybe AutoScalingSettingsUpdate
a} :: GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate_indexName :: Lens.Lens' GlobalTableGlobalSecondaryIndexSettingsUpdate Prelude.Text
globalTableGlobalSecondaryIndexSettingsUpdate_indexName :: (Text -> f Text)
-> GlobalTableGlobalSecondaryIndexSettingsUpdate
-> f GlobalTableGlobalSecondaryIndexSettingsUpdate
globalTableGlobalSecondaryIndexSettingsUpdate_indexName = (GlobalTableGlobalSecondaryIndexSettingsUpdate -> Text)
-> (GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Text -> GlobalTableGlobalSecondaryIndexSettingsUpdate)
-> Lens
GlobalTableGlobalSecondaryIndexSettingsUpdate
GlobalTableGlobalSecondaryIndexSettingsUpdate
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalTableGlobalSecondaryIndexSettingsUpdate' {Text
indexName :: Text
$sel:indexName:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: GlobalTableGlobalSecondaryIndexSettingsUpdate -> Text
indexName} -> Text
indexName) (\s :: GlobalTableGlobalSecondaryIndexSettingsUpdate
s@GlobalTableGlobalSecondaryIndexSettingsUpdate' {} Text
a -> GlobalTableGlobalSecondaryIndexSettingsUpdate
s {$sel:indexName:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: Text
indexName = Text
a} :: GlobalTableGlobalSecondaryIndexSettingsUpdate)
instance
Prelude.Hashable
GlobalTableGlobalSecondaryIndexSettingsUpdate
instance
Prelude.NFData
GlobalTableGlobalSecondaryIndexSettingsUpdate
instance
Core.ToJSON
GlobalTableGlobalSecondaryIndexSettingsUpdate
where
toJSON :: GlobalTableGlobalSecondaryIndexSettingsUpdate -> Value
toJSON
GlobalTableGlobalSecondaryIndexSettingsUpdate' {Maybe Natural
Maybe AutoScalingSettingsUpdate
Text
indexName :: Text
provisionedWriteCapacityAutoScalingSettingsUpdate :: Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityUnits :: Maybe Natural
$sel:indexName:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: GlobalTableGlobalSecondaryIndexSettingsUpdate -> Text
$sel:provisionedWriteCapacityAutoScalingSettingsUpdate:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: GlobalTableGlobalSecondaryIndexSettingsUpdate
-> Maybe AutoScalingSettingsUpdate
$sel:provisionedWriteCapacityUnits:GlobalTableGlobalSecondaryIndexSettingsUpdate' :: GlobalTableGlobalSecondaryIndexSettingsUpdate -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ProvisionedWriteCapacityUnits" 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
provisionedWriteCapacityUnits,
( Text
"ProvisionedWriteCapacityAutoScalingSettingsUpdate"
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
provisionedWriteCapacityAutoScalingSettingsUpdate,
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)
]
)