{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DynamoDB.UpdateGlobalTableSettings
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates settings for a global table.
module Amazonka.DynamoDB.UpdateGlobalTableSettings
  ( -- * Creating a Request
    UpdateGlobalTableSettings (..),
    newUpdateGlobalTableSettings,

    -- * Request Lenses
    updateGlobalTableSettings_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate,
    updateGlobalTableSettings_globalTableBillingMode,
    updateGlobalTableSettings_globalTableProvisionedWriteCapacityUnits,
    updateGlobalTableSettings_replicaSettingsUpdate,
    updateGlobalTableSettings_globalTableGlobalSecondaryIndexSettingsUpdate,
    updateGlobalTableSettings_globalTableName,

    -- * Destructuring the Response
    UpdateGlobalTableSettingsResponse (..),
    newUpdateGlobalTableSettingsResponse,

    -- * Response Lenses
    updateGlobalTableSettingsResponse_replicaSettings,
    updateGlobalTableSettingsResponse_globalTableName,
    updateGlobalTableSettingsResponse_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

-- | /See:/ 'newUpdateGlobalTableSettings' smart constructor.
data UpdateGlobalTableSettings = UpdateGlobalTableSettings'
  { -- | Auto scaling settings for managing provisioned write capacity for the
    -- global table.
    UpdateGlobalTableSettings -> Maybe AutoScalingSettingsUpdate
globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate :: Prelude.Maybe AutoScalingSettingsUpdate,
    -- | The billing mode of the global table. If @GlobalTableBillingMode@ is not
    -- specified, the global table defaults to @PROVISIONED@ capacity billing
    -- mode.
    --
    -- -   @PROVISIONED@ - We recommend using @PROVISIONED@ for predictable
    --     workloads. @PROVISIONED@ sets the billing mode to
    --     <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual Provisioned Mode>.
    --
    -- -   @PAY_PER_REQUEST@ - We recommend using @PAY_PER_REQUEST@ for
    --     unpredictable workloads. @PAY_PER_REQUEST@ sets the billing mode to
    --     <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand On-Demand Mode>.
    UpdateGlobalTableSettings -> Maybe BillingMode
globalTableBillingMode :: Prelude.Maybe BillingMode,
    -- | The maximum number of writes consumed per second before DynamoDB returns
    -- a @ThrottlingException.@
    UpdateGlobalTableSettings -> Maybe Natural
globalTableProvisionedWriteCapacityUnits :: Prelude.Maybe Prelude.Natural,
    -- | Represents the settings for a global table in a Region that will be
    -- modified.
    UpdateGlobalTableSettings -> Maybe (NonEmpty ReplicaSettingsUpdate)
replicaSettingsUpdate :: Prelude.Maybe (Prelude.NonEmpty ReplicaSettingsUpdate),
    -- | Represents the settings of a global secondary index for a global table
    -- that will be modified.
    UpdateGlobalTableSettings
-> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate :: Prelude.Maybe (Prelude.NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate),
    -- | The name of the global table
    UpdateGlobalTableSettings -> Text
globalTableName :: Prelude.Text
  }
  deriving (UpdateGlobalTableSettings -> UpdateGlobalTableSettings -> Bool
(UpdateGlobalTableSettings -> UpdateGlobalTableSettings -> Bool)
-> (UpdateGlobalTableSettings -> UpdateGlobalTableSettings -> Bool)
-> Eq UpdateGlobalTableSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGlobalTableSettings -> UpdateGlobalTableSettings -> Bool
$c/= :: UpdateGlobalTableSettings -> UpdateGlobalTableSettings -> Bool
== :: UpdateGlobalTableSettings -> UpdateGlobalTableSettings -> Bool
$c== :: UpdateGlobalTableSettings -> UpdateGlobalTableSettings -> Bool
Prelude.Eq, ReadPrec [UpdateGlobalTableSettings]
ReadPrec UpdateGlobalTableSettings
Int -> ReadS UpdateGlobalTableSettings
ReadS [UpdateGlobalTableSettings]
(Int -> ReadS UpdateGlobalTableSettings)
-> ReadS [UpdateGlobalTableSettings]
-> ReadPrec UpdateGlobalTableSettings
-> ReadPrec [UpdateGlobalTableSettings]
-> Read UpdateGlobalTableSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGlobalTableSettings]
$creadListPrec :: ReadPrec [UpdateGlobalTableSettings]
readPrec :: ReadPrec UpdateGlobalTableSettings
$creadPrec :: ReadPrec UpdateGlobalTableSettings
readList :: ReadS [UpdateGlobalTableSettings]
$creadList :: ReadS [UpdateGlobalTableSettings]
readsPrec :: Int -> ReadS UpdateGlobalTableSettings
$creadsPrec :: Int -> ReadS UpdateGlobalTableSettings
Prelude.Read, Int -> UpdateGlobalTableSettings -> ShowS
[UpdateGlobalTableSettings] -> ShowS
UpdateGlobalTableSettings -> String
(Int -> UpdateGlobalTableSettings -> ShowS)
-> (UpdateGlobalTableSettings -> String)
-> ([UpdateGlobalTableSettings] -> ShowS)
-> Show UpdateGlobalTableSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGlobalTableSettings] -> ShowS
$cshowList :: [UpdateGlobalTableSettings] -> ShowS
show :: UpdateGlobalTableSettings -> String
$cshow :: UpdateGlobalTableSettings -> String
showsPrec :: Int -> UpdateGlobalTableSettings -> ShowS
$cshowsPrec :: Int -> UpdateGlobalTableSettings -> ShowS
Prelude.Show, (forall x.
 UpdateGlobalTableSettings -> Rep UpdateGlobalTableSettings x)
-> (forall x.
    Rep UpdateGlobalTableSettings x -> UpdateGlobalTableSettings)
-> Generic UpdateGlobalTableSettings
forall x.
Rep UpdateGlobalTableSettings x -> UpdateGlobalTableSettings
forall x.
UpdateGlobalTableSettings -> Rep UpdateGlobalTableSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateGlobalTableSettings x -> UpdateGlobalTableSettings
$cfrom :: forall x.
UpdateGlobalTableSettings -> Rep UpdateGlobalTableSettings x
Prelude.Generic)

