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