{-# 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.IncreaseNodeGroupsInGlobalReplicationGroup
-- 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)
--
-- Increase the number of node groups in the Global datastore
module Amazonka.ElastiCache.IncreaseNodeGroupsInGlobalReplicationGroup
  ( -- * Creating a Request
    IncreaseNodeGroupsInGlobalReplicationGroup (..),
    newIncreaseNodeGroupsInGlobalReplicationGroup,

    -- * Request Lenses
    increaseNodeGroupsInGlobalReplicationGroup_regionalConfigurations,
    increaseNodeGroupsInGlobalReplicationGroup_globalReplicationGroupId,
    increaseNodeGroupsInGlobalReplicationGroup_nodeGroupCount,
    increaseNodeGroupsInGlobalReplicationGroup_applyImmediately,

    -- * Destructuring the Response
    IncreaseNodeGroupsInGlobalReplicationGroupResponse (..),
    newIncreaseNodeGroupsInGlobalReplicationGroupResponse,

    -- * Response Lenses
    increaseNodeGroupsInGlobalReplicationGroupResponse_globalReplicationGroup,
    increaseNodeGroupsInGlobalReplicationGroupResponse_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:/ 'newIncreaseNodeGroupsInGlobalReplicationGroup' smart constructor.
data IncreaseNodeGroupsInGlobalReplicationGroup = IncreaseNodeGroupsInGlobalReplicationGroup'
  { -- | Describes the replication group IDs, the Amazon regions where they are
    -- stored and the shard configuration for each that comprise the Global
    -- datastore
    IncreaseNodeGroupsInGlobalReplicationGroup
-> Maybe [RegionalConfiguration]
regionalConfigurations :: Prelude.Maybe [RegionalConfiguration],
    -- | The name of the Global datastore
    IncreaseNodeGroupsInGlobalReplicationGroup -> Text
globalReplicationGroupId :: Prelude.Text,
    -- | The number of node groups you wish to add
    IncreaseNodeGroupsInGlobalReplicationGroup -> Int
nodeGroupCount :: Prelude.Int,
    -- | Indicates that the process begins immediately. At present, the only
    -- permitted value for this parameter is true.
    IncreaseNodeGroupsInGlobalReplicationGroup -> Bool
applyImmediately :: Prelude.Bool
  }
  deriving (IncreaseNodeGroupsInGlobalReplicationGroup
-> IncreaseNodeGroupsInGlobalReplicationGroup -> Bool
(IncreaseNodeGroupsInGlobalReplicationGroup
 -> IncreaseNodeGroupsInGlobalReplicationGroup -> Bool)
-> (IncreaseNodeGroupsInGlobalReplicationGroup
    -> IncreaseNodeGroupsInGlobalReplicationGroup -> Bool)
-> Eq IncreaseNodeGroupsInGlobalReplicationGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IncreaseNodeGroupsInGlobalReplicationGroup
-> IncreaseNodeGroupsInGlobalReplicationGroup -> Bool
$c/= :: IncreaseNodeGroupsInGlobalReplicationGroup
-> IncreaseNodeGroupsInGlobalReplicationGroup -> Bool
== :: IncreaseNodeGroupsInGlobalReplicationGroup
-> IncreaseNodeGroupsInGlobalReplicationGroup -> Bool
$c== :: IncreaseNodeGroupsInGlobalReplicationGroup
-> IncreaseNodeGroupsInGlobalReplicationGroup -> Bool
Prelude.Eq, ReadPrec [IncreaseNodeGroupsInGlobalReplicationGroup]
ReadPrec IncreaseNodeGroupsInGlobalReplicationGroup
Int -> ReadS IncreaseNodeGroupsInGlobalReplicationGroup
ReadS [IncreaseNodeGroupsInGlobalReplicationGroup]
(Int -> ReadS IncreaseNodeGroupsInGlobalReplicationGroup)
-> ReadS [IncreaseNodeGroupsInGlobalReplicationGroup]
-> ReadPrec IncreaseNodeGroupsInGlobalReplicationGroup
-> ReadPrec [IncreaseNodeGroupsInGlobalReplicationGroup]
-> Read IncreaseNodeGroupsInGlobalReplicationGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IncreaseNodeGroupsInGlobalReplicationGroup]
$creadListPrec :: ReadPrec [IncreaseNodeGroupsInGlobalReplicationGroup]
readPrec :: ReadPrec IncreaseNodeGroupsInGlobalReplicationGroup
$creadPrec :: ReadPrec IncreaseNodeGroupsInGlobalReplicationGroup
readList :: ReadS [IncreaseNodeGroupsInGlobalReplicationGroup]
$creadList :: ReadS [IncreaseNodeGroupsInGlobalReplicationGroup]
readsPrec :: Int -> ReadS IncreaseNodeGroupsInGlobalReplicationGroup
$creadsPrec :: Int -> ReadS IncreaseNodeGroupsInGlobalReplicationGroup
Prelude.Read, Int -> IncreaseNodeGroupsInGlobalReplicationGroup -> ShowS
[IncreaseNodeGroupsInGlobalReplicationGroup] -> ShowS
IncreaseNodeGroupsInGlobalReplicationGroup -> String
(Int -> IncreaseNodeGroupsInGlobalReplicationGroup -> ShowS)
-> (IncreaseNodeGroupsInGlobalReplicationGroup -> String)
-> ([IncreaseNodeGroupsInGlobalReplicationGroup] -> ShowS)
-> Show IncreaseNodeGroupsInGlobalReplicationGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IncreaseNodeGroupsInGlobalReplicationGroup] -> ShowS
$cshowList :: [IncreaseNodeGroupsInGlobalReplicationGroup] -> ShowS
show :: IncreaseNodeGroupsInGlobalReplicationGroup -> String
$cshow :: IncreaseNodeGroupsInGlobalReplicationGroup -> String
showsPrec :: Int -> IncreaseNodeGroupsInGlobalReplicationGroup -> ShowS
$cshowsPrec :: Int -> IncreaseNodeGroupsInGlobalReplicationGroup -> ShowS
Prelude.Show, (forall x.
 IncreaseNodeGroupsInGlobalReplicationGroup
 -> Rep IncreaseNodeGroupsInGlobalReplicationGroup x)