-- |
-- Create a value of 'UpdateGlobalTableSettings' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate', 'updateGlobalTableSettings_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate' - Auto scaling settings for managing provisioned write capacity for the
-- global table.
--
-- 'globalTableBillingMode', 'updateGlobalTableSettings_globalTableBillingMode' - The billing mode of the global table. If @GlobalTableBillingMode@ is not
-- specified, the global table defaults to @PROVISIONED@ capacity billing
-- mode.
--
-- -   @PROVISIONED@ - We recommend using @PROVISIONED@ for predictable
--     workloads. @PROVISIONED@ sets the billing mode to
--     <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual Provisioned Mode>.
--
-- -   @PAY_PER_REQUEST@ - We recommend using @PAY_PER_REQUEST@ for
--     unpredictable workloads. @PAY_PER_REQUEST@ sets the billing mode to
--     <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand On-Demand Mode>.
--
-- 'globalTableProvisionedWriteCapacityUnits', 'updateGlobalTableSettings_globalTableProvisionedWriteCapacityUnits' - The maximum number of writes consumed per second before DynamoDB returns
-- a @ThrottlingException.@
--
-- 'replicaSettingsUpdate', 'updateGlobalTableSettings_replicaSettingsUpdate' - Represents the settings for a global table in a Region that will be
-- modified.
--
-- 'globalTableGlobalSecondaryIndexSettingsUpdate', 'updateGlobalTableSettings_globalTableGlobalSecondaryIndexSettingsUpdate' - Represents the settings of a global secondary index for a global table
-- that will be modified.
--
-- 'globalTableName', 'updateGlobalTableSettings_globalTableName' - The name of the global table
newUpdateGlobalTableSettings ::
  -- | 'globalTableName'
  Prelude.Text ->
  UpdateGlobalTableSettings
newUpdateGlobalTableSettings :: Text -> UpdateGlobalTableSettings
newUpdateGlobalTableSettings Text
pGlobalTableName_ =
  UpdateGlobalTableSettings' :: Maybe AutoScalingSettingsUpdate
-> Maybe BillingMode
-> Maybe Natural
-> Maybe (NonEmpty ReplicaSettingsUpdate)
-> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
-> Text
-> UpdateGlobalTableSettings
UpdateGlobalTableSettings'
    { $sel:globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate:UpdateGlobalTableSettings' :: Maybe AutoScalingSettingsUpdate
globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate =
        Maybe AutoScalingSettingsUpdate
forall a. Maybe a
Prelude.Nothing,
      $sel:globalTableBillingMode:UpdateGlobalTableSettings' :: Maybe BillingMode
globalTableBillingMode = Maybe BillingMode
forall a. Maybe a
Prelude.Nothing,
      $sel:globalTableProvisionedWriteCapacityUnits:UpdateGlobalTableSettings' :: Maybe Natural
globalTableProvisionedWriteCapacityUnits =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:replicaSettingsUpdate:UpdateGlobalTableSettings' :: Maybe (NonEmpty ReplicaSettingsUpdate)
replicaSettingsUpdate = Maybe (NonEmpty ReplicaSettingsUpdate)
forall a. Maybe a
Prelude.Nothing,
      $sel:globalTableGlobalSecondaryIndexSettingsUpdate:UpdateGlobalTableSettings' :: Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate =
        Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
forall a. Maybe a
Prelude.Nothing,
      $sel:globalTableName:UpdateGlobalTableSettings' :: Text
globalTableName = Text
pGlobalTableName_
    }

