{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.DynamoDB.Types.ReplicaGlobalSecondaryIndexSettingsDescription
-- 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)
module Amazonka.DynamoDB.Types.ReplicaGlobalSecondaryIndexSettingsDescription where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.AutoScalingSettingsDescription
import Amazonka.DynamoDB.Types.IndexStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the properties of a global secondary index.
--
-- /See:/ 'newReplicaGlobalSecondaryIndexSettingsDescription' smart constructor.
data ReplicaGlobalSecondaryIndexSettingsDescription = ReplicaGlobalSecondaryIndexSettingsDescription'
  { -- | The current status of the global secondary index:
    --
    -- -   @CREATING@ - The global secondary index is being created.
    --
    -- -   @UPDATING@ - The global secondary index is being updated.
    --
    -- -   @DELETING@ - The global secondary index is being deleted.
    --
    -- -   @ACTIVE@ - The global secondary index is ready for use.
    ReplicaGlobalSecondaryIndexSettingsDescription -> Maybe IndexStatus
indexStatus :: Prelude.Maybe IndexStatus,
    -- | The maximum number of strongly consistent reads consumed per second
    -- before DynamoDB returns a @ThrottlingException@.
    ReplicaGlobalSecondaryIndexSettingsDescription -> Maybe Natural
provisionedReadCapacityUnits :: Prelude.Maybe Prelude.Natural,
    -- | The maximum number of writes consumed per second before DynamoDB returns
    -- a @ThrottlingException@.
    ReplicaGlobalSecondaryIndexSettingsDescription -> Maybe Natural
provisionedWriteCapacityUnits :: Prelude.Maybe Prelude.Natural,
    -- | Auto scaling settings for a global secondary index replica\'s write
    -- capacity units.
    ReplicaGlobalSecondaryIndexSettingsDescription
-> Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings :: Prelude.Maybe AutoScalingSettingsDescription,
    -- | Auto scaling settings for a global secondary index replica\'s read
    -- capacity units.
    ReplicaGlobalSecondaryIndexSettingsDescription
-> Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings :: Prelude.Maybe AutoScalingSettingsDescription,
    -- | The name of the global secondary index. The name must be unique among
    -- all other indexes on this table.
    ReplicaGlobalSecondaryIndexSettingsDescription -> Text
indexName :: Prelude.Text
  }
  deriving (ReplicaGlobalSecondaryIndexSettingsDescription
-> ReplicaGlobalSecondaryIndexSettingsDescription -> Bool
(ReplicaGlobalSecondaryIndexSettingsDescription
 -> ReplicaGlobalSecondaryIndexSettingsDescription -> Bool)
-> (ReplicaGlobalSecondaryIndexSettingsDescription
    -> ReplicaGlobalSecondaryIndexSettingsDescription -> Bool)
-> Eq ReplicaGlobalSecondaryIndexSettingsDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicaGlobalSecondaryIndexSettingsDescription
-> ReplicaGlobalSecondaryIndexSettingsDescription -> Bool
$c/= :: ReplicaGlobalSecondaryIndexSettingsDescription
-> ReplicaGlobalSecondaryIndexSettingsDescription -> Bool
== :: ReplicaGlobalSecondaryIndexSettingsDescription
-> ReplicaGlobalSecondaryIndexSettingsDescription -> Bool
$c== :: ReplicaGlobalSecondaryIndexSettingsDescription
-> ReplicaGlobalSecondaryIndexSettingsDescription -> Bool
Prelude.Eq, ReadPrec [ReplicaGlobalSecondaryIndexSettingsDescription]
ReadPrec ReplicaGlobalSecondaryIndexSettingsDescription
Int -> ReadS ReplicaGlobalSecondaryIndexSettingsDescription
ReadS [ReplicaGlobalSecondaryIndexSettingsDescription]
(Int -> ReadS ReplicaGlobalSecondaryIndexSettingsDescription)
-> ReadS [ReplicaGlobalSecondaryIndexSettingsDescription]
-> ReadPrec ReplicaGlobalSecondaryIndexSettingsDescription
-> ReadPrec [ReplicaGlobalSecondaryIndexSettingsDescription]
-> Read ReplicaGlobalSecondaryIndexSettingsDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexSettingsDescription]
$creadListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexSettingsDescription]
readPrec :: ReadPrec ReplicaGlobalSecondaryIndexSettingsDescription
$creadPrec :: ReadPrec ReplicaGlobalSecondaryIndexSettingsDescription
readList :: ReadS [ReplicaGlobalSecondaryIndexSettingsDescription]
$creadList :: ReadS [ReplicaGlobalSecondaryIndexSettingsDescription]
readsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexSettingsDescription
$creadsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexSettingsDescription
Prelude.Read, Int -> ReplicaGlobalSecondaryIndexSettingsDescription -> ShowS
[ReplicaGlobalSecondaryIndexSettingsDescription] -> ShowS
ReplicaGlobalSecondaryIndexSettingsDescription -> String
(Int -> ReplicaGlobalSecondaryIndexSettingsDescription -> ShowS)
-> (ReplicaGlobalSecondaryIndexSettingsDescription -> String)
-> ([ReplicaGlobalSecondaryIndexSettingsDescription] -> ShowS)
-> Show ReplicaGlobalSecondaryIndexSettingsDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicaGlobalSecondaryIndexSettingsDescription] -> ShowS
$cshowList :: [ReplicaGlobalSecondaryIndexSettingsDescription] -> ShowS
show :: ReplicaGlobalSecondaryIndexSettingsDescription -> String
$cshow :: ReplicaGlobalSecondaryIndexSettingsDescription -> String
showsPrec :: Int -> ReplicaGlobalSecondaryIndexSettingsDescription -> ShowS
$cshowsPrec :: Int -> ReplicaGlobalSecondaryIndexSettingsDescription -> ShowS
Prelude.Show, (forall x.
 ReplicaGlobalSecondaryIndexSettingsDescription
 -> Rep ReplicaGlobalSecondaryIndexSettingsDescription x)
