{-# 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.ElastiCache.IncreaseReplicaCount
-- 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)
--
-- Dynamically increases the number of replicas in a Redis (cluster mode
-- disabled) replication group or the number of replica nodes in one or
-- more node groups (shards) of a Redis (cluster mode enabled) replication
-- group. This operation is performed with no cluster down time.
module Amazonka.ElastiCache.IncreaseReplicaCount
  ( -- * Creating a Request
    IncreaseReplicaCount (..),
    newIncreaseReplicaCount,

    -- * Request Lenses
    increaseReplicaCount_newReplicaCount,
    increaseReplicaCount_replicaConfiguration,
    increaseReplicaCount_replicationGroupId,
    increaseReplicaCount_applyImmediately,

    -- * Destructuring the Response
    IncreaseReplicaCountResponse (..),
    newIncreaseReplicaCountResponse,

    -- * Response Lenses
    increaseReplicaCountResponse_replicationGroup,
    increaseReplicaCountResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.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:/ 'newIncreaseReplicaCount' smart constructor.
data IncreaseReplicaCount = IncreaseReplicaCount'
  { -- | The number of read replica nodes you want at the completion of this
    -- operation. For Redis (cluster mode disabled) replication groups, this is
    -- the number of replica nodes in the replication group. For Redis (cluster
    -- mode enabled) replication groups, this is the number of replica nodes in
    -- each of the replication group\'s node groups.
    IncreaseReplicaCount -> Maybe Int
newReplicaCount' :: Prelude.Maybe Prelude.Int,
    -- | A list of @ConfigureShard@ objects that can be used to configure each
    -- shard in a Redis (cluster mode enabled) replication group. The
    -- @ConfigureShard@ has three members: @NewReplicaCount@, @NodeGroupId@,
    -- and @PreferredAvailabilityZones@.
    IncreaseReplicaCount -> Maybe [ConfigureShard]
replicaConfiguration :: Prelude.Maybe [ConfigureShard],
    -- | The id of the replication group to which you want to add replica nodes.
    IncreaseReplicaCount -> Text
replicationGroupId :: Prelude.Text,
    -- | If @True@, the number of replica nodes is increased immediately.
    -- @ApplyImmediately=False@ is not currently supported.
    IncreaseReplicaCount -> Bool
applyImmediately :: Prelude.Bool
  }
  deriving (IncreaseReplicaCount -> IncreaseReplicaCount -> Bool
(IncreaseReplicaCount -> IncreaseReplicaCount -> Bool)
-> (IncreaseReplicaCount -> IncreaseReplicaCount -> Bool)
-> Eq IncreaseReplicaCount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IncreaseReplicaCount -> IncreaseReplicaCount -> Bool
$c/= :: IncreaseReplicaCount -> IncreaseReplicaCount -> Bool
== :: IncreaseReplicaCount -> IncreaseReplicaCount -> Bool
$c== :: IncreaseReplicaCount -> IncreaseReplicaCount -> Bool
Prelude.Eq, ReadPrec [IncreaseReplicaCount]
ReadPrec IncreaseReplicaCount
Int -> ReadS IncreaseReplicaCount
ReadS [IncreaseReplicaCount]
(Int -> ReadS IncreaseReplicaCount)
-> ReadS [IncreaseReplicaCount]
-> ReadPrec IncreaseReplicaCount
-> ReadPrec [IncreaseReplicaCount]
-> Read IncreaseReplicaCount
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IncreaseReplicaCount]
$creadListPrec :: ReadPrec [IncreaseReplicaCount]
readPrec :: ReadPrec IncreaseReplicaCount
$creadPrec :: ReadPrec IncreaseReplicaCount
readList :: ReadS [IncreaseReplicaCount]
$creadList :: ReadS [IncreaseReplicaCount]
readsPrec :: Int -> ReadS IncreaseReplicaCount
$creadsPrec :: Int -> ReadS IncreaseReplicaCount
Prelude.Read, Int -> IncreaseReplicaCount -> ShowS
[IncreaseReplicaCount] -> ShowS
IncreaseReplicaCount -> String
(Int -> IncreaseReplicaCount -> ShowS)
-> (IncreaseReplicaCount -> String)
-> ([IncreaseReplicaCount] -> ShowS)
-> Show IncreaseReplicaCount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IncreaseReplicaCount] -> ShowS
$cshowList :: [IncreaseReplicaCount] -> ShowS
show :: IncreaseReplicaCount -> String
$cshow :: IncreaseReplicaCount -> String
showsPrec :: Int -> IncreaseReplicaCount -> ShowS
$cshowsPrec :: Int -> IncreaseReplicaCount -> ShowS
Prelude.Show, (forall x. IncreaseReplicaCount -> Rep IncreaseReplicaCount x)
-> (forall x. Rep IncreaseReplicaCount x -> IncreaseReplicaCount)
-> Generic IncreaseReplicaCount
forall x. Rep IncreaseReplicaCount x -> IncreaseReplicaCount
forall x. IncreaseReplicaCount -> Rep IncreaseReplicaCount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IncreaseReplicaCount x -> IncreaseReplicaCount
$cfrom :: forall x. IncreaseReplicaCount -> Rep IncreaseReplicaCount x
Prelude.Generic)