-- | Auto scaling settings for managing provisioned write capacity for the
-- global table.
updateGlobalTableSettings_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate :: Lens.Lens' UpdateGlobalTableSettings (Prelude.Maybe AutoScalingSettingsUpdate)
updateGlobalTableSettings_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate :: (Maybe AutoScalingSettingsUpdate
 -> f (Maybe AutoScalingSettingsUpdate))
-> UpdateGlobalTableSettings -> f UpdateGlobalTableSettings
updateGlobalTableSettings_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = (UpdateGlobalTableSettings -> Maybe AutoScalingSettingsUpdate)
-> (UpdateGlobalTableSettings
    -> Maybe AutoScalingSettingsUpdate -> UpdateGlobalTableSettings)
-> Lens
     UpdateGlobalTableSettings
     UpdateGlobalTableSettings
     (Maybe AutoScalingSettingsUpdate)
     (Maybe AutoScalingSettingsUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettings' {Maybe AutoScalingSettingsUpdate
globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate :: Maybe AutoScalingSettingsUpdate
$sel:globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Maybe AutoScalingSettingsUpdate
globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate} -> Maybe AutoScalingSettingsUpdate
globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate) (\s :: UpdateGlobalTableSettings
s@UpdateGlobalTableSettings' {} Maybe AutoScalingSettingsUpdate
a -> UpdateGlobalTableSettings
s {$sel:globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate:UpdateGlobalTableSettings' :: Maybe AutoScalingSettingsUpdate
globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = Maybe AutoScalingSettingsUpdate
a} :: UpdateGlobalTableSettings)

-- | The billing mode of the global table. If @GlobalTableBillingMode@ is not
-- specified, the global table defaults to @PROVISIONED@ capacity billing
-- mode.
--
-- -   @PROVISIONED@ - We recommend using @PROVISIONED@ for predictable
--     workloads. @PROVISIONED@ sets the billing mode to
--     <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual Provisioned Mode>.
--
-- -   @PAY_PER_REQUEST@ - We recommend using @PAY_PER_REQUEST@ for
--     unpredictable workloads. @PAY_PER_REQUEST@ sets the billing mode to
--     <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand On-Demand Mode>.
updateGlobalTableSettings_globalTableBillingMode :: Lens.Lens' UpdateGlobalTableSettings (Prelude.Maybe BillingMode)
updateGlobalTableSettings_globalTableBillingMode :: (Maybe BillingMode -> f (Maybe BillingMode))
-> UpdateGlobalTableSettings -> f UpdateGlobalTableSettings
updateGlobalTableSettings_globalTableBillingMode = (UpdateGlobalTableSettings -> Maybe BillingMode)
-> (UpdateGlobalTableSettings
    -> Maybe BillingMode -> UpdateGlobalTableSettings)
-> Lens
     UpdateGlobalTableSettings
     UpdateGlobalTableSettings
     (Maybe BillingMode)
     (Maybe BillingMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettings' {Maybe BillingMode
globalTableBillingMode :: Maybe BillingMode
$sel:globalTableBillingMode:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Maybe BillingMode
globalTableBillingMode} -> Maybe BillingMode
globalTableBillingMode) (\s :: UpdateGlobalTableSettings
s@UpdateGlobalTableSettings' {} Maybe BillingMode
a -> UpdateGlobalTableSettings
s {$sel:globalTableBillingMode:UpdateGlobalTableSettings' :: Maybe BillingMode
globalTableBillingMode = Maybe BillingMode
a} :: UpdateGlobalTableSettings)

-- | The maximum number of writes consumed per second before DynamoDB returns
-- a @ThrottlingException.@
updateGlobalTableSettings_globalTableProvisionedWriteCapacityUnits :: Lens.Lens' UpdateGlobalTableSettings (Prelude.Maybe Prelude.Natural)
updateGlobalTableSettings_globalTableProvisionedWriteCapacityUnits :: (Maybe Natural -> f (Maybe Natural))
-> UpdateGlobalTableSettings -> f UpdateGlobalTableSettings
updateGlobalTableSettings_globalTableProvisionedWriteCapacityUnits = (UpdateGlobalTableSettings -> Maybe Natural)
-> (UpdateGlobalTableSettings
    -> Maybe Natural -> UpdateGlobalTableSettings)