-> (forall x.
    Rep ReplicaGlobalSecondaryIndexSettingsDescription x
    -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Generic ReplicaGlobalSecondaryIndexSettingsDescription
forall x.
Rep ReplicaGlobalSecondaryIndexSettingsDescription x
-> ReplicaGlobalSecondaryIndexSettingsDescription
forall x.
ReplicaGlobalSecondaryIndexSettingsDescription
-> Rep ReplicaGlobalSecondaryIndexSettingsDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicaGlobalSecondaryIndexSettingsDescription x
-> ReplicaGlobalSecondaryIndexSettingsDescription
$cfrom :: forall x.
ReplicaGlobalSecondaryIndexSettingsDescription
-> Rep ReplicaGlobalSecondaryIndexSettingsDescription x
Prelude.Generic)

-- |
-- Create a value of 'ReplicaGlobalSecondaryIndexSettingsDescription' 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:
--
-- 'indexStatus', 'replicaGlobalSecondaryIndexSettingsDescription_indexStatus' - The current status of the global secondary index:
--
-- -   @CREATING@ - The global secondary index is being created.
--
-- -   @UPDATING@ - The global secondary index is being updated.
--
-- -   @DELETING@ - The global secondary index is being deleted.
--
-- -   @ACTIVE@ - The global secondary index is ready for use.
--
-- 'provisionedReadCapacityUnits', 'replicaGlobalSecondaryIndexSettingsDescription_provisionedReadCapacityUnits' - The maximum number of strongly consistent reads consumed per second
-- before DynamoDB returns a @ThrottlingException@.
--
-- 'provisionedWriteCapacityUnits', 'replicaGlobalSecondaryIndexSettingsDescription_provisionedWriteCapacityUnits' - The maximum number of writes consumed per second before DynamoDB returns
-- a @ThrottlingException@.
--
-- 'provisionedWriteCapacityAutoScalingSettings', 'replicaGlobalSecondaryIndexSettingsDescription_provisionedWriteCapacityAutoScalingSettings' - Auto scaling settings for a global secondary index replica\'s write
-- capacity units.
--
-- 'provisionedReadCapacityAutoScalingSettings', 'replicaGlobalSecondaryIndexSettingsDescription_provisionedReadCapacityAutoScalingSettings' - Auto scaling settings for a global secondary index replica\'s read
-- capacity units.
--
-- 'indexName', 'replicaGlobalSecondaryIndexSettingsDescription_indexName' - The name of the global secondary index. The name must be unique among
-- all other indexes on this table.
newReplicaGlobalSecondaryIndexSettingsDescription ::
  -- | 'indexName'
  Prelude.Text ->
  ReplicaGlobalSecondaryIndexSettingsDescription
newReplicaGlobalSecondaryIndexSettingsDescription :: Text -> ReplicaGlobalSecondaryIndexSettingsDescription
newReplicaGlobalSecondaryIndexSettingsDescription
  Text
pIndexName_ =
    ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe IndexStatus