-- |
-- Create a value of 'IncreaseReplicaCount' 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:
--
-- 'newReplicaCount'', 'increaseReplicaCount_newReplicaCount' - The number of read replica nodes you want at the completion of this
-- operation. For Redis (cluster mode disabled) replication groups, this is
-- the number of replica nodes in the replication group. For Redis (cluster
-- mode enabled) replication groups, this is the number of replica nodes in
-- each of the replication group\'s node groups.
--
-- 'replicaConfiguration', 'increaseReplicaCount_replicaConfiguration' - A list of @ConfigureShard@ objects that can be used to configure each
-- shard in a Redis (cluster mode enabled) replication group. The
-- @ConfigureShard@ has three members: @NewReplicaCount@, @NodeGroupId@,
-- and @PreferredAvailabilityZones@.
--
-- 'replicationGroupId', 'increaseReplicaCount_replicationGroupId' - The id of the replication group to which you want to add replica nodes.
--
-- 'applyImmediately', 'increaseReplicaCount_applyImmediately' - If @True@, the number of replica nodes is increased immediately.
-- @ApplyImmediately=False@ is not currently supported.
newIncreaseReplicaCount ::
  -- | 'replicationGroupId'
  Prelude.Text ->
  -- | 'applyImmediately'
  Prelude.Bool ->
  IncreaseReplicaCount
newIncreaseReplicaCount :: Text -> Bool -> IncreaseReplicaCount
newIncreaseReplicaCount
  Text
pReplicationGroupId_
  Bool
pApplyImmediately_ =
    IncreaseReplicaCount' :: Maybe Int
-> Maybe [ConfigureShard] -> Text -> Bool -> IncreaseReplicaCount
IncreaseReplicaCount'
      { $sel:newReplicaCount':IncreaseReplicaCount' :: Maybe Int
newReplicaCount' =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:replicaConfiguration:IncreaseReplicaCount' :: Maybe [ConfigureShard]
replicaConfiguration = Maybe [ConfigureShard]
forall a. Maybe a
Prelude.Nothing,
        $sel:replicationGroupId:IncreaseReplicaCount' :: Text
replicationGroupId = Text
pReplicationGroupId_,
        $sel:applyImmediately:IncreaseReplicaCount' :: Bool
applyImmediately = Bool
pApplyImmediately_
      }

-- | The number of read replica nodes you want at the completion of this
-- operation. For Redis (cluster mode disabled) replication groups, this is
-- the number of replica nodes in the replication group. For Redis (cluster
-- mode enabled) replication groups, this is the number of replica nodes in
-- each of the replication group\'s node groups.
increaseReplicaCount_newReplicaCount :: Lens.Lens' IncreaseReplicaCount (Prelude.Maybe Prelude.Int)
increaseReplicaCount_newReplicaCount :: (Maybe Int -> f (Maybe Int))
-> IncreaseReplicaCount -> f IncreaseReplicaCount
increaseReplicaCount_newReplicaCount = (IncreaseReplicaCount -> Maybe Int)
-> (IncreaseReplicaCount -> Maybe Int -> IncreaseReplicaCount)
-> Lens
     IncreaseReplicaCount IncreaseReplicaCount (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseReplicaCount' {Maybe Int
newReplicaCount' :: Maybe Int
$sel:newReplicaCount':IncreaseReplicaCount' :: IncreaseReplicaCount -> Maybe Int
newReplicaCount'} -> Maybe Int
newReplicaCount') (\s :: IncreaseReplicaCount
s@IncreaseReplicaCount' {} Maybe Int
a -> IncreaseReplicaCount
s {$sel:newReplicaCount':IncreaseReplicaCount' :: Maybe Int
newReplicaCount' = Maybe Int
a} :: IncreaseReplicaCount)