-> (forall x.
    Rep IncreaseNodeGroupsInGlobalReplicationGroup x
    -> IncreaseNodeGroupsInGlobalReplicationGroup)
-> Generic IncreaseNodeGroupsInGlobalReplicationGroup
forall x.
Rep IncreaseNodeGroupsInGlobalReplicationGroup x
-> IncreaseNodeGroupsInGlobalReplicationGroup
forall x.
IncreaseNodeGroupsInGlobalReplicationGroup
-> Rep IncreaseNodeGroupsInGlobalReplicationGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IncreaseNodeGroupsInGlobalReplicationGroup x
-> IncreaseNodeGroupsInGlobalReplicationGroup
$cfrom :: forall x.
IncreaseNodeGroupsInGlobalReplicationGroup
-> Rep IncreaseNodeGroupsInGlobalReplicationGroup x
Prelude.Generic)

-- |
-- Create a value of 'IncreaseNodeGroupsInGlobalReplicationGroup' 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:
--
-- 'regionalConfigurations', 'increaseNodeGroupsInGlobalReplicationGroup_regionalConfigurations' - Describes the replication group IDs, the Amazon regions where they are
-- stored and the shard configuration for each that comprise the Global
-- datastore
--
-- 'globalReplicationGroupId', 'increaseNodeGroupsInGlobalReplicationGroup_globalReplicationGroupId' - The name of the Global datastore
--
-- 'nodeGroupCount', 'increaseNodeGroupsInGlobalReplicationGroup_nodeGroupCount' - The number of node groups you wish to add
--
-- 'applyImmediately', 'increaseNodeGroupsInGlobalReplicationGroup_applyImmediately' - Indicates that the process begins immediately. At present, the only
-- permitted value for this parameter is true.
newIncreaseNodeGroupsInGlobalReplicationGroup ::
  -- | 'globalReplicationGroupId'
  Prelude.Text ->
  -- | 'nodeGroupCount'
  Prelude.Int ->
  -- | 'applyImmediately'
  Prelude.Bool ->
  IncreaseNodeGroupsInGlobalReplicationGroup
