{-# 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.UpdateTableReplicaAutoScaling
(
UpdateTableReplicaAutoScaling (..),
newUpdateTableReplicaAutoScaling,
updateTableReplicaAutoScaling_replicaUpdates,
updateTableReplicaAutoScaling_provisionedWriteCapacityAutoScalingUpdate,
updateTableReplicaAutoScaling_globalSecondaryIndexUpdates,
updateTableReplicaAutoScaling_tableName,
UpdateTableReplicaAutoScalingResponse (..),
newUpdateTableReplicaAutoScalingResponse,
updateTableReplicaAutoScalingResponse_tableAutoScalingDescription,
updateTableReplicaAutoScalingResponse_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 UpdateTableReplicaAutoScaling = UpdateTableReplicaAutoScaling'
{
UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty ReplicaAutoScalingUpdate)
replicaUpdates :: Prelude.Maybe (Prelude.NonEmpty ReplicaAutoScalingUpdate),
UpdateTableReplicaAutoScaling -> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate :: Prelude.Maybe AutoScalingSettingsUpdate,
UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
globalSecondaryIndexUpdates :: Prelude.Maybe (Prelude.NonEmpty GlobalSecondaryIndexAutoScalingUpdate),
UpdateTableReplicaAutoScaling -> Text
tableName :: Prelude.Text
}
deriving (UpdateTableReplicaAutoScaling
-> UpdateTableReplicaAutoScaling -> Bool
(UpdateTableReplicaAutoScaling
-> UpdateTableReplicaAutoScaling -> Bool)
-> (UpdateTableReplicaAutoScaling
-> UpdateTableReplicaAutoScaling -> Bool)
-> Eq UpdateTableReplicaAutoScaling
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTableReplicaAutoScaling
-> UpdateTableReplicaAutoScaling -> Bool
$c/= :: UpdateTableReplicaAutoScaling
-> UpdateTableReplicaAutoScaling -> Bool
== :: UpdateTableReplicaAutoScaling
-> UpdateTableReplicaAutoScaling -> Bool
$c== :: UpdateTableReplicaAutoScaling
-> UpdateTableReplicaAutoScaling -> Bool
Prelude.Eq, ReadPrec [UpdateTableReplicaAutoScaling]
ReadPrec UpdateTableReplicaAutoScaling
Int -> ReadS UpdateTableReplicaAutoScaling
ReadS [UpdateTableReplicaAutoScaling]
(Int -> ReadS UpdateTableReplicaAutoScaling)
-> ReadS [UpdateTableReplicaAutoScaling]
-> ReadPrec UpdateTableReplicaAutoScaling
-> ReadPrec [UpdateTableReplicaAutoScaling]
-> Read UpdateTableReplicaAutoScaling
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTableReplicaAutoScaling]
$creadListPrec :: ReadPrec [UpdateTableReplicaAutoScaling]
readPrec :: ReadPrec UpdateTableReplicaAutoScaling
$creadPrec :: ReadPrec UpdateTableReplicaAutoScaling
readList :: ReadS [UpdateTableReplicaAutoScaling]
$creadList :: ReadS [UpdateTableReplicaAutoScaling]
readsPrec :: Int -> ReadS UpdateTableReplicaAutoScaling
$creadsPrec :: Int -> ReadS UpdateTableReplicaAutoScaling
Prelude.Read, Int -> UpdateTableReplicaAutoScaling -> ShowS
[UpdateTableReplicaAutoScaling] -> ShowS
UpdateTableReplicaAutoScaling -> String
(Int -> UpdateTableReplicaAutoScaling -> ShowS)
-> (UpdateTableReplicaAutoScaling -> String)
-> ([UpdateTableReplicaAutoScaling] -> ShowS)
-> Show UpdateTableReplicaAutoScaling
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTableReplicaAutoScaling] -> ShowS
$cshowList :: [UpdateTableReplicaAutoScaling] -> ShowS
show :: UpdateTableReplicaAutoScaling -> String
$cshow :: UpdateTableReplicaAutoScaling -> String
showsPrec :: Int -> UpdateTableReplicaAutoScaling -> ShowS
$cshowsPrec :: Int -> UpdateTableReplicaAutoScaling -> ShowS
Prelude.Show, (forall x.
UpdateTableReplicaAutoScaling
-> Rep UpdateTableReplicaAutoScaling x)
-> (forall x.
Rep UpdateTableReplicaAutoScaling x
-> UpdateTableReplicaAutoScaling)
-> Generic UpdateTableReplicaAutoScaling
forall x.
Rep UpdateTableReplicaAutoScaling x
-> UpdateTableReplicaAutoScaling
forall x.
UpdateTableReplicaAutoScaling
-> Rep UpdateTableReplicaAutoScaling x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateTableReplicaAutoScaling x
-> UpdateTableReplicaAutoScaling
$cfrom :: forall x.
UpdateTableReplicaAutoScaling
-> Rep UpdateTableReplicaAutoScaling x
Prelude.Generic)
newUpdateTableReplicaAutoScaling ::
Prelude.Text ->
UpdateTableReplicaAutoScaling
newUpdateTableReplicaAutoScaling :: Text -> UpdateTableReplicaAutoScaling
newUpdateTableReplicaAutoScaling Text
pTableName_ =
UpdateTableReplicaAutoScaling' :: Maybe (NonEmpty ReplicaAutoScalingUpdate)
-> Maybe AutoScalingSettingsUpdate
-> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> Text
-> UpdateTableReplicaAutoScaling
UpdateTableReplicaAutoScaling'
{ $sel:replicaUpdates:UpdateTableReplicaAutoScaling' :: Maybe (NonEmpty ReplicaAutoScalingUpdate)
replicaUpdates =
Maybe (NonEmpty ReplicaAutoScalingUpdate)
forall a. Maybe a
Prelude.Nothing,
$sel:provisionedWriteCapacityAutoScalingUpdate:UpdateTableReplicaAutoScaling' :: Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate =
Maybe AutoScalingSettingsUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:globalSecondaryIndexUpdates:UpdateTableReplicaAutoScaling' :: Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
globalSecondaryIndexUpdates =
Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
forall a. Maybe a
Prelude.Nothing,
$sel:tableName:UpdateTableReplicaAutoScaling' :: Text
tableName = Text
pTableName_
}
updateTableReplicaAutoScaling_replicaUpdates :: Lens.Lens' UpdateTableReplicaAutoScaling (Prelude.Maybe (Prelude.NonEmpty ReplicaAutoScalingUpdate))
updateTableReplicaAutoScaling_replicaUpdates :: (Maybe (NonEmpty ReplicaAutoScalingUpdate)
-> f (Maybe (NonEmpty ReplicaAutoScalingUpdate)))
-> UpdateTableReplicaAutoScaling -> f UpdateTableReplicaAutoScaling
updateTableReplicaAutoScaling_replicaUpdates = (UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty ReplicaAutoScalingUpdate))
-> (UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty ReplicaAutoScalingUpdate)
-> UpdateTableReplicaAutoScaling)
-> Lens
UpdateTableReplicaAutoScaling
UpdateTableReplicaAutoScaling
(Maybe (NonEmpty ReplicaAutoScalingUpdate))
(Maybe (NonEmpty ReplicaAutoScalingUpdate))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTableReplicaAutoScaling' {Maybe (NonEmpty ReplicaAutoScalingUpdate)
replicaUpdates :: Maybe (NonEmpty ReplicaAutoScalingUpdate)
$sel:replicaUpdates:UpdateTableReplicaAutoScaling' :: UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty ReplicaAutoScalingUpdate)
replicaUpdates} -> Maybe (NonEmpty ReplicaAutoScalingUpdate)
replicaUpdates) (\s :: UpdateTableReplicaAutoScaling
s@UpdateTableReplicaAutoScaling' {} Maybe (NonEmpty ReplicaAutoScalingUpdate)
a -> UpdateTableReplicaAutoScaling
s {$sel:replicaUpdates:UpdateTableReplicaAutoScaling' :: Maybe (NonEmpty ReplicaAutoScalingUpdate)
replicaUpdates = Maybe (NonEmpty ReplicaAutoScalingUpdate)
a} :: UpdateTableReplicaAutoScaling) ((Maybe (NonEmpty ReplicaAutoScalingUpdate)
-> f (Maybe (NonEmpty ReplicaAutoScalingUpdate)))
-> UpdateTableReplicaAutoScaling
-> f UpdateTableReplicaAutoScaling)
-> ((Maybe (NonEmpty ReplicaAutoScalingUpdate)
-> f (Maybe (NonEmpty ReplicaAutoScalingUpdate)))
-> Maybe (NonEmpty ReplicaAutoScalingUpdate)
-> f (Maybe (NonEmpty ReplicaAutoScalingUpdate)))
-> (Maybe (NonEmpty ReplicaAutoScalingUpdate)
-> f (Maybe (NonEmpty ReplicaAutoScalingUpdate)))
-> UpdateTableReplicaAutoScaling
-> f UpdateTableReplicaAutoScaling
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty ReplicaAutoScalingUpdate)
(NonEmpty ReplicaAutoScalingUpdate)
(NonEmpty ReplicaAutoScalingUpdate)
(NonEmpty ReplicaAutoScalingUpdate)
-> Iso
(Maybe (NonEmpty ReplicaAutoScalingUpdate))
(Maybe (NonEmpty ReplicaAutoScalingUpdate))
(Maybe (NonEmpty ReplicaAutoScalingUpdate))
(Maybe (NonEmpty ReplicaAutoScalingUpdate))
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 ReplicaAutoScalingUpdate)
(NonEmpty ReplicaAutoScalingUpdate)
(NonEmpty ReplicaAutoScalingUpdate)
(NonEmpty ReplicaAutoScalingUpdate)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateTableReplicaAutoScaling_provisionedWriteCapacityAutoScalingUpdate :: Lens.Lens' UpdateTableReplicaAutoScaling (Prelude.Maybe AutoScalingSettingsUpdate)
updateTableReplicaAutoScaling_provisionedWriteCapacityAutoScalingUpdate :: (Maybe AutoScalingSettingsUpdate
-> f (Maybe AutoScalingSettingsUpdate))
-> UpdateTableReplicaAutoScaling -> f UpdateTableReplicaAutoScaling
updateTableReplicaAutoScaling_provisionedWriteCapacityAutoScalingUpdate = (UpdateTableReplicaAutoScaling -> Maybe AutoScalingSettingsUpdate)
-> (UpdateTableReplicaAutoScaling
-> Maybe AutoScalingSettingsUpdate
-> UpdateTableReplicaAutoScaling)
-> Lens
UpdateTableReplicaAutoScaling
UpdateTableReplicaAutoScaling
(Maybe AutoScalingSettingsUpdate)
(Maybe AutoScalingSettingsUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTableReplicaAutoScaling' {Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate :: Maybe AutoScalingSettingsUpdate
$sel:provisionedWriteCapacityAutoScalingUpdate:UpdateTableReplicaAutoScaling' :: UpdateTableReplicaAutoScaling -> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate} -> Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate) (\s :: UpdateTableReplicaAutoScaling
s@UpdateTableReplicaAutoScaling' {} Maybe AutoScalingSettingsUpdate
a -> UpdateTableReplicaAutoScaling
s {$sel:provisionedWriteCapacityAutoScalingUpdate:UpdateTableReplicaAutoScaling' :: Maybe AutoScalingSettingsUpdate
provisionedWriteCapacityAutoScalingUpdate = Maybe AutoScalingSettingsUpdate
a} :: UpdateTableReplicaAutoScaling)
updateTableReplicaAutoScaling_globalSecondaryIndexUpdates :: Lens.Lens' UpdateTableReplicaAutoScaling (Prelude.Maybe (Prelude.NonEmpty GlobalSecondaryIndexAutoScalingUpdate))
updateTableReplicaAutoScaling_globalSecondaryIndexUpdates :: (Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> f (Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)))
-> UpdateTableReplicaAutoScaling -> f UpdateTableReplicaAutoScaling
updateTableReplicaAutoScaling_globalSecondaryIndexUpdates = (UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate))
-> (UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> UpdateTableReplicaAutoScaling)
-> Lens
UpdateTableReplicaAutoScaling
UpdateTableReplicaAutoScaling
(Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate))
(Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTableReplicaAutoScaling' {Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
globalSecondaryIndexUpdates :: Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
$sel:globalSecondaryIndexUpdates:UpdateTableReplicaAutoScaling' :: UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
globalSecondaryIndexUpdates} -> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
globalSecondaryIndexUpdates) (\s :: UpdateTableReplicaAutoScaling
s@UpdateTableReplicaAutoScaling' {} Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
a -> UpdateTableReplicaAutoScaling
s {$sel:globalSecondaryIndexUpdates:UpdateTableReplicaAutoScaling' :: Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
globalSecondaryIndexUpdates = Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
a} :: UpdateTableReplicaAutoScaling) ((Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> f (Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)))
-> UpdateTableReplicaAutoScaling
-> f UpdateTableReplicaAutoScaling)
-> ((Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> f (Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)))
-> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> f (Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)))
-> (Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> f (Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)))
-> UpdateTableReplicaAutoScaling
-> f UpdateTableReplicaAutoScaling
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
(NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
(NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
(NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> Iso
(Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate))
(Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate))
(Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate))
(Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate))
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 GlobalSecondaryIndexAutoScalingUpdate)
(NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
(NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
(NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateTableReplicaAutoScaling_tableName :: Lens.Lens' UpdateTableReplicaAutoScaling Prelude.Text
updateTableReplicaAutoScaling_tableName :: (Text -> f Text)
-> UpdateTableReplicaAutoScaling -> f UpdateTableReplicaAutoScaling
updateTableReplicaAutoScaling_tableName = (UpdateTableReplicaAutoScaling -> Text)
-> (UpdateTableReplicaAutoScaling
-> Text -> UpdateTableReplicaAutoScaling)
-> Lens
UpdateTableReplicaAutoScaling
UpdateTableReplicaAutoScaling
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTableReplicaAutoScaling' {Text
tableName :: Text
$sel:tableName:UpdateTableReplicaAutoScaling' :: UpdateTableReplicaAutoScaling -> Text
tableName} -> Text
tableName) (\s :: UpdateTableReplicaAutoScaling
s@UpdateTableReplicaAutoScaling' {} Text
a -> UpdateTableReplicaAutoScaling
s {$sel:tableName:UpdateTableReplicaAutoScaling' :: Text
tableName = Text
a} :: UpdateTableReplicaAutoScaling)
instance
Core.AWSRequest
UpdateTableReplicaAutoScaling
where
type
AWSResponse UpdateTableReplicaAutoScaling =
UpdateTableReplicaAutoScalingResponse
request :: UpdateTableReplicaAutoScaling
-> Request UpdateTableReplicaAutoScaling
request = Service
-> UpdateTableReplicaAutoScaling
-> Request UpdateTableReplicaAutoScaling
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateTableReplicaAutoScaling
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateTableReplicaAutoScaling)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateTableReplicaAutoScaling))
-> Logger
-> Service
-> Proxy UpdateTableReplicaAutoScaling
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateTableReplicaAutoScaling)))
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 TableAutoScalingDescription
-> Int -> UpdateTableReplicaAutoScalingResponse
UpdateTableReplicaAutoScalingResponse'
(Maybe TableAutoScalingDescription
-> Int -> UpdateTableReplicaAutoScalingResponse)
-> Either String (Maybe TableAutoScalingDescription)
-> Either String (Int -> UpdateTableReplicaAutoScalingResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TableAutoScalingDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TableAutoScalingDescription")
Either String (Int -> UpdateTableReplicaAutoScalingResponse)
-> Either String Int
-> Either String UpdateTableReplicaAutoScalingResponse
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
UpdateTableReplicaAutoScaling
instance Prelude.NFData UpdateTableReplicaAutoScaling
instance Core.ToHeaders UpdateTableReplicaAutoScaling where
toHeaders :: UpdateTableReplicaAutoScaling -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateTableReplicaAutoScaling -> 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.UpdateTableReplicaAutoScaling" ::
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 UpdateTableReplicaAutoScaling where
toJSON :: UpdateTableReplicaAutoScaling -> Value
toJSON UpdateTableReplicaAutoScaling' {Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
Maybe (NonEmpty ReplicaAutoScalingUpdate)
Maybe AutoScalingSettingsUpdate
Text
tableName :: Text
globalSecondaryIndexUpdates :: Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
provisionedWriteCapacityAutoScalingUpdate :: Maybe AutoScalingSettingsUpdate
replicaUpdates :: Maybe (NonEmpty ReplicaAutoScalingUpdate)
$sel:tableName:UpdateTableReplicaAutoScaling' :: UpdateTableReplicaAutoScaling -> Text
$sel:globalSecondaryIndexUpdates:UpdateTableReplicaAutoScaling' :: UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
$sel:provisionedWriteCapacityAutoScalingUpdate:UpdateTableReplicaAutoScaling' :: UpdateTableReplicaAutoScaling -> Maybe AutoScalingSettingsUpdate
$sel:replicaUpdates:UpdateTableReplicaAutoScaling' :: UpdateTableReplicaAutoScaling
-> Maybe (NonEmpty ReplicaAutoScalingUpdate)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ReplicaUpdates" Text -> NonEmpty ReplicaAutoScalingUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty ReplicaAutoScalingUpdate -> Pair)
-> Maybe (NonEmpty ReplicaAutoScalingUpdate) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty ReplicaAutoScalingUpdate)
replicaUpdates,
(Text
"ProvisionedWriteCapacityAutoScalingUpdate" 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
provisionedWriteCapacityAutoScalingUpdate,
(Text
"GlobalSecondaryIndexUpdates" Text -> NonEmpty GlobalSecondaryIndexAutoScalingUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty GlobalSecondaryIndexAutoScalingUpdate -> Pair)
-> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty GlobalSecondaryIndexAutoScalingUpdate)
globalSecondaryIndexUpdates,
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 UpdateTableReplicaAutoScaling where
toPath :: UpdateTableReplicaAutoScaling -> ByteString
toPath = ByteString -> UpdateTableReplicaAutoScaling -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateTableReplicaAutoScaling where
toQuery :: UpdateTableReplicaAutoScaling -> QueryString
toQuery = QueryString -> UpdateTableReplicaAutoScaling -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateTableReplicaAutoScalingResponse = UpdateTableReplicaAutoScalingResponse'
{
UpdateTableReplicaAutoScalingResponse
-> Maybe TableAutoScalingDescription
tableAutoScalingDescription :: Prelude.Maybe TableAutoScalingDescription,
UpdateTableReplicaAutoScalingResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateTableReplicaAutoScalingResponse
-> UpdateTableReplicaAutoScalingResponse -> Bool
(UpdateTableReplicaAutoScalingResponse
-> UpdateTableReplicaAutoScalingResponse -> Bool)
-> (UpdateTableReplicaAutoScalingResponse
-> UpdateTableReplicaAutoScalingResponse -> Bool)
-> Eq UpdateTableReplicaAutoScalingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTableReplicaAutoScalingResponse
-> UpdateTableReplicaAutoScalingResponse -> Bool
$c/= :: UpdateTableReplicaAutoScalingResponse
-> UpdateTableReplicaAutoScalingResponse -> Bool
== :: UpdateTableReplicaAutoScalingResponse
-> UpdateTableReplicaAutoScalingResponse -> Bool
$c== :: UpdateTableReplicaAutoScalingResponse
-> UpdateTableReplicaAutoScalingResponse -> Bool
Prelude.Eq, ReadPrec [UpdateTableReplicaAutoScalingResponse]
ReadPrec UpdateTableReplicaAutoScalingResponse
Int -> ReadS UpdateTableReplicaAutoScalingResponse
ReadS [UpdateTableReplicaAutoScalingResponse]
(Int -> ReadS UpdateTableReplicaAutoScalingResponse)
-> ReadS [UpdateTableReplicaAutoScalingResponse]
-> ReadPrec UpdateTableReplicaAutoScalingResponse
-> ReadPrec [UpdateTableReplicaAutoScalingResponse]
-> Read UpdateTableReplicaAutoScalingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTableReplicaAutoScalingResponse]
$creadListPrec :: ReadPrec [UpdateTableReplicaAutoScalingResponse]
readPrec :: ReadPrec UpdateTableReplicaAutoScalingResponse
$creadPrec :: ReadPrec UpdateTableReplicaAutoScalingResponse
readList :: ReadS [UpdateTableReplicaAutoScalingResponse]
$creadList :: ReadS [UpdateTableReplicaAutoScalingResponse]
readsPrec :: Int -> ReadS UpdateTableReplicaAutoScalingResponse
$creadsPrec :: Int -> ReadS UpdateTableReplicaAutoScalingResponse
Prelude.Read, Int -> UpdateTableReplicaAutoScalingResponse -> ShowS
[UpdateTableReplicaAutoScalingResponse] -> ShowS
UpdateTableReplicaAutoScalingResponse -> String
(Int -> UpdateTableReplicaAutoScalingResponse -> ShowS)
-> (UpdateTableReplicaAutoScalingResponse -> String)
-> ([UpdateTableReplicaAutoScalingResponse] -> ShowS)
-> Show UpdateTableReplicaAutoScalingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTableReplicaAutoScalingResponse] -> ShowS
$cshowList :: [UpdateTableReplicaAutoScalingResponse] -> ShowS
show :: UpdateTableReplicaAutoScalingResponse -> String
$cshow :: UpdateTableReplicaAutoScalingResponse -> String
showsPrec :: Int -> UpdateTableReplicaAutoScalingResponse -> ShowS
$cshowsPrec :: Int -> UpdateTableReplicaAutoScalingResponse -> ShowS
Prelude.Show, (forall x.
UpdateTableReplicaAutoScalingResponse
-> Rep UpdateTableReplicaAutoScalingResponse x)
-> (forall x.
Rep UpdateTableReplicaAutoScalingResponse x
-> UpdateTableReplicaAutoScalingResponse)
-> Generic UpdateTableReplicaAutoScalingResponse
forall x.
Rep UpdateTableReplicaAutoScalingResponse x
-> UpdateTableReplicaAutoScalingResponse
forall x.
UpdateTableReplicaAutoScalingResponse
-> Rep UpdateTableReplicaAutoScalingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateTableReplicaAutoScalingResponse x
-> UpdateTableReplicaAutoScalingResponse
$cfrom :: forall x.
UpdateTableReplicaAutoScalingResponse
-> Rep UpdateTableReplicaAutoScalingResponse x
Prelude.Generic)
newUpdateTableReplicaAutoScalingResponse ::
Prelude.Int ->
UpdateTableReplicaAutoScalingResponse
newUpdateTableReplicaAutoScalingResponse :: Int -> UpdateTableReplicaAutoScalingResponse
newUpdateTableReplicaAutoScalingResponse Int
pHttpStatus_ =
UpdateTableReplicaAutoScalingResponse' :: Maybe TableAutoScalingDescription
-> Int -> UpdateTableReplicaAutoScalingResponse
UpdateTableReplicaAutoScalingResponse'
{ $sel:tableAutoScalingDescription:UpdateTableReplicaAutoScalingResponse' :: Maybe TableAutoScalingDescription
tableAutoScalingDescription =
Maybe TableAutoScalingDescription
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateTableReplicaAutoScalingResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateTableReplicaAutoScalingResponse_tableAutoScalingDescription :: Lens.Lens' UpdateTableReplicaAutoScalingResponse (Prelude.Maybe TableAutoScalingDescription)
updateTableReplicaAutoScalingResponse_tableAutoScalingDescription :: (Maybe TableAutoScalingDescription
-> f (Maybe TableAutoScalingDescription))
-> UpdateTableReplicaAutoScalingResponse
-> f UpdateTableReplicaAutoScalingResponse
updateTableReplicaAutoScalingResponse_tableAutoScalingDescription = (UpdateTableReplicaAutoScalingResponse
-> Maybe TableAutoScalingDescription)
-> (UpdateTableReplicaAutoScalingResponse
-> Maybe TableAutoScalingDescription
-> UpdateTableReplicaAutoScalingResponse)
-> Lens
UpdateTableReplicaAutoScalingResponse
UpdateTableReplicaAutoScalingResponse
(Maybe TableAutoScalingDescription)
(Maybe TableAutoScalingDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTableReplicaAutoScalingResponse' {Maybe TableAutoScalingDescription
tableAutoScalingDescription :: Maybe TableAutoScalingDescription
$sel:tableAutoScalingDescription:UpdateTableReplicaAutoScalingResponse' :: UpdateTableReplicaAutoScalingResponse
-> Maybe TableAutoScalingDescription
tableAutoScalingDescription} -> Maybe TableAutoScalingDescription
tableAutoScalingDescription) (\s :: UpdateTableReplicaAutoScalingResponse
s@UpdateTableReplicaAutoScalingResponse' {} Maybe TableAutoScalingDescription
a -> UpdateTableReplicaAutoScalingResponse
s {$sel:tableAutoScalingDescription:UpdateTableReplicaAutoScalingResponse' :: Maybe TableAutoScalingDescription
tableAutoScalingDescription = Maybe TableAutoScalingDescription
a} :: UpdateTableReplicaAutoScalingResponse)
updateTableReplicaAutoScalingResponse_httpStatus :: Lens.Lens' UpdateTableReplicaAutoScalingResponse Prelude.Int
updateTableReplicaAutoScalingResponse_httpStatus :: (Int -> f Int)
-> UpdateTableReplicaAutoScalingResponse
-> f UpdateTableReplicaAutoScalingResponse
updateTableReplicaAutoScalingResponse_httpStatus = (UpdateTableReplicaAutoScalingResponse -> Int)
-> (UpdateTableReplicaAutoScalingResponse
-> Int -> UpdateTableReplicaAutoScalingResponse)
-> Lens
UpdateTableReplicaAutoScalingResponse
UpdateTableReplicaAutoScalingResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTableReplicaAutoScalingResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateTableReplicaAutoScalingResponse' :: UpdateTableReplicaAutoScalingResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateTableReplicaAutoScalingResponse
s@UpdateTableReplicaAutoScalingResponse' {} Int
a -> UpdateTableReplicaAutoScalingResponse
s {$sel:httpStatus:UpdateTableReplicaAutoScalingResponse' :: Int
httpStatus = Int
a} :: UpdateTableReplicaAutoScalingResponse)
instance
Prelude.NFData
UpdateTableReplicaAutoScalingResponse