{-# 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.ReplicaAutoScalingDescription
-- 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.ReplicaAutoScalingDescription where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.AutoScalingSettingsDescription
import Amazonka.DynamoDB.Types.ReplicaGlobalSecondaryIndexAutoScalingDescription
import Amazonka.DynamoDB.Types.ReplicaStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the auto scaling settings of the replica.
--
-- /See:/ 'newReplicaAutoScalingDescription' smart constructor.
data ReplicaAutoScalingDescription = ReplicaAutoScalingDescription'
  { -- | The current state of the replica:
    --
    -- -   @CREATING@ - The replica is being created.
    --
    -- -   @UPDATING@ - The replica is being updated.
    --
    -- -   @DELETING@ - The replica is being deleted.
    --
    -- -   @ACTIVE@ - The replica is ready for use.
    ReplicaAutoScalingDescription -> Maybe ReplicaStatus
replicaStatus :: Prelude.Maybe ReplicaStatus,
    -- | The Region where the replica exists.
    ReplicaAutoScalingDescription -> Maybe Text
regionName :: Prelude.Maybe Prelude.Text,
    -- | Replica-specific global secondary index auto scaling settings.
    ReplicaAutoScalingDescription
-> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
globalSecondaryIndexes :: Prelude.Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription],
    ReplicaAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
replicaProvisionedWriteCapacityAutoScalingSettings :: Prelude.Maybe AutoScalingSettingsDescription,
    ReplicaAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
replicaProvisionedReadCapacityAutoScalingSettings :: Prelude.Maybe AutoScalingSettingsDescription
  }
  deriving (ReplicaAutoScalingDescription
-> ReplicaAutoScalingDescription -> Bool
(ReplicaAutoScalingDescription
 -> ReplicaAutoScalingDescription -> Bool)
-> (ReplicaAutoScalingDescription
    -> ReplicaAutoScalingDescription -> Bool)
-> Eq ReplicaAutoScalingDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicaAutoScalingDescription
-> ReplicaAutoScalingDescription -> Bool
$c/= :: ReplicaAutoScalingDescription
-> ReplicaAutoScalingDescription -> Bool
== :: ReplicaAutoScalingDescription
-> ReplicaAutoScalingDescription -> Bool
$c== :: ReplicaAutoScalingDescription
-> ReplicaAutoScalingDescription -> Bool
Prelude.Eq, ReadPrec [ReplicaAutoScalingDescription]
ReadPrec ReplicaAutoScalingDescription
Int -> ReadS ReplicaAutoScalingDescription
ReadS [ReplicaAutoScalingDescription]
(Int -> ReadS ReplicaAutoScalingDescription)
-> ReadS [ReplicaAutoScalingDescription]
-> ReadPrec ReplicaAutoScalingDescription
-> ReadPrec [ReplicaAutoScalingDescription]
-> Read ReplicaAutoScalingDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicaAutoScalingDescription]
$creadListPrec :: ReadPrec [ReplicaAutoScalingDescription]
readPrec :: ReadPrec ReplicaAutoScalingDescription
$creadPrec :: ReadPrec ReplicaAutoScalingDescription
readList :: ReadS [ReplicaAutoScalingDescription]
$creadList :: ReadS [ReplicaAutoScalingDescription]
readsPrec :: Int -> ReadS ReplicaAutoScalingDescription
$creadsPrec :: Int -> ReadS ReplicaAutoScalingDescription
Prelude.Read, Int -> ReplicaAutoScalingDescription -> ShowS
[ReplicaAutoScalingDescription] -> ShowS
ReplicaAutoScalingDescription -> String
(Int -> ReplicaAutoScalingDescription -> ShowS)
-> (ReplicaAutoScalingDescription -> String)
-> ([ReplicaAutoScalingDescription] -> ShowS)
-> Show ReplicaAutoScalingDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicaAutoScalingDescription] -> ShowS
$cshowList :: [ReplicaAutoScalingDescription] -> ShowS
show :: ReplicaAutoScalingDescription -> String
$cshow :: ReplicaAutoScalingDescription -> String
showsPrec :: Int -> ReplicaAutoScalingDescription -> ShowS
$cshowsPrec :: Int -> ReplicaAutoScalingDescription -> ShowS
Prelude.Show, (forall x.
 ReplicaAutoScalingDescription
 -> Rep ReplicaAutoScalingDescription x)