newIncreaseNodeGroupsInGlobalReplicationGroup :: Text -> Int -> Bool -> IncreaseNodeGroupsInGlobalReplicationGroup
newIncreaseNodeGroupsInGlobalReplicationGroup
  Text
pGlobalReplicationGroupId_
  Int
pNodeGroupCount_
  Bool
pApplyImmediately_ =
    IncreaseNodeGroupsInGlobalReplicationGroup' :: Maybe [RegionalConfiguration]
-> Text
-> Int
-> Bool
-> IncreaseNodeGroupsInGlobalReplicationGroup
IncreaseNodeGroupsInGlobalReplicationGroup'
      { $sel:regionalConfigurations:IncreaseNodeGroupsInGlobalReplicationGroup' :: Maybe [RegionalConfiguration]
regionalConfigurations =
          Maybe [RegionalConfiguration]
forall a. Maybe a
Prelude.Nothing,
        $sel:globalReplicationGroupId:IncreaseNodeGroupsInGlobalReplicationGroup' :: Text
globalReplicationGroupId =
          Text
pGlobalReplicationGroupId_,
        $sel:nodeGroupCount:IncreaseNodeGroupsInGlobalReplicationGroup' :: Int
nodeGroupCount =
          Int
pNodeGroupCount_,
        $sel:applyImmediately:IncreaseNodeGroupsInGlobalReplicationGroup' :: Bool
applyImmediately =
          Bool
pApplyImmediately_
      }

-- | Describes the replication group IDs, the Amazon regions where they are
-- stored and the shard configuration for each that comprise the Global
-- datastore
increaseNodeGroupsInGlobalReplicationGroup_regionalConfigurations :: Lens.Lens' IncreaseNodeGroupsInGlobalReplicationGroup (Prelude.Maybe [RegionalConfiguration])
increaseNodeGroupsInGlobalReplicationGroup_regionalConfigurations :: (Maybe [RegionalConfiguration]
 -> f (Maybe [RegionalConfiguration]))
-> IncreaseNodeGroupsInGlobalReplicationGroup
-> f IncreaseNodeGroupsInGlobalReplicationGroup
increaseNodeGroupsInGlobalReplicationGroup_regionalConfigurations = (IncreaseNodeGroupsInGlobalReplicationGroup
 -> Maybe [RegionalConfiguration])
-> (IncreaseNodeGroupsInGlobalReplicationGroup
    -> Maybe [RegionalConfiguration]
    -> IncreaseNodeGroupsInGlobalReplicationGroup)
-> Lens
     IncreaseNodeGroupsInGlobalReplicationGroup
     IncreaseNodeGroupsInGlobalReplicationGroup
     (Maybe [RegionalConfiguration])
     (Maybe [RegionalConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseNodeGroupsInGlobalReplicationGroup' {Maybe [RegionalConfiguration]
regionalConfigurations :: Maybe [RegionalConfiguration]
$sel:regionalConfigurations:IncreaseNodeGroupsInGlobalReplicationGroup' :: IncreaseNodeGroupsInGlobalReplicationGroup
-> Maybe [RegionalConfiguration]
regionalConfigurations} -> Maybe [RegionalConfiguration]
regionalConfigurations) (\s :: IncreaseNodeGroupsInGlobalReplicationGroup
s@IncreaseNodeGroupsInGlobalReplicationGroup' {} Maybe [RegionalConfiguration]
a -> IncreaseNodeGroupsInGlobalReplicationGroup
s {$sel:regionalConfigurations:IncreaseNodeGroupsInGlobalReplicationGroup' :: Maybe [RegionalConfiguration]
regionalConfigurations = Maybe [RegionalConfiguration]
a} :: IncreaseNodeGroupsInGlobalReplicationGroup) ((Maybe [RegionalConfiguration]
  -> f (Maybe [RegionalConfiguration]))
 -> IncreaseNodeGroupsInGlobalReplicationGroup
 -> f IncreaseNodeGroupsInGlobalReplicationGroup)
