{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DynamoDB.UpdateTable
(
UpdateTable (..),
newUpdateTable,
updateTable_attributeDefinitions,
updateTable_provisionedThroughput,
updateTable_sSESpecification,
updateTable_replicaUpdates,
updateTable_globalSecondaryIndexUpdates,
updateTable_billingMode,
updateTable_streamSpecification,
updateTable_tableName,
UpdateTableResponse (..),
newUpdateTableResponse,
updateTableResponse_tableDescription,
updateTableResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateTable = UpdateTable'
{
UpdateTable -> Maybe [AttributeDefinition]
attributeDefinitions :: Prelude.Maybe [AttributeDefinition],
UpdateTable -> Maybe ProvisionedThroughput
provisionedThroughput :: Prelude.Maybe ProvisionedThroughput,
UpdateTable -> Maybe SSESpecification
sSESpecification :: Prelude.Maybe SSESpecification,
UpdateTable -> Maybe (NonEmpty ReplicationGroupUpdate)
replicaUpdates :: Prelude.Maybe (Prelude.NonEmpty ReplicationGroupUpdate),
UpdateTable -> Maybe [GlobalSecondaryIndexUpdate]
globalSecondaryIndexUpdates :: Prelude.Maybe [GlobalSecondaryIndexUpdate],
UpdateTable -> Maybe BillingMode
billingMode :: Prelude.Maybe BillingMode,
UpdateTable -> Maybe StreamSpecification
streamSpecification :: Prelude.Maybe StreamSpecification,
UpdateTable -> Text
tableName :: Prelude.Text
}
deriving (UpdateTable -> UpdateTable -> Bool
(UpdateTable -> UpdateTable -> Bool)
-> (UpdateTable -> UpdateTable -> Bool) -> Eq UpdateTable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTable -> UpdateTable -> Bool
$c/= :: UpdateTable -> UpdateTable -> Bool
== :: UpdateTable -> UpdateTable -> Bool
$c== :: UpdateTable -> UpdateTable -> Bool
Prelude.Eq, ReadPrec [UpdateTable]
ReadPrec UpdateTable
Int -> ReadS UpdateTable
ReadS [UpdateTable]
(Int -> ReadS UpdateTable)
-> ReadS [UpdateTable]
-> ReadPrec UpdateTable
-> ReadPrec [UpdateTable]
-> Read UpdateTable
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTable]
$creadListPrec :: ReadPrec [UpdateTable]
readPrec :: ReadPrec UpdateTable
$creadPrec :: ReadPrec UpdateTable
readList :: ReadS [UpdateTable]
$creadList :: ReadS [UpdateTable]
readsPrec :: Int -> ReadS UpdateTable
$creadsPrec :: Int -> ReadS UpdateTable
Prelude.Read, Int -> UpdateTable -> ShowS
[UpdateTable] -> ShowS
UpdateTable -> String
(Int -> UpdateTable -> ShowS)
-> (UpdateTable -> String)
-> ([UpdateTable] -> ShowS)
-> Show UpdateTable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTable] -> ShowS
$cshowList :: [UpdateTable] -> ShowS
show :: UpdateTable -> String
$cshow :: UpdateTable -> String
showsPrec :: Int -> UpdateTable -> ShowS
$cshowsPrec :: Int -> UpdateTable -> ShowS
Prelude.Show, (forall x. UpdateTable -> Rep UpdateTable x)
-> (forall x. Rep UpdateTable x -> UpdateTable)
-> Generic UpdateTable
forall x. Rep UpdateTable x -> UpdateTable
forall x. UpdateTable -> Rep UpdateTable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTable x -> UpdateTable
$cfrom :: forall x. UpdateTable -> Rep UpdateTable x
Prelude.Generic)
newUpdateTable ::
Prelude.Text ->
UpdateTable
newUpdateTable :: Text -> UpdateTable
newUpdateTable Text
pTableName_ =
UpdateTable' :: Maybe [AttributeDefinition]
-> Maybe ProvisionedThroughput
-> Maybe SSESpecification
-> Maybe (NonEmpty ReplicationGroupUpdate)
-> Maybe [GlobalSecondaryIndexUpdate]
-> Maybe BillingMode
-> Maybe StreamSpecification
-> Text
-> UpdateTable
UpdateTable'
{ $sel:attributeDefinitions:UpdateTable' :: Maybe [AttributeDefinition]
attributeDefinitions =
Maybe [AttributeDefinition]
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedThroughput:UpdateTable' :: Maybe ProvisionedThroughput
provisionedThroughput = Maybe ProvisionedThroughput
forall a. Maybe a
Prelude.Nothing,
$sel:sSESpecification:UpdateTable' :: Maybe SSESpecification
sSESpecification = Maybe SSESpecification
forall a. Maybe a
Prelude.Nothing,
$sel:replicaUpdates:UpdateTable' :: Maybe (NonEmpty ReplicationGroupUpdate)
replicaUpdates = Maybe (NonEmpty ReplicationGroupUpdate)
forall a. Maybe a
Prelude.Nothing,
$sel:globalSecondaryIndexUpdates:UpdateTable' :: Maybe [GlobalSecondaryIndexUpdate]
globalSecondaryIndexUpdates = Maybe [GlobalSecondaryIndexUpdate]
forall a. Maybe a
Prelude.Nothing,
$sel:billingMode:UpdateTable' :: Maybe BillingMode
billingMode = Maybe BillingMode
forall a. Maybe a
Prelude.Nothing,
$sel:streamSpecification:UpdateTable' :: Maybe StreamSpecification
streamSpecification = Maybe StreamSpecification
forall a. Maybe a
Prelude.Nothing,
$sel:tableName:UpdateTable' :: Text
tableName = Text
pTableName_
}
updateTable_attributeDefinitions :: Lens.Lens' UpdateTable (Prelude.Maybe [AttributeDefinition])
updateTable_attributeDefinitions :: (Maybe [AttributeDefinition] -> f (Maybe [AttributeDefinition]))
-> UpdateTable -> f UpdateTable
updateTable_attributeDefinitions = (UpdateTable -> Maybe [AttributeDefinition])
-> (UpdateTable -> Maybe [AttributeDefinition] -> UpdateTable)
-> Lens
UpdateTable
UpdateTable
(Maybe [AttributeDefinition])
(Maybe [AttributeDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTable' {Maybe [AttributeDefinition]
attributeDefinitions :: Maybe [AttributeDefinition]
$sel:attributeDefinitions:UpdateTable' :: UpdateTable -> Maybe [AttributeDefinition]
attributeDefinitions} -> Maybe [AttributeDefinition]
attributeDefinitions) (\s :: UpdateTable
s@UpdateTable' {} Maybe [AttributeDefinition]
a -> UpdateTable
s {$sel:attributeDefinitions:UpdateTable' :: Maybe [AttributeDefinition]
attributeDefinitions = Maybe [AttributeDefinition]
a} :: UpdateTable) ((Maybe [AttributeDefinition] -> f (Maybe [AttributeDefinition]))
-> UpdateTable -> f UpdateTable)
-> ((Maybe [AttributeDefinition]
-> f (Maybe [AttributeDefinition]))
-> Maybe [AttributeDefinition] -> f (Maybe [AttributeDefinition]))
-> (Maybe [AttributeDefinition] -> f (Maybe [AttributeDefinition]))
-> UpdateTable
-> f UpdateTable
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AttributeDefinition]
[AttributeDefinition]
[AttributeDefinition]
[AttributeDefinition]
-> Iso
(Maybe [AttributeDefinition])
(Maybe [AttributeDefinition])
(Maybe [AttributeDefinition])
(Maybe [AttributeDefinition])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AttributeDefinition]
[AttributeDefinition]
[AttributeDefinition]
[AttributeDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateTable_provisionedThroughput :: Lens.Lens' UpdateTable (Prelude.Maybe ProvisionedThroughput)
updateTable_provisionedThroughput :: (Maybe ProvisionedThroughput -> f (Maybe ProvisionedThroughput))
-> UpdateTable -> f UpdateTable
updateTable_provisionedThroughput = (UpdateTable -> Maybe ProvisionedThroughput)
-> (UpdateTable -> Maybe ProvisionedThroughput -> UpdateTable)
-> Lens
UpdateTable
UpdateTable
(Maybe ProvisionedThroughput)
(Maybe ProvisionedThroughput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTable' {Maybe ProvisionedThroughput
provisionedThroughput :: Maybe ProvisionedThroughput
$sel:provisionedThroughput:UpdateTable' :: UpdateTable -> Maybe ProvisionedThroughput
provisionedThroughput} -> Maybe ProvisionedThroughput
provisionedThroughput) (\s :: UpdateTable
s@UpdateTable' {} Maybe ProvisionedThroughput
a -> UpdateTable
s {$sel:provisionedThroughput:UpdateTable' :: Maybe ProvisionedThroughput
provisionedThroughput = Maybe ProvisionedThroughput
a} :: UpdateTable)
updateTable_sSESpecification :: Lens.Lens' UpdateTable (Prelude.Maybe SSESpecification)
updateTable_sSESpecification :: (Maybe SSESpecification -> f (Maybe SSESpecification))
-> UpdateTable -> f UpdateTable
updateTable_sSESpecification = (UpdateTable -> Maybe SSESpecification)
-> (UpdateTable -> Maybe SSESpecification -> UpdateTable)
-> Lens
UpdateTable
UpdateTable
(Maybe SSESpecification)
(Maybe SSESpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTable' {Maybe SSESpecification
sSESpecification :: Maybe SSESpecification
$sel:sSESpecification:UpdateTable' :: UpdateTable -> Maybe SSESpecification
sSESpecification} -> Maybe SSESpecification
sSESpecification) (\s :: UpdateTable
s@UpdateTable' {} Maybe SSESpecification
a -> UpdateTable
s {$sel:sSESpecification:UpdateTable' :: Maybe SSESpecification
sSESpecification = Maybe SSESpecification
a} :: UpdateTable)
updateTable_replicaUpdates :: Lens.Lens' UpdateTable (Prelude.Maybe (Prelude.NonEmpty ReplicationGroupUpdate))
updateTable_replicaUpdates :: (Maybe (NonEmpty ReplicationGroupUpdate)
-> f (Maybe (NonEmpty ReplicationGroupUpdate)))
-> UpdateTable -> f UpdateTable
updateTable_replicaUpdates = (UpdateTable -> Maybe (NonEmpty ReplicationGroupUpdate))
-> (UpdateTable
-> Maybe (NonEmpty ReplicationGroupUpdate) -> UpdateTable)
-> Lens
UpdateTable
UpdateTable
(Maybe (NonEmpty ReplicationGroupUpdate))
(Maybe (NonEmpty ReplicationGroupUpdate))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTable' {Maybe (NonEmpty ReplicationGroupUpdate)
replicaUpdates :: Maybe (NonEmpty ReplicationGroupUpdate)
$sel:replicaUpdates:UpdateTable' :: UpdateTable -> Maybe (NonEmpty ReplicationGroupUpdate)
replicaUpdates} -> Maybe (NonEmpty ReplicationGroupUpdate)
replicaUpdates) (\s :: UpdateTable
s@UpdateTable' {} Maybe (NonEmpty ReplicationGroupUpdate)
a -> UpdateTable
s {$sel:replicaUpdates:UpdateTable' :: Maybe (NonEmpty ReplicationGroupUpdate)
replicaUpdates = Maybe (NonEmpty ReplicationGroupUpdate)
a} :: UpdateTable) ((Maybe (NonEmpty ReplicationGroupUpdate)
-> f (Maybe (NonEmpty ReplicationGroupUpdate)))
-> UpdateTable -> f UpdateTable)
-> ((Maybe (NonEmpty ReplicationGroupUpdate)
-> f (Maybe (NonEmpty ReplicationGroupUpdate)))
-> Maybe (NonEmpty ReplicationGroupUpdate)
-> f (Maybe (NonEmpty ReplicationGroupUpdate)))
-> (Maybe (NonEmpty ReplicationGroupUpdate)
-> f (Maybe (NonEmpty ReplicationGroupUpdate)))
-> UpdateTable
-> f UpdateTable
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty ReplicationGroupUpdate)
(NonEmpty ReplicationGroupUpdate)
(NonEmpty ReplicationGroupUpdate)
(NonEmpty ReplicationGroupUpdate)
-> Iso
(Maybe (NonEmpty ReplicationGroupUpdate))
(Maybe (NonEmpty ReplicationGroupUpdate))
(Maybe (NonEmpty ReplicationGroupUpdate))
(Maybe (NonEmpty ReplicationGroupUpdate))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty ReplicationGroupUpdate)
(NonEmpty ReplicationGroupUpdate)
(NonEmpty ReplicationGroupUpdate)
(NonEmpty ReplicationGroupUpdate)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateTable_globalSecondaryIndexUpdates :: Lens.Lens' UpdateTable (Prelude.Maybe [GlobalSecondaryIndexUpdate])
updateTable_globalSecondaryIndexUpdates :: (Maybe [GlobalSecondaryIndexUpdate]
-> f (Maybe [GlobalSecondaryIndexUpdate]))
-> UpdateTable -> f UpdateTable
updateTable_globalSecondaryIndexUpdates = (UpdateTable -> Maybe [GlobalSecondaryIndexUpdate])
-> (UpdateTable
-> Maybe [GlobalSecondaryIndexUpdate] -> UpdateTable)
-> Lens
UpdateTable
UpdateTable
(Maybe [GlobalSecondaryIndexUpdate])
(Maybe [GlobalSecondaryIndexUpdate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTable' {Maybe [GlobalSecondaryIndexUpdate]
globalSecondaryIndexUpdates :: Maybe [GlobalSecondaryIndexUpdate]
$sel:globalSecondaryIndexUpdates:UpdateTable' :: UpdateTable -> Maybe [GlobalSecondaryIndexUpdate]
globalSecondaryIndexUpdates} -> Maybe [GlobalSecondaryIndexUpdate]
globalSecondaryIndexUpdates) (\s :: UpdateTable
s@UpdateTable' {} Maybe [GlobalSecondaryIndexUpdate]
a -> UpdateTable
s {$sel:globalSecondaryIndexUpdates:UpdateTable' :: Maybe [GlobalSecondaryIndexUpdate]
globalSecondaryIndexUpdates = Maybe [GlobalSecondaryIndexUpdate]
a} :: UpdateTable) ((Maybe [GlobalSecondaryIndexUpdate]
-> f (Maybe [GlobalSecondaryIndexUpdate]))
-> UpdateTable -> f UpdateTable)
-> ((Maybe [GlobalSecondaryIndexUpdate]
-> f (Maybe [GlobalSecondaryIndexUpdate]))
-> Maybe [GlobalSecondaryIndexUpdate]
-> f (Maybe [GlobalSecondaryIndexUpdate]))
-> (Maybe [GlobalSecondaryIndexUpdate]
-> f (Maybe [GlobalSecondaryIndexUpdate]))
-> UpdateTable
-> f UpdateTable
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[GlobalSecondaryIndexUpdate]
[GlobalSecondaryIndexUpdate]
[GlobalSecondaryIndexUpdate]
[GlobalSecondaryIndexUpdate]
-> Iso
(Maybe [GlobalSecondaryIndexUpdate])
(Maybe [GlobalSecondaryIndexUpdate])
(Maybe [GlobalSecondaryIndexUpdate])
(Maybe [GlobalSecondaryIndexUpdate])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[GlobalSecondaryIndexUpdate]
[GlobalSecondaryIndexUpdate]
[GlobalSecondaryIndexUpdate]
[GlobalSecondaryIndexUpdate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateTable_billingMode :: Lens.Lens' UpdateTable (Prelude.Maybe BillingMode)
updateTable_billingMode :: (Maybe BillingMode -> f (Maybe BillingMode))
-> UpdateTable -> f UpdateTable
updateTable_billingMode = (UpdateTable -> Maybe BillingMode)
-> (UpdateTable -> Maybe BillingMode -> UpdateTable)
-> Lens
UpdateTable UpdateTable (Maybe BillingMode) (Maybe BillingMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTable' {Maybe BillingMode
billingMode :: Maybe BillingMode
$sel:billingMode:UpdateTable' :: UpdateTable -> Maybe BillingMode
billingMode} -> Maybe BillingMode
billingMode) (\s :: UpdateTable
s@UpdateTable' {} Maybe BillingMode
a -> UpdateTable
s {$sel:billingMode:UpdateTable' :: Maybe BillingMode
billingMode = Maybe BillingMode
a} :: UpdateTable)
updateTable_streamSpecification :: Lens.Lens' UpdateTable (Prelude.Maybe StreamSpecification)
updateTable_streamSpecification :: (Maybe StreamSpecification -> f (Maybe StreamSpecification))
-> UpdateTable -> f UpdateTable
updateTable_streamSpecification = (UpdateTable -> Maybe StreamSpecification)
-> (UpdateTable -> Maybe StreamSpecification -> UpdateTable)
-> Lens
UpdateTable
UpdateTable
(Maybe StreamSpecification)
(Maybe StreamSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTable' {Maybe StreamSpecification
streamSpecification :: Maybe StreamSpecification
$sel:streamSpecification:UpdateTable' :: UpdateTable -> Maybe StreamSpecification
streamSpecification} -> Maybe StreamSpecification
streamSpecification) (\s :: UpdateTable
s@UpdateTable' {} Maybe StreamSpecification
a -> UpdateTable
s {$sel:streamSpecification:UpdateTable' :: Maybe StreamSpecification
streamSpecification = Maybe StreamSpecification
a} :: UpdateTable)
updateTable_tableName :: Lens.Lens' UpdateTable Prelude.Text
updateTable_tableName :: (Text -> f Text) -> UpdateTable -> f UpdateTable
updateTable_tableName = (UpdateTable -> Text)
-> (UpdateTable -> Text -> UpdateTable)
-> Lens UpdateTable UpdateTable Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTable' {Text
tableName :: Text
$sel:tableName:UpdateTable' :: UpdateTable -> Text
tableName} -> Text
tableName) (\s :: UpdateTable
s@UpdateTable' {} Text
a -> UpdateTable
s {$sel:tableName:UpdateTable' :: Text
tableName = Text
a} :: UpdateTable)
instance Core.AWSRequest UpdateTable where
type AWSResponse UpdateTable = UpdateTableResponse
request :: UpdateTable -> Request UpdateTable
request = Service -> UpdateTable -> Request UpdateTable
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateTable
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTable)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateTable))
-> Logger
-> Service
-> Proxy UpdateTable
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTable)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe TableDescription -> Int -> UpdateTableResponse
UpdateTableResponse'
(Maybe TableDescription -> Int -> UpdateTableResponse)
-> Either String (Maybe TableDescription)
-> Either String (Int -> UpdateTableResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TableDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TableDescription")
Either String (Int -> UpdateTableResponse)
-> Either String Int -> Either String UpdateTableResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateTable
instance Prelude.NFData UpdateTable
instance Core.ToHeaders UpdateTable where
toHeaders :: UpdateTable -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateTable -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"DynamoDB_20120810.UpdateTable" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateTable where
toJSON :: UpdateTable -> Value
toJSON UpdateTable' {Maybe [AttributeDefinition]
Maybe [GlobalSecondaryIndexUpdate]
Maybe (NonEmpty ReplicationGroupUpdate)
Maybe BillingMode
Maybe ProvisionedThroughput
Maybe SSESpecification
Maybe StreamSpecification
Text
tableName :: Text
streamSpecification :: Maybe StreamSpecification
billingMode :: Maybe BillingMode
globalSecondaryIndexUpdates :: Maybe [GlobalSecondaryIndexUpdate]
replicaUpdates :: Maybe (NonEmpty ReplicationGroupUpdate)
sSESpecification :: Maybe SSESpecification
provisionedThroughput :: Maybe ProvisionedThroughput
attributeDefinitions :: Maybe [AttributeDefinition]
$sel:tableName:UpdateTable' :: UpdateTable -> Text
$sel:streamSpecification:UpdateTable' :: UpdateTable -> Maybe StreamSpecification
$sel:billingMode:UpdateTable' :: UpdateTable -> Maybe BillingMode
$sel:globalSecondaryIndexUpdates:UpdateTable' :: UpdateTable -> Maybe [GlobalSecondaryIndexUpdate]
$sel:replicaUpdates:UpdateTable' :: UpdateTable -> Maybe (NonEmpty ReplicationGroupUpdate)
$sel:sSESpecification:UpdateTable' :: UpdateTable -> Maybe SSESpecification
$sel:provisionedThroughput:UpdateTable' :: UpdateTable -> Maybe ProvisionedThroughput
$sel:attributeDefinitions:UpdateTable' :: UpdateTable -> Maybe [AttributeDefinition]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AttributeDefinitions" Text -> [AttributeDefinition] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([AttributeDefinition] -> Pair)
-> Maybe [AttributeDefinition] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AttributeDefinition]
attributeDefinitions,
(Text
"ProvisionedThroughput" Text -> ProvisionedThroughput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ProvisionedThroughput -> Pair)
-> Maybe ProvisionedThroughput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionedThroughput
provisionedThroughput,
(Text
"SSESpecification" Text -> SSESpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SSESpecification -> Pair) -> Maybe SSESpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SSESpecification
sSESpecification,
(Text
"ReplicaUpdates" Text -> NonEmpty ReplicationGroupUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty ReplicationGroupUpdate -> Pair)
-> Maybe (NonEmpty ReplicationGroupUpdate) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty ReplicationGroupUpdate)
replicaUpdates,
(Text
"GlobalSecondaryIndexUpdates" Text -> [GlobalSecondaryIndexUpdate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([GlobalSecondaryIndexUpdate] -> Pair)
-> Maybe [GlobalSecondaryIndexUpdate] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GlobalSecondaryIndexUpdate]
globalSecondaryIndexUpdates,
(Text
"BillingMode" Text -> BillingMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BillingMode -> Pair) -> Maybe BillingMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BillingMode
billingMode,
(Text
"StreamSpecification" Text -> StreamSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(StreamSpecification -> Pair)
-> Maybe StreamSpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StreamSpecification
streamSpecification,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableName)
]
)
instance Core.ToPath UpdateTable where
toPath :: UpdateTable -> ByteString
toPath = ByteString -> UpdateTable -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateTable where
toQuery :: UpdateTable -> QueryString
toQuery = QueryString -> UpdateTable -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateTableResponse = UpdateTableResponse'
{
UpdateTableResponse -> Maybe TableDescription
tableDescription :: Prelude.Maybe TableDescription,
UpdateTableResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateTableResponse -> UpdateTableResponse -> Bool
(UpdateTableResponse -> UpdateTableResponse -> Bool)
-> (UpdateTableResponse -> UpdateTableResponse -> Bool)
-> Eq UpdateTableResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTableResponse -> UpdateTableResponse -> Bool
$c/= :: UpdateTableResponse -> UpdateTableResponse -> Bool
== :: UpdateTableResponse -> UpdateTableResponse -> Bool
$c== :: UpdateTableResponse -> UpdateTableResponse -> Bool
Prelude.Eq, ReadPrec [UpdateTableResponse]
ReadPrec UpdateTableResponse
Int -> ReadS UpdateTableResponse
ReadS [UpdateTableResponse]
(Int -> ReadS UpdateTableResponse)
-> ReadS [UpdateTableResponse]
-> ReadPrec UpdateTableResponse
-> ReadPrec [UpdateTableResponse]
-> Read UpdateTableResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTableResponse]
$creadListPrec :: ReadPrec [UpdateTableResponse]
readPrec :: ReadPrec UpdateTableResponse
$creadPrec :: ReadPrec UpdateTableResponse
readList :: ReadS [UpdateTableResponse]
$creadList :: ReadS [UpdateTableResponse]
readsPrec :: Int -> ReadS UpdateTableResponse
$creadsPrec :: Int -> ReadS UpdateTableResponse
Prelude.Read, Int -> UpdateTableResponse -> ShowS
[UpdateTableResponse] -> ShowS
UpdateTableResponse -> String
(Int -> UpdateTableResponse -> ShowS)
-> (UpdateTableResponse -> String)
-> ([UpdateTableResponse] -> ShowS)
-> Show UpdateTableResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTableResponse] -> ShowS
$cshowList :: [UpdateTableResponse] -> ShowS
show :: UpdateTableResponse -> String
$cshow :: UpdateTableResponse -> String
showsPrec :: Int -> UpdateTableResponse -> ShowS
$cshowsPrec :: Int -> UpdateTableResponse -> ShowS
Prelude.Show, (forall x. UpdateTableResponse -> Rep UpdateTableResponse x)
-> (forall x. Rep UpdateTableResponse x -> UpdateTableResponse)
-> Generic UpdateTableResponse
forall x. Rep UpdateTableResponse x -> UpdateTableResponse
forall x. UpdateTableResponse -> Rep UpdateTableResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTableResponse x -> UpdateTableResponse
$cfrom :: forall x. UpdateTableResponse -> Rep UpdateTableResponse x
Prelude.Generic)
newUpdateTableResponse ::
Prelude.Int ->
UpdateTableResponse
newUpdateTableResponse :: Int -> UpdateTableResponse
newUpdateTableResponse Int
pHttpStatus_ =
UpdateTableResponse' :: Maybe TableDescription -> Int -> UpdateTableResponse
UpdateTableResponse'
{ $sel:tableDescription:UpdateTableResponse' :: Maybe TableDescription
tableDescription =
Maybe TableDescription
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateTableResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateTableResponse_tableDescription :: Lens.Lens' UpdateTableResponse (Prelude.Maybe TableDescription)
updateTableResponse_tableDescription :: (Maybe TableDescription -> f (Maybe TableDescription))
-> UpdateTableResponse -> f UpdateTableResponse
updateTableResponse_tableDescription = (UpdateTableResponse -> Maybe TableDescription)
-> (UpdateTableResponse
-> Maybe TableDescription -> UpdateTableResponse)
-> Lens
UpdateTableResponse
UpdateTableResponse
(Maybe TableDescription)
(Maybe TableDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTableResponse' {Maybe TableDescription
tableDescription :: Maybe TableDescription
$sel:tableDescription:UpdateTableResponse' :: UpdateTableResponse -> Maybe TableDescription
tableDescription} -> Maybe TableDescription
tableDescription) (\s :: UpdateTableResponse
s@UpdateTableResponse' {} Maybe TableDescription
a -> UpdateTableResponse
s {$sel:tableDescription:UpdateTableResponse' :: Maybe TableDescription
tableDescription = Maybe TableDescription
a} :: UpdateTableResponse)
updateTableResponse_httpStatus :: Lens.Lens' UpdateTableResponse Prelude.Int
updateTableResponse_httpStatus :: (Int -> f Int) -> UpdateTableResponse -> f UpdateTableResponse
updateTableResponse_httpStatus = (UpdateTableResponse -> Int)
-> (UpdateTableResponse -> Int -> UpdateTableResponse)
-> Lens UpdateTableResponse UpdateTableResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTableResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateTableResponse' :: UpdateTableResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateTableResponse
s@UpdateTableResponse' {} Int
a -> UpdateTableResponse
s {$sel:httpStatus:UpdateTableResponse' :: Int
httpStatus = Int
a} :: UpdateTableResponse)
instance Prelude.NFData UpdateTableResponse