-> Lens
     UpdateGlobalTableSettings
     UpdateGlobalTableSettings
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettings' {Maybe Natural
globalTableProvisionedWriteCapacityUnits :: Maybe Natural
$sel:globalTableProvisionedWriteCapacityUnits:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Maybe Natural
globalTableProvisionedWriteCapacityUnits} -> Maybe Natural
globalTableProvisionedWriteCapacityUnits) (\s :: UpdateGlobalTableSettings
s@UpdateGlobalTableSettings' {} Maybe Natural
a -> UpdateGlobalTableSettings
s {$sel:globalTableProvisionedWriteCapacityUnits:UpdateGlobalTableSettings' :: Maybe Natural
globalTableProvisionedWriteCapacityUnits = Maybe Natural
a} :: UpdateGlobalTableSettings)

-- | Represents the settings for a global table in a Region that will be
-- modified.
updateGlobalTableSettings_replicaSettingsUpdate :: Lens.Lens' UpdateGlobalTableSettings (Prelude.Maybe (Prelude.NonEmpty ReplicaSettingsUpdate))
updateGlobalTableSettings_replicaSettingsUpdate :: (Maybe (NonEmpty ReplicaSettingsUpdate)
 -> f (Maybe (NonEmpty ReplicaSettingsUpdate)))
-> UpdateGlobalTableSettings -> f UpdateGlobalTableSettings
updateGlobalTableSettings_replicaSettingsUpdate = (UpdateGlobalTableSettings
 -> Maybe (NonEmpty ReplicaSettingsUpdate))
-> (UpdateGlobalTableSettings
    -> Maybe (NonEmpty ReplicaSettingsUpdate)
    -> UpdateGlobalTableSettings)
-> Lens
     UpdateGlobalTableSettings
     UpdateGlobalTableSettings
     (Maybe (NonEmpty ReplicaSettingsUpdate))
     (Maybe (NonEmpty ReplicaSettingsUpdate))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettings' {Maybe (NonEmpty ReplicaSettingsUpdate)
replicaSettingsUpdate :: Maybe (NonEmpty ReplicaSettingsUpdate)
$sel:replicaSettingsUpdate:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Maybe (NonEmpty ReplicaSettingsUpdate)
replicaSettingsUpdate} -> Maybe (NonEmpty ReplicaSettingsUpdate)
replicaSettingsUpdate) (\s :: UpdateGlobalTableSettings
s@UpdateGlobalTableSettings' {} Maybe (NonEmpty ReplicaSettingsUpdate)
a -> UpdateGlobalTableSettings
s {$sel:replicaSettingsUpdate:UpdateGlobalTableSettings' :: Maybe (NonEmpty ReplicaSettingsUpdate)
replicaSettingsUpdate = Maybe (NonEmpty ReplicaSettingsUpdate)
a} :: UpdateGlobalTableSettings) ((Maybe (NonEmpty ReplicaSettingsUpdate)
  -> f (Maybe (NonEmpty ReplicaSettingsUpdate)))
 -> UpdateGlobalTableSettings -> f UpdateGlobalTableSettings)
-> ((Maybe (NonEmpty ReplicaSettingsUpdate)
     -> f (Maybe (NonEmpty ReplicaSettingsUpdate)))
    -> Maybe (NonEmpty ReplicaSettingsUpdate)
    -> f (Maybe (NonEmpty ReplicaSettingsUpdate)))
-> (Maybe (NonEmpty ReplicaSettingsUpdate)
    -> f (Maybe (NonEmpty ReplicaSettingsUpdate)))
-> UpdateGlobalTableSettings
-> f UpdateGlobalTableSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty ReplicaSettingsUpdate)
  (NonEmpty ReplicaSettingsUpdate)
  (NonEmpty ReplicaSettingsUpdate)
  (NonEmpty ReplicaSettingsUpdate)
-> Iso
     (Maybe (NonEmpty ReplicaSettingsUpdate))
     (Maybe (NonEmpty ReplicaSettingsUpdate))
     (Maybe (NonEmpty ReplicaSettingsUpdate))
     (Maybe (NonEmpty ReplicaSettingsUpdate))
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 ReplicaSettingsUpdate)
  (NonEmpty ReplicaSettingsUpdate)
  (NonEmpty ReplicaSettingsUpdate)
  (NonEmpty ReplicaSettingsUpdate)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Represents the settings of a global secondary index for a global table