-> ((Maybe [RegionalConfiguration]
     -> f (Maybe [RegionalConfiguration]))
    -> Maybe [RegionalConfiguration]
    -> f (Maybe [RegionalConfiguration]))
-> (Maybe [RegionalConfiguration]
    -> f (Maybe [RegionalConfiguration]))
-> IncreaseNodeGroupsInGlobalReplicationGroup
-> f IncreaseNodeGroupsInGlobalReplicationGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RegionalConfiguration]
  [RegionalConfiguration]
  [RegionalConfiguration]
  [RegionalConfiguration]
-> Iso
     (Maybe [RegionalConfiguration])
     (Maybe [RegionalConfiguration])
     (Maybe [RegionalConfiguration])
     (Maybe [RegionalConfiguration])
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
  [RegionalConfiguration]
  [RegionalConfiguration]
  [RegionalConfiguration]
  [RegionalConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the Global datastore
increaseNodeGroupsInGlobalReplicationGroup_globalReplicationGroupId :: Lens.Lens' IncreaseNodeGroupsInGlobalReplicationGroup Prelude.Text
increaseNodeGroupsInGlobalReplicationGroup_globalReplicationGroupId :: (Text -> f Text)
-> IncreaseNodeGroupsInGlobalReplicationGroup
-> f IncreaseNodeGroupsInGlobalReplicationGroup
increaseNodeGroupsInGlobalReplicationGroup_globalReplicationGroupId = (IncreaseNodeGroupsInGlobalReplicationGroup -> Text)
-> (IncreaseNodeGroupsInGlobalReplicationGroup
    -> Text -> IncreaseNodeGroupsInGlobalReplicationGroup)
-> Lens
     IncreaseNodeGroupsInGlobalReplicationGroup
     IncreaseNodeGroupsInGlobalReplicationGroup
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseNodeGroupsInGlobalReplicationGroup' {Text
globalReplicationGroupId :: Text
$sel:globalReplicationGroupId:IncreaseNodeGroupsInGlobalReplicationGroup' :: IncreaseNodeGroupsInGlobalReplicationGroup -> Text
globalReplicationGroupId} -> Text
globalReplicationGroupId) (\s :: IncreaseNodeGroupsInGlobalReplicationGroup
s@IncreaseNodeGroupsInGlobalReplicationGroup' {} Text
a -> IncreaseNodeGroupsInGlobalReplicationGroup
s {$sel:globalReplicationGroupId:IncreaseNodeGroupsInGlobalReplicationGroup' :: Text
globalReplicationGroupId = Text
a} :: IncreaseNodeGroupsInGlobalReplicationGroup)

-- | The number of node groups you wish to add
increaseNodeGroupsInGlobalReplicationGroup_nodeGroupCount :: Lens.Lens' IncreaseNodeGroupsInGlobalReplicationGroup Prelude.Int
increaseNodeGroupsInGlobalReplicationGroup_nodeGroupCount :: (Int -> f Int)
-> IncreaseNodeGroupsInGlobalReplicationGroup
-> f IncreaseNodeGroupsInGlobalReplicationGroup
increaseNodeGroupsInGlobalReplicationGroup_nodeGroupCount = (IncreaseNodeGroupsInGlobalReplicationGroup -> Int)
-> (IncreaseNodeGroupsInGlobalReplicationGroup
    -> Int -> IncreaseNodeGroupsInGlobalReplicationGroup)
-> Lens
     IncreaseNodeGroupsInGlobalReplicationGroup
     IncreaseNodeGroupsInGlobalReplicationGroup
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseNodeGroupsInGlobalReplicationGroup' {Int
nodeGroupCount :: Int
$sel:nodeGroupCount:IncreaseNodeGroupsInGlobalReplicationGroup' :: IncreaseNodeGroupsInGlobalReplicationGroup -> Int
nodeGroupCount} -> Int
nodeGroupCount) (\s :: IncreaseNodeGroupsInGlobalReplicationGroup
s@IncreaseNodeGroupsInGlobalReplicationGroup' {} Int
a -> IncreaseNodeGroupsInGlobalReplicationGroup
s {$sel:nodeGroupCount:IncreaseNodeGroupsInGlobalReplicationGroup' :: Int
nodeGroupCount = Int
a} :: IncreaseNodeGroupsInGlobalReplicationGroup)