-> Maybe Natural
-> Maybe Natural
-> Maybe AutoScalingSettingsDescription
-> Maybe AutoScalingSettingsDescription
-> Text
-> ReplicaGlobalSecondaryIndexSettingsDescription
ReplicaGlobalSecondaryIndexSettingsDescription'
      { $sel:indexStatus:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe IndexStatus
indexStatus =
          Maybe IndexStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:provisionedReadCapacityUnits:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe Natural
provisionedReadCapacityUnits =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:provisionedWriteCapacityUnits:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe Natural
provisionedWriteCapacityUnits =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:provisionedWriteCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings =
          Maybe AutoScalingSettingsDescription
forall a. Maybe a
Prelude.Nothing,
        $sel:provisionedReadCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings =
          Maybe AutoScalingSettingsDescription
forall a. Maybe a
Prelude.Nothing,
        $sel:indexName:ReplicaGlobalSecondaryIndexSettingsDescription' :: Text
indexName = Text
pIndexName_
      }

-- | The current status of the global secondary index:
--
-- -   @CREATING@ - The global secondary index is being created.
--
-- -   @UPDATING@ - The global secondary index is being updated.
--
-- -   @DELETING@ - The global secondary index is being deleted.
--
-- -   @ACTIVE@ - The global secondary index is ready for use.
replicaGlobalSecondaryIndexSettingsDescription_indexStatus :: Lens.Lens' ReplicaGlobalSecondaryIndexSettingsDescription (Prelude.Maybe IndexStatus)
replicaGlobalSecondaryIndexSettingsDescription_indexStatus :: (Maybe IndexStatus -> f (Maybe IndexStatus))
-> ReplicaGlobalSecondaryIndexSettingsDescription
-> f ReplicaGlobalSecondaryIndexSettingsDescription
replicaGlobalSecondaryIndexSettingsDescription_indexStatus = (ReplicaGlobalSecondaryIndexSettingsDescription
 -> Maybe IndexStatus)
-> (ReplicaGlobalSecondaryIndexSettingsDescription
    -> Maybe IndexStatus
    -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Lens
     ReplicaGlobalSecondaryIndexSettingsDescription
     ReplicaGlobalSecondaryIndexSettingsDescription
     (Maybe IndexStatus)
     (Maybe IndexStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexSettingsDescription' {Maybe IndexStatus
indexStatus :: Maybe IndexStatus
$sel:indexStatus:ReplicaGlobalSecondaryIndexSettingsDescription' :: ReplicaGlobalSecondaryIndexSettingsDescription -> Maybe IndexStatus
indexStatus} -> Maybe IndexStatus
indexStatus) (\s :: ReplicaGlobalSecondaryIndexSettingsDescription
s@ReplicaGlobalSecondaryIndexSettingsDescription' {} Maybe IndexStatus
a -> ReplicaGlobalSecondaryIndexSettingsDescription
s {$sel:indexStatus:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe IndexStatus
indexStatus = Maybe IndexStatus
a} :: ReplicaGlobalSecondaryIndexSettingsDescription)

-- | The maximum number of strongly consistent reads consumed per second
-- before DynamoDB returns a @ThrottlingException@.
replicaGlobalSecondaryIndexSettingsDescription_provisionedReadCapacityUnits :: Lens.Lens' ReplicaGlobalSecondaryIndexSettingsDescription (Prelude.Maybe Prelude.Natural)
replicaGlobalSecondaryIndexSettingsDescription_provisionedReadCapacityUnits :: (Maybe Natural -> f (Maybe Natural))
-> ReplicaGlobalSecondaryIndexSettingsDescription
-> f ReplicaGlobalSecondaryIndexSettingsDescription
replicaGlobalSecondaryIndexSettingsDescription_provisionedReadCapacityUnits = (ReplicaGlobalSecondaryIndexSettingsDescription -> Maybe Natural)
-> (ReplicaGlobalSecondaryIndexSettingsDescription
    -> Maybe Natural -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Lens
     ReplicaGlobalSecondaryIndexSettingsDescription
     ReplicaGlobalSecondaryIndexSettingsDescription
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexSettingsDescription' {Maybe Natural
provisionedReadCapacityUnits :: Maybe Natural
$sel:provisionedReadCapacityUnits:ReplicaGlobalSecondaryIndexSettingsDescription' :: ReplicaGlobalSecondaryIndexSettingsDescription -> Maybe Natural
provisionedReadCapacityUnits} -> Maybe Natural
provisionedReadCapacityUnits) (\s :: ReplicaGlobalSecondaryIndexSettingsDescription
s@ReplicaGlobalSecondaryIndexSettingsDescription' {} Maybe Natural
a -> ReplicaGlobalSecondaryIndexSettingsDescription
s {$sel:provisionedReadCapacityUnits:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe Natural
provisionedReadCapacityUnits = Maybe Natural
a} :: ReplicaGlobalSecondaryIndexSettingsDescription)

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