-- that will be modified.
updateGlobalTableSettings_globalTableGlobalSecondaryIndexSettingsUpdate :: Lens.Lens' UpdateGlobalTableSettings (Prelude.Maybe (Prelude.NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate))
updateGlobalTableSettings_globalTableGlobalSecondaryIndexSettingsUpdate :: (Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
 -> f (Maybe
         (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)))
-> UpdateGlobalTableSettings -> f UpdateGlobalTableSettings
updateGlobalTableSettings_globalTableGlobalSecondaryIndexSettingsUpdate = (UpdateGlobalTableSettings
 -> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate))
-> (UpdateGlobalTableSettings
    -> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
    -> UpdateGlobalTableSettings)
-> Lens
     UpdateGlobalTableSettings
     UpdateGlobalTableSettings
     (Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate))
     (Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettings' {Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate :: Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
$sel:globalTableGlobalSecondaryIndexSettingsUpdate:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings
-> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate} -> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate) (\s :: UpdateGlobalTableSettings
s@UpdateGlobalTableSettings' {} Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
a -> UpdateGlobalTableSettings
s {$sel:globalTableGlobalSecondaryIndexSettingsUpdate:UpdateGlobalTableSettings' :: Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate = Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
a} :: UpdateGlobalTableSettings) ((Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
  -> f (Maybe
          (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)))
 -> UpdateGlobalTableSettings -> f UpdateGlobalTableSettings)
-> ((Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
     -> f (Maybe
             (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)))
    -> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
    -> f (Maybe
            (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)))
-> (Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
    -> f (Maybe
            (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)))
-> UpdateGlobalTableSettings
-> f UpdateGlobalTableSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
  (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
  (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
  (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
-> Iso
     (Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate))
     (Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate))
     (Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate))
     (Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate))
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 GlobalTableGlobalSecondaryIndexSettingsUpdate)
  (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
  (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
  (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the global table
updateGlobalTableSettings_globalTableName :: Lens.Lens' UpdateGlobalTableSettings Prelude.Text
updateGlobalTableSettings_globalTableName :: (Text -> f Text)
-> UpdateGlobalTableSettings -> f UpdateGlobalTableSettings
updateGlobalTableSettings_globalTableName = (UpdateGlobalTableSettings -> Text)
-> (UpdateGlobalTableSettings -> Text -> UpdateGlobalTableSettings)
-> Lens
     UpdateGlobalTableSettings UpdateGlobalTableSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettings' {Text
globalTableName :: Text
$sel:globalTableName:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Text
globalTableName} -> Text
globalTableName) (\s :: UpdateGlobalTableSettings
s@UpdateGlobalTableSettings' {} Text
a -> UpdateGlobalTableSettings
s {$sel:globalTableName:UpdateGlobalTableSettings' :: Text
globalTableName = Text
a} :: UpdateGlobalTableSettings)

instance Core.AWSRequest UpdateGlobalTableSettings where
  type
    AWSResponse UpdateGlobalTableSettings =
      UpdateGlobalTableSettingsResponse
  request :: UpdateGlobalTableSettings -> Request UpdateGlobalTableSettings
request = Service
-> UpdateGlobalTableSettings -> Request UpdateGlobalTableSettings
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateGlobalTableSettings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateGlobalTableSettings)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateGlobalTableSettings))
-> Logger
-> Service
-> Proxy UpdateGlobalTableSettings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateGlobalTableSettings)))
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 [ReplicaSettingsDescription]
-> Maybe Text -> Int -> UpdateGlobalTableSettingsResponse
UpdateGlobalTableSettingsResponse'
            (Maybe [ReplicaSettingsDescription]
 -> Maybe Text -> Int -> UpdateGlobalTableSettingsResponse)