-- | A list of @ConfigureShard@ objects that can be used to configure each
-- shard in a Redis (cluster mode enabled) replication group. The
-- @ConfigureShard@ has three members: @NewReplicaCount@, @NodeGroupId@,
-- and @PreferredAvailabilityZones@.
increaseReplicaCount_replicaConfiguration :: Lens.Lens' IncreaseReplicaCount (Prelude.Maybe [ConfigureShard])
increaseReplicaCount_replicaConfiguration :: (Maybe [ConfigureShard] -> f (Maybe [ConfigureShard]))
-> IncreaseReplicaCount -> f IncreaseReplicaCount
increaseReplicaCount_replicaConfiguration = (IncreaseReplicaCount -> Maybe [ConfigureShard])
-> (IncreaseReplicaCount
    -> Maybe [ConfigureShard] -> IncreaseReplicaCount)
-> Lens
     IncreaseReplicaCount
     IncreaseReplicaCount
     (Maybe [ConfigureShard])
     (Maybe [ConfigureShard])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseReplicaCount' {Maybe [ConfigureShard]
replicaConfiguration :: Maybe [ConfigureShard]
$sel:replicaConfiguration:IncreaseReplicaCount' :: IncreaseReplicaCount -> Maybe [ConfigureShard]
replicaConfiguration} -> Maybe [ConfigureShard]
replicaConfiguration) (\s :: IncreaseReplicaCount
s@IncreaseReplicaCount' {} Maybe [ConfigureShard]
a -> IncreaseReplicaCount
s {$sel:replicaConfiguration:IncreaseReplicaCount' :: Maybe [ConfigureShard]
replicaConfiguration = Maybe [ConfigureShard]
a} :: IncreaseReplicaCount) ((Maybe [ConfigureShard] -> f (Maybe [ConfigureShard]))
 -> IncreaseReplicaCount -> f IncreaseReplicaCount)
-> ((Maybe [ConfigureShard] -> f (Maybe [ConfigureShard]))
    -> Maybe [ConfigureShard] -> f (Maybe [ConfigureShard]))
-> (Maybe [ConfigureShard] -> f (Maybe [ConfigureShard]))
-> IncreaseReplicaCount
-> f IncreaseReplicaCount
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConfigureShard] [ConfigureShard] [ConfigureShard] [ConfigureShard]
-> Iso
     (Maybe [ConfigureShard])
     (Maybe [ConfigureShard])
     (Maybe [ConfigureShard])
     (Maybe [ConfigureShard])
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
  [ConfigureShard] [ConfigureShard] [ConfigureShard] [ConfigureShard]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The id of the replication group to which you want to add replica nodes.
increaseReplicaCount_replicationGroupId :: Lens.Lens' IncreaseReplicaCount Prelude.Text
increaseReplicaCount_replicationGroupId :: (Text -> f Text) -> IncreaseReplicaCount -> f IncreaseReplicaCount
increaseReplicaCount_replicationGroupId = (IncreaseReplicaCount -> Text)
-> (IncreaseReplicaCount -> Text -> IncreaseReplicaCount)
-> Lens IncreaseReplicaCount IncreaseReplicaCount Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseReplicaCount' {Text
replicationGroupId :: Text
$sel:replicationGroupId:IncreaseReplicaCount' :: IncreaseReplicaCount -> Text
replicationGroupId} -> Text
replicationGroupId) (\s :: IncreaseReplicaCount
s@IncreaseReplicaCount' {} Text
a -> IncreaseReplicaCount
s {$sel:replicationGroupId:IncreaseReplicaCount' :: Text
replicationGroupId = Text
a} :: IncreaseReplicaCount)

-- | If @True@, the number of replica nodes is increased immediately.
-- @ApplyImmediately=False@ is not currently supported.
increaseReplicaCount_applyImmediately :: Lens.Lens' IncreaseReplicaCount Prelude.Bool
increaseReplicaCount_applyImmediately :: (Bool -> f Bool) -> IncreaseReplicaCount -> f IncreaseReplicaCount
increaseReplicaCount_applyImmediately = (IncreaseReplicaCount -> Bool)
-> (IncreaseReplicaCount -> Bool -> IncreaseReplicaCount)
-> Lens IncreaseReplicaCount IncreaseReplicaCount Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseReplicaCount' {Bool
applyImmediately :: Bool
$sel:applyImmediately:IncreaseReplicaCount' :: IncreaseReplicaCount -> Bool
applyImmediately} -> Bool
applyImmediately) (\s :: IncreaseReplicaCount
s@IncreaseReplicaCount' {} Bool
a -> IncreaseReplicaCount
s {$sel:applyImmediately:IncreaseReplicaCount' :: Bool
applyImmediately = Bool
a} :: IncreaseReplicaCount)