-> (forall x.
    Rep ReplicaAutoScalingDescription x
    -> ReplicaAutoScalingDescription)
-> Generic ReplicaAutoScalingDescription
forall x.
Rep ReplicaAutoScalingDescription x
-> ReplicaAutoScalingDescription
forall x.
ReplicaAutoScalingDescription
-> Rep ReplicaAutoScalingDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicaAutoScalingDescription x
-> ReplicaAutoScalingDescription
$cfrom :: forall x.
ReplicaAutoScalingDescription
-> Rep ReplicaAutoScalingDescription x
Prelude.Generic)

-- |
-- Create a value of 'ReplicaAutoScalingDescription' 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:
--
-- 'replicaStatus', 'replicaAutoScalingDescription_replicaStatus' - The current state of the replica:
--
-- -   @CREATING@ - The replica is being created.
--
-- -   @UPDATING@ - The replica is being updated.
--
-- -   @DELETING@ - The replica is being deleted.
--
-- -   @ACTIVE@ - The replica is ready for use.
--
-- 'regionName', 'replicaAutoScalingDescription_regionName' - The Region where the replica exists.
--
-- 'globalSecondaryIndexes', 'replicaAutoScalingDescription_globalSecondaryIndexes' - Replica-specific global secondary index auto scaling settings.
--
-- 'replicaProvisionedWriteCapacityAutoScalingSettings', 'replicaAutoScalingDescription_replicaProvisionedWriteCapacityAutoScalingSettings' - Undocumented member.
--
-- 'replicaProvisionedReadCapacityAutoScalingSettings', 'replicaAutoScalingDescription_replicaProvisionedReadCapacityAutoScalingSettings' - Undocumented member.
newReplicaAutoScalingDescription ::
  ReplicaAutoScalingDescription
newReplicaAutoScalingDescription :: ReplicaAutoScalingDescription
newReplicaAutoScalingDescription =
  ReplicaAutoScalingDescription' :: Maybe ReplicaStatus
-> Maybe Text
-> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
-> Maybe AutoScalingSettingsDescription
-> Maybe AutoScalingSettingsDescription
-> ReplicaAutoScalingDescription
ReplicaAutoScalingDescription'
    { $sel:replicaStatus:ReplicaAutoScalingDescription' :: Maybe ReplicaStatus
replicaStatus =
        Maybe ReplicaStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:regionName:ReplicaAutoScalingDescription' :: Maybe Text
regionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:globalSecondaryIndexes:ReplicaAutoScalingDescription' :: Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
globalSecondaryIndexes = Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:replicaProvisionedWriteCapacityAutoScalingSettings:ReplicaAutoScalingDescription' :: Maybe AutoScalingSettingsDescription
replicaProvisionedWriteCapacityAutoScalingSettings =
        Maybe AutoScalingSettingsDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:replicaProvisionedReadCapacityAutoScalingSettings:ReplicaAutoScalingDescription' :: Maybe AutoScalingSettingsDescription
replicaProvisionedReadCapacityAutoScalingSettings =
        Maybe AutoScalingSettingsDescription
forall a. Maybe a
Prelude.Nothing
    }