-> Either String (Maybe [ReplicaSettingsDescription])
-> Either
     String (Maybe Text -> Int -> UpdateGlobalTableSettingsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [ReplicaSettingsDescription]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReplicaSettings"
                            Either String (Maybe (Maybe [ReplicaSettingsDescription]))
-> Maybe [ReplicaSettingsDescription]
-> Either String (Maybe [ReplicaSettingsDescription])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ReplicaSettingsDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> UpdateGlobalTableSettingsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateGlobalTableSettingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GlobalTableName")
            Either String (Int -> UpdateGlobalTableSettingsResponse)
-> Either String Int
-> Either String UpdateGlobalTableSettingsResponse
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 UpdateGlobalTableSettings

instance Prelude.NFData UpdateGlobalTableSettings

instance Core.ToHeaders UpdateGlobalTableSettings where
  toHeaders :: UpdateGlobalTableSettings -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateGlobalTableSettings -> 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.UpdateGlobalTableSettings" ::
                          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 UpdateGlobalTableSettings where
  toJSON :: UpdateGlobalTableSettings -> Value
toJSON UpdateGlobalTableSettings' {Maybe Natural
Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
Maybe (NonEmpty ReplicaSettingsUpdate)
Maybe AutoScalingSettingsUpdate
Maybe BillingMode
Text
globalTableName :: Text
globalTableGlobalSecondaryIndexSettingsUpdate :: Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
replicaSettingsUpdate :: Maybe (NonEmpty ReplicaSettingsUpdate)
globalTableProvisionedWriteCapacityUnits :: Maybe Natural
globalTableBillingMode :: Maybe BillingMode
globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate :: Maybe AutoScalingSettingsUpdate
$sel:globalTableName:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Text
$sel:globalTableGlobalSecondaryIndexSettingsUpdate:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings
-> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
$sel:replicaSettingsUpdate:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Maybe (NonEmpty ReplicaSettingsUpdate)
$sel:globalTableProvisionedWriteCapacityUnits:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Maybe Natural
$sel:globalTableBillingMode:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Maybe BillingMode
$sel:globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate:UpdateGlobalTableSettings' :: UpdateGlobalTableSettings -> Maybe AutoScalingSettingsUpdate
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ ( Text
"GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate"
                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
globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate,
            (Text
"GlobalTableBillingMode" 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
globalTableBillingMode,
            (Text
"GlobalTableProvisionedWriteCapacityUnits" 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
globalTableProvisionedWriteCapacityUnits,
            (Text
"ReplicaSettingsUpdate" Text -> NonEmpty ReplicaSettingsUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty ReplicaSettingsUpdate -> Pair)
-> Maybe (NonEmpty ReplicaSettingsUpdate) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty ReplicaSettingsUpdate)
replicaSettingsUpdate,
            ( Text
"GlobalTableGlobalSecondaryIndexSettingsUpdate"
                Text
-> NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=
            )
              (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate -> Pair)
-> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty GlobalTableGlobalSecondaryIndexSettingsUpdate)
globalTableGlobalSecondaryIndexSettingsUpdate,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"GlobalTableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
globalTableName)
          ]
      )

instance Core.ToPath UpdateGlobalTableSettings where
  toPath :: UpdateGlobalTableSettings -> ByteString
toPath = ByteString -> UpdateGlobalTableSettings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateGlobalTableSettings where
  toQuery :: UpdateGlobalTableSettings -> QueryString
toQuery = QueryString -> UpdateGlobalTableSettings -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateGlobalTableSettingsResponse' smart constructor.
data UpdateGlobalTableSettingsResponse = UpdateGlobalTableSettingsResponse'
  { -- | The Region-specific settings for the global table.
    UpdateGlobalTableSettingsResponse
-> Maybe [ReplicaSettingsDescription]
replicaSettings :: Prelude.Maybe [ReplicaSettingsDescription],
    -- | The name of the global table.
    UpdateGlobalTableSettingsResponse -> Maybe Text
globalTableName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateGlobalTableSettingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateGlobalTableSettingsResponse
-> UpdateGlobalTableSettingsResponse -> Bool
(UpdateGlobalTableSettingsResponse
 -> UpdateGlobalTableSettingsResponse -> Bool)
-> (UpdateGlobalTableSettingsResponse
    -> UpdateGlobalTableSettingsResponse -> Bool)
-> Eq UpdateGlobalTableSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGlobalTableSettingsResponse
-> UpdateGlobalTableSettingsResponse -> Bool
$c/= :: UpdateGlobalTableSettingsResponse
-> UpdateGlobalTableSettingsResponse -> Bool
== :: UpdateGlobalTableSettingsResponse
-> UpdateGlobalTableSettingsResponse -> Bool
$c== :: UpdateGlobalTableSettingsResponse
-> UpdateGlobalTableSettingsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateGlobalTableSettingsResponse]
ReadPrec UpdateGlobalTableSettingsResponse
Int -> ReadS UpdateGlobalTableSettingsResponse
ReadS [UpdateGlobalTableSettingsResponse]
(Int -> ReadS UpdateGlobalTableSettingsResponse)
-> ReadS [UpdateGlobalTableSettingsResponse]
-> ReadPrec UpdateGlobalTableSettingsResponse
-> ReadPrec [UpdateGlobalTableSettingsResponse]
-> Read UpdateGlobalTableSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGlobalTableSettingsResponse]
$creadListPrec :: ReadPrec [UpdateGlobalTableSettingsResponse]
readPrec :: ReadPrec UpdateGlobalTableSettingsResponse
$creadPrec :: ReadPrec UpdateGlobalTableSettingsResponse
readList :: ReadS [UpdateGlobalTableSettingsResponse]
$creadList :: ReadS [UpdateGlobalTableSettingsResponse]
readsPrec :: Int -> ReadS UpdateGlobalTableSettingsResponse
$creadsPrec :: Int -> ReadS UpdateGlobalTableSettingsResponse
Prelude.Read, Int -> UpdateGlobalTableSettingsResponse -> ShowS
[UpdateGlobalTableSettingsResponse] -> ShowS
UpdateGlobalTableSettingsResponse -> String
(Int -> UpdateGlobalTableSettingsResponse -> ShowS)
-> (UpdateGlobalTableSettingsResponse -> String)
-> ([UpdateGlobalTableSettingsResponse] -> ShowS)
-> Show UpdateGlobalTableSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGlobalTableSettingsResponse] -> ShowS
$cshowList :: [UpdateGlobalTableSettingsResponse] -> ShowS
show :: UpdateGlobalTableSettingsResponse -> String
$cshow :: UpdateGlobalTableSettingsResponse -> String
showsPrec :: Int -> UpdateGlobalTableSettingsResponse -> ShowS
$cshowsPrec :: Int -> UpdateGlobalTableSettingsResponse -> ShowS
Prelude.Show, (forall x.
 UpdateGlobalTableSettingsResponse
 -> Rep UpdateGlobalTableSettingsResponse x)