instance Core.AWSRequest IncreaseReplicaCount where
  type
    AWSResponse IncreaseReplicaCount =
      IncreaseReplicaCountResponse
  request :: IncreaseReplicaCount -> Request IncreaseReplicaCount
request = Service -> IncreaseReplicaCount -> Request IncreaseReplicaCount
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy IncreaseReplicaCount
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse IncreaseReplicaCount)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse IncreaseReplicaCount))
-> Logger
-> Service
-> Proxy IncreaseReplicaCount
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse IncreaseReplicaCount)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"IncreaseReplicaCountResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ReplicationGroup -> Int -> IncreaseReplicaCountResponse
IncreaseReplicaCountResponse'
            (Maybe ReplicationGroup -> Int -> IncreaseReplicaCountResponse)
-> Either String (Maybe ReplicationGroup)
-> Either String (Int -> IncreaseReplicaCountResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ReplicationGroup)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReplicationGroup")
            Either String (Int -> IncreaseReplicaCountResponse)
-> Either String Int -> Either String IncreaseReplicaCountResponse
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 IncreaseReplicaCount

instance Prelude.NFData IncreaseReplicaCount

instance Core.ToHeaders IncreaseReplicaCount where
  toHeaders :: IncreaseReplicaCount -> ResponseHeaders
toHeaders = ResponseHeaders -> IncreaseReplicaCount -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery IncreaseReplicaCount where
  toQuery :: IncreaseReplicaCount -> QueryString
toQuery IncreaseReplicaCount' {Bool
Maybe Int
Maybe [ConfigureShard]
Text
applyImmediately :: Bool
replicationGroupId :: Text
replicaConfiguration :: Maybe [ConfigureShard]
newReplicaCount' :: Maybe Int
$sel:applyImmediately:IncreaseReplicaCount' :: IncreaseReplicaCount -> Bool
$sel:replicationGroupId:IncreaseReplicaCount' :: IncreaseReplicaCount -> Text
$sel:replicaConfiguration:IncreaseReplicaCount' :: IncreaseReplicaCount -> Maybe [ConfigureShard]
$sel:newReplicaCount':IncreaseReplicaCount' :: IncreaseReplicaCount -> Maybe Int
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"IncreaseReplicaCount" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"NewReplicaCount" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
newReplicaCount',
        ByteString
"ReplicaConfiguration"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [ConfigureShard] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"ConfigureShard"
                ([ConfigureShard] -> QueryString)
-> Maybe [ConfigureShard] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfigureShard]
replicaConfiguration
            ),
        ByteString
"ReplicationGroupId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
replicationGroupId,
        ByteString
"ApplyImmediately" ByteString -> Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Bool
applyImmediately
      ]

-- | /See:/ 'newIncreaseReplicaCountResponse' smart constructor.
data IncreaseReplicaCountResponse = IncreaseReplicaCountResponse'
  { IncreaseReplicaCountResponse -> Maybe ReplicationGroup
replicationGroup :: Prelude.Maybe ReplicationGroup,
    -- | The response's http status code.
    IncreaseReplicaCountResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (IncreaseReplicaCountResponse
-> IncreaseReplicaCountResponse -> Bool
(IncreaseReplicaCountResponse
 -> IncreaseReplicaCountResponse -> Bool)
-> (IncreaseReplicaCountResponse
    -> IncreaseReplicaCountResponse -> Bool)
-> Eq IncreaseReplicaCountResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IncreaseReplicaCountResponse
-> IncreaseReplicaCountResponse -> Bool
$c/= :: IncreaseReplicaCountResponse
-> IncreaseReplicaCountResponse -> Bool
== :: IncreaseReplicaCountResponse
-> IncreaseReplicaCountResponse -> Bool
$c== :: IncreaseReplicaCountResponse
-> IncreaseReplicaCountResponse -> Bool
Prelude.Eq, ReadPrec [IncreaseReplicaCountResponse]
ReadPrec IncreaseReplicaCountResponse
Int -> ReadS IncreaseReplicaCountResponse
ReadS [IncreaseReplicaCountResponse]
(Int -> ReadS IncreaseReplicaCountResponse)
-> ReadS [IncreaseReplicaCountResponse]
-> ReadPrec IncreaseReplicaCountResponse
-> ReadPrec [IncreaseReplicaCountResponse]
-> Read IncreaseReplicaCountResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IncreaseReplicaCountResponse]
$creadListPrec :: ReadPrec [IncreaseReplicaCountResponse]
readPrec :: ReadPrec IncreaseReplicaCountResponse
$creadPrec :: ReadPrec IncreaseReplicaCountResponse
readList :: ReadS [IncreaseReplicaCountResponse]
$creadList :: ReadS [IncreaseReplicaCountResponse]
readsPrec :: Int -> ReadS IncreaseReplicaCountResponse
$creadsPrec :: Int -> ReadS IncreaseReplicaCountResponse
Prelude.Read, Int -> IncreaseReplicaCountResponse -> ShowS
[IncreaseReplicaCountResponse] -> ShowS
IncreaseReplicaCountResponse -> String
(Int -> IncreaseReplicaCountResponse -> ShowS)
-> (IncreaseReplicaCountResponse -> String)
-> ([IncreaseReplicaCountResponse] -> ShowS)
-> Show IncreaseReplicaCountResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IncreaseReplicaCountResponse] -> ShowS
$cshowList :: [IncreaseReplicaCountResponse] -> ShowS
show :: IncreaseReplicaCountResponse -> String
$cshow :: IncreaseReplicaCountResponse -> String
showsPrec :: Int -> IncreaseReplicaCountResponse -> ShowS
$cshowsPrec :: Int -> IncreaseReplicaCountResponse -> ShowS
Prelude.Show, (forall x.
 IncreaseReplicaCountResponse -> Rep IncreaseReplicaCountResponse x)