-- | The current state of the replica:
--
-- -   @CREATING@ - The replica is being created.
--
-- -   @UPDATING@ - The replica is being updated.
--
-- -   @DELETING@ - The replica is being deleted.
--
-- -   @ACTIVE@ - The replica is ready for use.
replicaAutoScalingDescription_replicaStatus :: Lens.Lens' ReplicaAutoScalingDescription (Prelude.Maybe ReplicaStatus)
replicaAutoScalingDescription_replicaStatus :: (Maybe ReplicaStatus -> f (Maybe ReplicaStatus))
-> ReplicaAutoScalingDescription -> f ReplicaAutoScalingDescription
replicaAutoScalingDescription_replicaStatus = (ReplicaAutoScalingDescription -> Maybe ReplicaStatus)
-> (ReplicaAutoScalingDescription
    -> Maybe ReplicaStatus -> ReplicaAutoScalingDescription)
-> Lens
     ReplicaAutoScalingDescription
     ReplicaAutoScalingDescription
     (Maybe ReplicaStatus)
     (Maybe ReplicaStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaAutoScalingDescription' {Maybe ReplicaStatus
replicaStatus :: Maybe ReplicaStatus
$sel:replicaStatus:ReplicaAutoScalingDescription' :: ReplicaAutoScalingDescription -> Maybe ReplicaStatus
replicaStatus} -> Maybe ReplicaStatus
replicaStatus) (\s :: ReplicaAutoScalingDescription
s@ReplicaAutoScalingDescription' {} Maybe ReplicaStatus
a -> ReplicaAutoScalingDescription
s {$sel:replicaStatus:ReplicaAutoScalingDescription' :: Maybe ReplicaStatus
replicaStatus = Maybe ReplicaStatus
a} :: ReplicaAutoScalingDescription)

-- | The Region where the replica exists.
replicaAutoScalingDescription_regionName :: Lens.Lens' ReplicaAutoScalingDescription (Prelude.Maybe Prelude.Text)
replicaAutoScalingDescription_regionName :: (Maybe Text -> f (Maybe Text))
-> ReplicaAutoScalingDescription -> f ReplicaAutoScalingDescription
replicaAutoScalingDescription_regionName = (ReplicaAutoScalingDescription -> Maybe Text)
-> (ReplicaAutoScalingDescription
    -> Maybe Text -> ReplicaAutoScalingDescription)
-> Lens
     ReplicaAutoScalingDescription
     ReplicaAutoScalingDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaAutoScalingDescription' {Maybe Text
regionName :: Maybe Text
$sel:regionName:ReplicaAutoScalingDescription' :: ReplicaAutoScalingDescription -> Maybe Text
regionName} -> Maybe Text
regionName) (\s :: ReplicaAutoScalingDescription
s@ReplicaAutoScalingDescription' {} Maybe Text
a -> ReplicaAutoScalingDescription
s {$sel:regionName:ReplicaAutoScalingDescription' :: Maybe Text
regionName = Maybe Text
a} :: ReplicaAutoScalingDescription)

-- | Replica-specific global secondary index auto scaling settings.
replicaAutoScalingDescription_globalSecondaryIndexes :: Lens.Lens' ReplicaAutoScalingDescription (Prelude.Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
replicaAutoScalingDescription_globalSecondaryIndexes :: (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
 -> f (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]))
-> ReplicaAutoScalingDescription -> f ReplicaAutoScalingDescription
replicaAutoScalingDescription_globalSecondaryIndexes = (ReplicaAutoScalingDescription
 -> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
-> (ReplicaAutoScalingDescription
    -> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
    -> ReplicaAutoScalingDescription)
-> Lens
     ReplicaAutoScalingDescription
     ReplicaAutoScalingDescription
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaAutoScalingDescription' {Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
globalSecondaryIndexes :: Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
$sel:globalSecondaryIndexes:ReplicaAutoScalingDescription' :: ReplicaAutoScalingDescription
-> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
globalSecondaryIndexes} -> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
globalSecondaryIndexes) (\s :: ReplicaAutoScalingDescription
s@ReplicaAutoScalingDescription' {} Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
a -> ReplicaAutoScalingDescription
s {$sel:globalSecondaryIndexes:ReplicaAutoScalingDescription' :: Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
globalSecondaryIndexes = Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
a} :: ReplicaAutoScalingDescription) ((Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
  -> f (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]))
 -> ReplicaAutoScalingDescription
 -> f ReplicaAutoScalingDescription)