-> (forall x.
    Rep UpdateGlobalTableSettingsResponse x
    -> UpdateGlobalTableSettingsResponse)
-> Generic UpdateGlobalTableSettingsResponse
forall x.
Rep UpdateGlobalTableSettingsResponse x
-> UpdateGlobalTableSettingsResponse
forall x.
UpdateGlobalTableSettingsResponse
-> Rep UpdateGlobalTableSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateGlobalTableSettingsResponse x
-> UpdateGlobalTableSettingsResponse
$cfrom :: forall x.
UpdateGlobalTableSettingsResponse
-> Rep UpdateGlobalTableSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateGlobalTableSettingsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'replicaSettings', 'updateGlobalTableSettingsResponse_replicaSettings' - The Region-specific settings for the global table.
--
-- 'globalTableName', 'updateGlobalTableSettingsResponse_globalTableName' - The name of the global table.
--
-- 'httpStatus', 'updateGlobalTableSettingsResponse_httpStatus' - The response's http status code.
newUpdateGlobalTableSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateGlobalTableSettingsResponse
newUpdateGlobalTableSettingsResponse :: Int -> UpdateGlobalTableSettingsResponse
newUpdateGlobalTableSettingsResponse Int
pHttpStatus_ =
  UpdateGlobalTableSettingsResponse' :: Maybe [ReplicaSettingsDescription]