-- | Auto scaling settings for a global secondary index replica\'s write
-- capacity units.
replicaGlobalSecondaryIndexSettingsDescription_provisionedWriteCapacityAutoScalingSettings :: Lens.Lens' ReplicaGlobalSecondaryIndexSettingsDescription (Prelude.Maybe AutoScalingSettingsDescription)
replicaGlobalSecondaryIndexSettingsDescription_provisionedWriteCapacityAutoScalingSettings :: (Maybe AutoScalingSettingsDescription
 -> f (Maybe AutoScalingSettingsDescription))
-> ReplicaGlobalSecondaryIndexSettingsDescription
-> f ReplicaGlobalSecondaryIndexSettingsDescription
replicaGlobalSecondaryIndexSettingsDescription_provisionedWriteCapacityAutoScalingSettings = (ReplicaGlobalSecondaryIndexSettingsDescription
 -> Maybe AutoScalingSettingsDescription)
-> (ReplicaGlobalSecondaryIndexSettingsDescription
    -> Maybe AutoScalingSettingsDescription
    -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Lens
     ReplicaGlobalSecondaryIndexSettingsDescription
     ReplicaGlobalSecondaryIndexSettingsDescription
     (Maybe AutoScalingSettingsDescription)
     (Maybe AutoScalingSettingsDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexSettingsDescription' {Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
$sel:provisionedWriteCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexSettingsDescription' :: ReplicaGlobalSecondaryIndexSettingsDescription
-> Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings} -> Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings) (\s :: ReplicaGlobalSecondaryIndexSettingsDescription
s@ReplicaGlobalSecondaryIndexSettingsDescription' {} Maybe AutoScalingSettingsDescription
a -> ReplicaGlobalSecondaryIndexSettingsDescription
s {$sel:provisionedWriteCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe AutoScalingSettingsDescription
provisionedWriteCapacityAutoScalingSettings = Maybe AutoScalingSettingsDescription
a} :: ReplicaGlobalSecondaryIndexSettingsDescription)

-- | Auto scaling settings for a global secondary index replica\'s read
-- capacity units.
replicaGlobalSecondaryIndexSettingsDescription_provisionedReadCapacityAutoScalingSettings :: Lens.Lens' ReplicaGlobalSecondaryIndexSettingsDescription (Prelude.Maybe AutoScalingSettingsDescription)
replicaGlobalSecondaryIndexSettingsDescription_provisionedReadCapacityAutoScalingSettings :: (Maybe AutoScalingSettingsDescription
 -> f (Maybe AutoScalingSettingsDescription))
-> ReplicaGlobalSecondaryIndexSettingsDescription
-> f ReplicaGlobalSecondaryIndexSettingsDescription
replicaGlobalSecondaryIndexSettingsDescription_provisionedReadCapacityAutoScalingSettings = (ReplicaGlobalSecondaryIndexSettingsDescription
 -> Maybe AutoScalingSettingsDescription)
-> (ReplicaGlobalSecondaryIndexSettingsDescription
    -> Maybe AutoScalingSettingsDescription
    -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Lens
     ReplicaGlobalSecondaryIndexSettingsDescription
     ReplicaGlobalSecondaryIndexSettingsDescription
     (Maybe AutoScalingSettingsDescription)
     (Maybe AutoScalingSettingsDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexSettingsDescription' {Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
$sel:provisionedReadCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexSettingsDescription' :: ReplicaGlobalSecondaryIndexSettingsDescription
-> Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings} -> Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings) (\s :: ReplicaGlobalSecondaryIndexSettingsDescription
s@ReplicaGlobalSecondaryIndexSettingsDescription' {} Maybe AutoScalingSettingsDescription
a -> ReplicaGlobalSecondaryIndexSettingsDescription
s {$sel:provisionedReadCapacityAutoScalingSettings:ReplicaGlobalSecondaryIndexSettingsDescription' :: Maybe AutoScalingSettingsDescription
provisionedReadCapacityAutoScalingSettings = Maybe AutoScalingSettingsDescription
a} :: ReplicaGlobalSecondaryIndexSettingsDescription)