-> ((Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
     -> f (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]))
    -> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
    -> f (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]))
-> (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
    -> f (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]))
-> ReplicaAutoScalingDescription
-> f ReplicaAutoScalingDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReplicaGlobalSecondaryIndexAutoScalingDescription]
  [ReplicaGlobalSecondaryIndexAutoScalingDescription]
  [ReplicaGlobalSecondaryIndexAutoScalingDescription]
  [ReplicaGlobalSecondaryIndexAutoScalingDescription]
-> Iso
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
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
  [ReplicaGlobalSecondaryIndexAutoScalingDescription]
  [ReplicaGlobalSecondaryIndexAutoScalingDescription]
  [ReplicaGlobalSecondaryIndexAutoScalingDescription]
  [ReplicaGlobalSecondaryIndexAutoScalingDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
replicaAutoScalingDescription_replicaProvisionedWriteCapacityAutoScalingSettings :: Lens.Lens' ReplicaAutoScalingDescription (Prelude.Maybe AutoScalingSettingsDescription)
replicaAutoScalingDescription_replicaProvisionedWriteCapacityAutoScalingSettings :: (Maybe AutoScalingSettingsDescription
 -> f (Maybe AutoScalingSettingsDescription))
-> ReplicaAutoScalingDescription -> f ReplicaAutoScalingDescription
replicaAutoScalingDescription_replicaProvisionedWriteCapacityAutoScalingSettings = (ReplicaAutoScalingDescription
 -> Maybe AutoScalingSettingsDescription)
-> (ReplicaAutoScalingDescription
    -> Maybe AutoScalingSettingsDescription
    -> ReplicaAutoScalingDescription)
-> Lens
     ReplicaAutoScalingDescription
     ReplicaAutoScalingDescription
     (Maybe AutoScalingSettingsDescription)
     (Maybe AutoScalingSettingsDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaAutoScalingDescription' {Maybe AutoScalingSettingsDescription
replicaProvisionedWriteCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
$sel:replicaProvisionedWriteCapacityAutoScalingSettings:ReplicaAutoScalingDescription' :: ReplicaAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
replicaProvisionedWriteCapacityAutoScalingSettings} -> Maybe AutoScalingSettingsDescription
replicaProvisionedWriteCapacityAutoScalingSettings) (\s :: ReplicaAutoScalingDescription
s@ReplicaAutoScalingDescription' {} Maybe AutoScalingSettingsDescription
a -> ReplicaAutoScalingDescription
s {$sel:replicaProvisionedWriteCapacityAutoScalingSettings:ReplicaAutoScalingDescription' :: Maybe AutoScalingSettingsDescription
replicaProvisionedWriteCapacityAutoScalingSettings = Maybe AutoScalingSettingsDescription
a} :: ReplicaAutoScalingDescription)

-- | Undocumented member.
replicaAutoScalingDescription_replicaProvisionedReadCapacityAutoScalingSettings :: Lens.Lens' ReplicaAutoScalingDescription (Prelude.Maybe AutoScalingSettingsDescription)
replicaAutoScalingDescription_replicaProvisionedReadCapacityAutoScalingSettings :: (Maybe AutoScalingSettingsDescription
 -> f (Maybe AutoScalingSettingsDescription))
-> ReplicaAutoScalingDescription -> f ReplicaAutoScalingDescription
replicaAutoScalingDescription_replicaProvisionedReadCapacityAutoScalingSettings = (ReplicaAutoScalingDescription
 -> Maybe AutoScalingSettingsDescription)
-> (ReplicaAutoScalingDescription
    -> Maybe AutoScalingSettingsDescription
    -> ReplicaAutoScalingDescription)