-> Maybe Text -> Int -> UpdateGlobalTableSettingsResponse
UpdateGlobalTableSettingsResponse'
    { $sel:replicaSettings:UpdateGlobalTableSettingsResponse' :: Maybe [ReplicaSettingsDescription]
replicaSettings =
        Maybe [ReplicaSettingsDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:globalTableName:UpdateGlobalTableSettingsResponse' :: Maybe Text
globalTableName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateGlobalTableSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Region-specific settings for the global table.
updateGlobalTableSettingsResponse_replicaSettings :: Lens.Lens' UpdateGlobalTableSettingsResponse (Prelude.Maybe [ReplicaSettingsDescription])
updateGlobalTableSettingsResponse_replicaSettings :: (Maybe [ReplicaSettingsDescription]
 -> f (Maybe [ReplicaSettingsDescription]))
-> UpdateGlobalTableSettingsResponse
-> f UpdateGlobalTableSettingsResponse
updateGlobalTableSettingsResponse_replicaSettings = (UpdateGlobalTableSettingsResponse
 -> Maybe [ReplicaSettingsDescription])
-> (UpdateGlobalTableSettingsResponse
    -> Maybe [ReplicaSettingsDescription]
    -> UpdateGlobalTableSettingsResponse)
-> Lens
     UpdateGlobalTableSettingsResponse
     UpdateGlobalTableSettingsResponse
     (Maybe [ReplicaSettingsDescription])
     (Maybe [ReplicaSettingsDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettingsResponse' {Maybe [ReplicaSettingsDescription]
replicaSettings :: Maybe [ReplicaSettingsDescription]
$sel:replicaSettings:UpdateGlobalTableSettingsResponse' :: UpdateGlobalTableSettingsResponse
-> Maybe [ReplicaSettingsDescription]
replicaSettings} -> Maybe [ReplicaSettingsDescription]
replicaSettings) (\s :: UpdateGlobalTableSettingsResponse
s@UpdateGlobalTableSettingsResponse' {} Maybe [ReplicaSettingsDescription]
a -> UpdateGlobalTableSettingsResponse
s {$sel:replicaSettings:UpdateGlobalTableSettingsResponse' :: Maybe [ReplicaSettingsDescription]
replicaSettings = Maybe [ReplicaSettingsDescription]
a} :: UpdateGlobalTableSettingsResponse) ((Maybe [ReplicaSettingsDescription]
  -> f (Maybe [ReplicaSettingsDescription]))
 -> UpdateGlobalTableSettingsResponse
 -> f UpdateGlobalTableSettingsResponse)
-> ((Maybe [ReplicaSettingsDescription]
     -> f (Maybe [ReplicaSettingsDescription]))
    -> Maybe [ReplicaSettingsDescription]
    -> f (Maybe [ReplicaSettingsDescription]))
-> (Maybe [ReplicaSettingsDescription]
    -> f (Maybe [ReplicaSettingsDescription]))
-> UpdateGlobalTableSettingsResponse
-> f UpdateGlobalTableSettingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReplicaSettingsDescription]
  [ReplicaSettingsDescription]
  [ReplicaSettingsDescription]
  [ReplicaSettingsDescription]
-> Iso
     (Maybe [ReplicaSettingsDescription])
     (Maybe [ReplicaSettingsDescription])
     (Maybe [ReplicaSettingsDescription])
     (Maybe [ReplicaSettingsDescription])
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
  [ReplicaSettingsDescription]
  [ReplicaSettingsDescription]
  [ReplicaSettingsDescription]
  [ReplicaSettingsDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the global table.
updateGlobalTableSettingsResponse_globalTableName :: Lens.Lens' UpdateGlobalTableSettingsResponse (Prelude.Maybe Prelude.Text)
updateGlobalTableSettingsResponse_globalTableName :: (Maybe Text -> f (Maybe Text))
-> UpdateGlobalTableSettingsResponse
-> f UpdateGlobalTableSettingsResponse
updateGlobalTableSettingsResponse_globalTableName = (UpdateGlobalTableSettingsResponse -> Maybe Text)
-> (UpdateGlobalTableSettingsResponse
    -> Maybe Text -> UpdateGlobalTableSettingsResponse)
-> Lens
     UpdateGlobalTableSettingsResponse
     UpdateGlobalTableSettingsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettingsResponse' {Maybe Text
globalTableName :: Maybe Text
$sel:globalTableName:UpdateGlobalTableSettingsResponse' :: UpdateGlobalTableSettingsResponse -> Maybe Text
globalTableName} -> Maybe Text
globalTableName) (\s :: UpdateGlobalTableSettingsResponse
s@UpdateGlobalTableSettingsResponse' {} Maybe Text
a -> UpdateGlobalTableSettingsResponse
s {$sel:globalTableName:UpdateGlobalTableSettingsResponse' :: Maybe Text
globalTableName = Maybe Text
a} :: UpdateGlobalTableSettingsResponse)

-- | The response's http status code.
updateGlobalTableSettingsResponse_httpStatus :: Lens.Lens' UpdateGlobalTableSettingsResponse Prelude.Int
updateGlobalTableSettingsResponse_httpStatus :: (Int -> f Int)
-> UpdateGlobalTableSettingsResponse
-> f UpdateGlobalTableSettingsResponse
updateGlobalTableSettingsResponse_httpStatus = (UpdateGlobalTableSettingsResponse -> Int)
-> (UpdateGlobalTableSettingsResponse
    -> Int -> UpdateGlobalTableSettingsResponse)
-> Lens
     UpdateGlobalTableSettingsResponse
     UpdateGlobalTableSettingsResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGlobalTableSettingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateGlobalTableSettingsResponse' :: UpdateGlobalTableSettingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateGlobalTableSettingsResponse
s@UpdateGlobalTableSettingsResponse' {} Int
a -> UpdateGlobalTableSettingsResponse
s {$sel:httpStatus:UpdateGlobalTableSettingsResponse' :: Int
httpStatus = Int
a} :: UpdateGlobalTableSettingsResponse)

instance
  Prelude.NFData
    UpdateGlobalTableSettingsResponse