-> (forall x.
    Rep IncreaseReplicaCountResponse x -> IncreaseReplicaCountResponse)
-> Generic IncreaseReplicaCountResponse
forall x.
Rep IncreaseReplicaCountResponse x -> IncreaseReplicaCountResponse
forall x.
IncreaseReplicaCountResponse -> Rep IncreaseReplicaCountResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IncreaseReplicaCountResponse x -> IncreaseReplicaCountResponse
$cfrom :: forall x.
IncreaseReplicaCountResponse -> Rep IncreaseReplicaCountResponse x
Prelude.Generic)

-- |
-- Create a value of 'IncreaseReplicaCountResponse' 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:
--
-- 'replicationGroup', 'increaseReplicaCountResponse_replicationGroup' - Undocumented member.
--
-- 'httpStatus', 'increaseReplicaCountResponse_httpStatus' - The response's http status code.
newIncreaseReplicaCountResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  IncreaseReplicaCountResponse
newIncreaseReplicaCountResponse :: Int -> IncreaseReplicaCountResponse
newIncreaseReplicaCountResponse Int
pHttpStatus_ =
  IncreaseReplicaCountResponse' :: Maybe ReplicationGroup -> Int -> IncreaseReplicaCountResponse
IncreaseReplicaCountResponse'
    { $sel:replicationGroup:IncreaseReplicaCountResponse' :: Maybe ReplicationGroup
replicationGroup =
        Maybe ReplicationGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:IncreaseReplicaCountResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
increaseReplicaCountResponse_replicationGroup :: Lens.Lens' IncreaseReplicaCountResponse (Prelude.Maybe ReplicationGroup)
increaseReplicaCountResponse_replicationGroup :: (Maybe ReplicationGroup -> f (Maybe ReplicationGroup))
-> IncreaseReplicaCountResponse -> f IncreaseReplicaCountResponse
increaseReplicaCountResponse_replicationGroup = (IncreaseReplicaCountResponse -> Maybe ReplicationGroup)
-> (IncreaseReplicaCountResponse
    -> Maybe ReplicationGroup -> IncreaseReplicaCountResponse)
-> Lens
     IncreaseReplicaCountResponse
     IncreaseReplicaCountResponse
     (Maybe ReplicationGroup)
     (Maybe ReplicationGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseReplicaCountResponse' {Maybe ReplicationGroup
replicationGroup :: Maybe ReplicationGroup
$sel:replicationGroup:IncreaseReplicaCountResponse' :: IncreaseReplicaCountResponse -> Maybe ReplicationGroup
replicationGroup} -> Maybe ReplicationGroup
replicationGroup) (\s :: IncreaseReplicaCountResponse
s@IncreaseReplicaCountResponse' {} Maybe ReplicationGroup
a -> IncreaseReplicaCountResponse
s {$sel:replicationGroup:IncreaseReplicaCountResponse' :: Maybe ReplicationGroup
replicationGroup = Maybe ReplicationGroup
a} :: IncreaseReplicaCountResponse)

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

instance Prelude.NFData IncreaseReplicaCountResponse