-- | Indicates that the process begins immediately. At present, the only
-- permitted value for this parameter is true.
increaseNodeGroupsInGlobalReplicationGroup_applyImmediately :: Lens.Lens' IncreaseNodeGroupsInGlobalReplicationGroup Prelude.Bool
increaseNodeGroupsInGlobalReplicationGroup_applyImmediately :: (Bool -> f Bool)
-> IncreaseNodeGroupsInGlobalReplicationGroup
-> f IncreaseNodeGroupsInGlobalReplicationGroup
increaseNodeGroupsInGlobalReplicationGroup_applyImmediately = (IncreaseNodeGroupsInGlobalReplicationGroup -> Bool)
-> (IncreaseNodeGroupsInGlobalReplicationGroup
    -> Bool -> IncreaseNodeGroupsInGlobalReplicationGroup)
-> Lens
     IncreaseNodeGroupsInGlobalReplicationGroup
     IncreaseNodeGroupsInGlobalReplicationGroup
     Bool
     Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseNodeGroupsInGlobalReplicationGroup' {Bool
applyImmediately :: Bool
$sel:applyImmediately:IncreaseNodeGroupsInGlobalReplicationGroup' :: IncreaseNodeGroupsInGlobalReplicationGroup -> Bool
applyImmediately} -> Bool
applyImmediately) (\s :: IncreaseNodeGroupsInGlobalReplicationGroup
s@IncreaseNodeGroupsInGlobalReplicationGroup' {} Bool
a -> IncreaseNodeGroupsInGlobalReplicationGroup
s {$sel:applyImmediately:IncreaseNodeGroupsInGlobalReplicationGroup' :: Bool
applyImmediately = Bool
a} :: IncreaseNodeGroupsInGlobalReplicationGroup)

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

instance
  Prelude.NFData
    IncreaseNodeGroupsInGlobalReplicationGroup

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

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

instance
  Core.ToQuery
    IncreaseNodeGroupsInGlobalReplicationGroup
  where
  toQuery :: IncreaseNodeGroupsInGlobalReplicationGroup -> QueryString
toQuery
    IncreaseNodeGroupsInGlobalReplicationGroup' {Bool
Int
Maybe [RegionalConfiguration]
Text
applyImmediately :: Bool
nodeGroupCount :: Int
globalReplicationGroupId :: Text
regionalConfigurations :: Maybe [RegionalConfiguration]
$sel:applyImmediately:IncreaseNodeGroupsInGlobalReplicationGroup' :: IncreaseNodeGroupsInGlobalReplicationGroup -> Bool
$sel:nodeGroupCount:IncreaseNodeGroupsInGlobalReplicationGroup' :: IncreaseNodeGroupsInGlobalReplicationGroup -> Int
$sel:globalReplicationGroupId:IncreaseNodeGroupsInGlobalReplicationGroup' :: IncreaseNodeGroupsInGlobalReplicationGroup -> Text
$sel:regionalConfigurations:IncreaseNodeGroupsInGlobalReplicationGroup' :: IncreaseNodeGroupsInGlobalReplicationGroup
-> Maybe [RegionalConfiguration]
..} =
      [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"Action"
            ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"IncreaseNodeGroupsInGlobalReplicationGroup" ::
                        Prelude.ByteString
                    ),
          ByteString
"Version"
            ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
          ByteString
"RegionalConfigurations"
            ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
              ( ByteString -> [RegionalConfiguration] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"RegionalConfiguration"
                  ([RegionalConfiguration] -> QueryString)
-> Maybe [RegionalConfiguration] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RegionalConfiguration]
regionalConfigurations
              ),
          ByteString
"GlobalReplicationGroupId"
            ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