-> Lens
     ReplicaAutoScalingDescription
     ReplicaAutoScalingDescription
     (Maybe AutoScalingSettingsDescription)
     (Maybe AutoScalingSettingsDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaAutoScalingDescription' {Maybe AutoScalingSettingsDescription
replicaProvisionedReadCapacityAutoScalingSettings :: Maybe AutoScalingSettingsDescription
$sel:replicaProvisionedReadCapacityAutoScalingSettings:ReplicaAutoScalingDescription' :: ReplicaAutoScalingDescription
-> Maybe AutoScalingSettingsDescription
replicaProvisionedReadCapacityAutoScalingSettings} -> Maybe AutoScalingSettingsDescription
replicaProvisionedReadCapacityAutoScalingSettings) (\s :: ReplicaAutoScalingDescription
s@ReplicaAutoScalingDescription' {} Maybe AutoScalingSettingsDescription
a -> ReplicaAutoScalingDescription
s {$sel:replicaProvisionedReadCapacityAutoScalingSettings:ReplicaAutoScalingDescription' :: Maybe AutoScalingSettingsDescription
replicaProvisionedReadCapacityAutoScalingSettings = Maybe AutoScalingSettingsDescription
a} :: ReplicaAutoScalingDescription)

instance Core.FromJSON ReplicaAutoScalingDescription where
  parseJSON :: Value -> Parser ReplicaAutoScalingDescription
parseJSON =
    String
-> (Object -> Parser ReplicaAutoScalingDescription)
-> Value
-> Parser ReplicaAutoScalingDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReplicaAutoScalingDescription"
      ( \Object
x ->
          Maybe ReplicaStatus
-> Maybe Text
-> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
-> Maybe AutoScalingSettingsDescription
-> Maybe AutoScalingSettingsDescription
-> ReplicaAutoScalingDescription
ReplicaAutoScalingDescription'
            (Maybe ReplicaStatus
 -> Maybe Text
 -> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
 -> Maybe AutoScalingSettingsDescription
 -> Maybe AutoScalingSettingsDescription
 -> ReplicaAutoScalingDescription)
-> Parser (Maybe ReplicaStatus)
-> Parser
     (Maybe Text
      -> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
      -> Maybe AutoScalingSettingsDescription
      -> Maybe AutoScalingSettingsDescription
      -> ReplicaAutoScalingDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReplicaStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReplicaStatus")
            Parser
  (Maybe Text
   -> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
   -> Maybe AutoScalingSettingsDescription
   -> Maybe AutoScalingSettingsDescription
   -> ReplicaAutoScalingDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
      -> Maybe AutoScalingSettingsDescription
      -> Maybe AutoScalingSettingsDescription
      -> ReplicaAutoScalingDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RegionName")
            Parser
  (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
   -> Maybe AutoScalingSettingsDescription
   -> Maybe AutoScalingSettingsDescription
   -> ReplicaAutoScalingDescription)
-> Parser
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
-> Parser
     (Maybe AutoScalingSettingsDescription
      -> Maybe AutoScalingSettingsDescription
      -> ReplicaAutoScalingDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser
     (Maybe (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GlobalSecondaryIndexes"
                            Parser
  (Maybe (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]))
-> Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
-> Parser
     (Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ReplicaGlobalSecondaryIndexAutoScalingDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe AutoScalingSettingsDescription
   -> Maybe AutoScalingSettingsDescription
   -> ReplicaAutoScalingDescription)
-> Parser (Maybe AutoScalingSettingsDescription)
-> Parser
     (Maybe AutoScalingSettingsDescription
      -> ReplicaAutoScalingDescription)
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
"ReplicaProvisionedWriteCapacityAutoScalingSettings"
                        )
            Parser
  (Maybe AutoScalingSettingsDescription
   -> ReplicaAutoScalingDescription)
-> Parser (Maybe AutoScalingSettingsDescription)
-> Parser ReplicaAutoScalingDescription
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
"ReplicaProvisionedReadCapacityAutoScalingSettings"
                        )
      )

instance
  Prelude.Hashable
    ReplicaAutoScalingDescription

instance Prelude.NFData ReplicaAutoScalingDescription