-- | The name of the global secondary index. The name must be unique among
-- all other indexes on this table.
replicaGlobalSecondaryIndexSettingsDescription_indexName :: Lens.Lens' ReplicaGlobalSecondaryIndexSettingsDescription Prelude.Text
replicaGlobalSecondaryIndexSettingsDescription_indexName :: (Text -> f Text)
-> ReplicaGlobalSecondaryIndexSettingsDescription
-> f ReplicaGlobalSecondaryIndexSettingsDescription
replicaGlobalSecondaryIndexSettingsDescription_indexName = (ReplicaGlobalSecondaryIndexSettingsDescription -> Text)
-> (ReplicaGlobalSecondaryIndexSettingsDescription
    -> Text -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Lens
     ReplicaGlobalSecondaryIndexSettingsDescription
     ReplicaGlobalSecondaryIndexSettingsDescription
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexSettingsDescription' {Text
indexName :: Text
$sel:indexName:ReplicaGlobalSecondaryIndexSettingsDescription' :: ReplicaGlobalSecondaryIndexSettingsDescription -> Text
indexName} -> Text
indexName) (\s :: ReplicaGlobalSecondaryIndexSettingsDescription
s@ReplicaGlobalSecondaryIndexSettingsDescription' {} Text
a -> ReplicaGlobalSecondaryIndexSettingsDescription
s {$sel:indexName:ReplicaGlobalSecondaryIndexSettingsDescription' :: Text
indexName = Text
a} :: ReplicaGlobalSecondaryIndexSettingsDescription)

instance
  Core.FromJSON
    ReplicaGlobalSecondaryIndexSettingsDescription
  where
  parseJSON :: Value -> Parser ReplicaGlobalSecondaryIndexSettingsDescription
parseJSON =
    String
-> (Object
    -> Parser ReplicaGlobalSecondaryIndexSettingsDescription)
-> Value
-> Parser ReplicaGlobalSecondaryIndexSettingsDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReplicaGlobalSecondaryIndexSettingsDescription"
      ( \Object
x ->
          Maybe IndexStatus
-> Maybe Natural
-> Maybe Natural
-> Maybe AutoScalingSettingsDescription
-> Maybe AutoScalingSettingsDescription
-> Text
-> ReplicaGlobalSecondaryIndexSettingsDescription
ReplicaGlobalSecondaryIndexSettingsDescription'
            (Maybe IndexStatus
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe AutoScalingSettingsDescription
 -> Maybe AutoScalingSettingsDescription
 -> Text
 -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Parser (Maybe IndexStatus)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe AutoScalingSettingsDescription
      -> Maybe AutoScalingSettingsDescription
      -> Text
      -> ReplicaGlobalSecondaryIndexSettingsDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe IndexStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IndexStatus")
              Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe AutoScalingSettingsDescription
   -> Maybe AutoScalingSettingsDescription
   -> Text
   -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe AutoScalingSettingsDescription
      -> Maybe AutoScalingSettingsDescription
      -> Text
      -> ReplicaGlobalSecondaryIndexSettingsDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProvisionedReadCapacityUnits")
              Parser
  (Maybe Natural
   -> Maybe AutoScalingSettingsDescription
   -> Maybe AutoScalingSettingsDescription
   -> Text
   -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe AutoScalingSettingsDescription
      -> Maybe AutoScalingSettingsDescription
      -> Text
      -> ReplicaGlobalSecondaryIndexSettingsDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProvisionedWriteCapacityUnits")
              Parser
  (Maybe AutoScalingSettingsDescription
   -> Maybe AutoScalingSettingsDescription
   -> Text
   -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Parser (Maybe AutoScalingSettingsDescription)
-> Parser
     (Maybe AutoScalingSettingsDescription
      -> Text -> ReplicaGlobalSecondaryIndexSettingsDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                              Object -> Text -> Parser (Maybe AutoScalingSettingsDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProvisionedWriteCapacityAutoScalingSettings"
                          )
              Parser
  (Maybe AutoScalingSettingsDescription
   -> Text -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Parser (Maybe AutoScalingSettingsDescription)
-> Parser (Text -> ReplicaGlobalSecondaryIndexSettingsDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                              Object -> Text -> Parser (Maybe AutoScalingSettingsDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProvisionedReadCapacityAutoScalingSettings"
                          )
              Parser (Text -> ReplicaGlobalSecondaryIndexSettingsDescription)
-> Parser Text
-> Parser ReplicaGlobalSecondaryIndexSettingsDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"IndexName")
      )

instance
  Prelude.Hashable
    ReplicaGlobalSecondaryIndexSettingsDescription

instance
  Prelude.NFData
    ReplicaGlobalSecondaryIndexSettingsDescription