globalReplicationGroupId,
          ByteString
"NodeGroupCount" ByteString -> Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Int
nodeGroupCount,
          ByteString
"ApplyImmediately" ByteString -> Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Bool
applyImmediately
        ]

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

-- |
-- Create a value of 'IncreaseNodeGroupsInGlobalReplicationGroupResponse' 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:
--
-- 'globalReplicationGroup', 'increaseNodeGroupsInGlobalReplicationGroupResponse_globalReplicationGroup' - Undocumented member.
--
-- 'httpStatus', 'increaseNodeGroupsInGlobalReplicationGroupResponse_httpStatus' - The response's http status code.
newIncreaseNodeGroupsInGlobalReplicationGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  IncreaseNodeGroupsInGlobalReplicationGroupResponse
newIncreaseNodeGroupsInGlobalReplicationGroupResponse :: Int -> IncreaseNodeGroupsInGlobalReplicationGroupResponse
newIncreaseNodeGroupsInGlobalReplicationGroupResponse
  Int
pHttpStatus_ =
    IncreaseNodeGroupsInGlobalReplicationGroupResponse' :: Maybe GlobalReplicationGroup
-> Int -> IncreaseNodeGroupsInGlobalReplicationGroupResponse
IncreaseNodeGroupsInGlobalReplicationGroupResponse'
      { $sel:globalReplicationGroup:IncreaseNodeGroupsInGlobalReplicationGroupResponse' :: Maybe GlobalReplicationGroup
globalReplicationGroup =
          Maybe GlobalReplicationGroup
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:IncreaseNodeGroupsInGlobalReplicationGroupResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | Undocumented member.
increaseNodeGroupsInGlobalReplicationGroupResponse_globalReplicationGroup :: Lens.Lens' IncreaseNodeGroupsInGlobalReplicationGroupResponse (Prelude.Maybe GlobalReplicationGroup)
increaseNodeGroupsInGlobalReplicationGroupResponse_globalReplicationGroup :: (Maybe GlobalReplicationGroup -> f (Maybe GlobalReplicationGroup))
-> IncreaseNodeGroupsInGlobalReplicationGroupResponse
-> f IncreaseNodeGroupsInGlobalReplicationGroupResponse
increaseNodeGroupsInGlobalReplicationGroupResponse_globalReplicationGroup = (IncreaseNodeGroupsInGlobalReplicationGroupResponse
 -> Maybe GlobalReplicationGroup)
-> (IncreaseNodeGroupsInGlobalReplicationGroupResponse
    -> Maybe GlobalReplicationGroup
    -> IncreaseNodeGroupsInGlobalReplicationGroupResponse)
-> Lens
     IncreaseNodeGroupsInGlobalReplicationGroupResponse
     IncreaseNodeGroupsInGlobalReplicationGroupResponse
     (Maybe GlobalReplicationGroup)
     (Maybe GlobalReplicationGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IncreaseNodeGroupsInGlobalReplicationGroupResponse' {Maybe GlobalReplicationGroup
globalReplicationGroup :: Maybe GlobalReplicationGroup
$sel:globalReplicationGroup:IncreaseNodeGroupsInGlobalReplicationGroupResponse' :: IncreaseNodeGroupsInGlobalReplicationGroupResponse
-> Maybe GlobalReplicationGroup
globalReplicationGroup} -> Maybe GlobalReplicationGroup
globalReplicationGroup) (\s :: IncreaseNodeGroupsInGlobalReplicationGroupResponse
s@IncreaseNodeGroupsInGlobalReplicationGroupResponse' {} Maybe GlobalReplicationGroup
a -> IncreaseNodeGroupsInGlobalReplicationGroupResponse
s {$sel:globalReplicationGroup:IncreaseNodeGroupsInGlobalReplicationGroupResponse' :: Maybe GlobalReplicationGroup
globalReplicationGroup = Maybe GlobalReplicationGroup
a} :: IncreaseNodeGroupsInGlobalReplicationGroupResponse)

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

instance
  Prelude.NFData
    IncreaseNodeGroupsInGlobalReplicationGroupResponse