{-# 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.RebalanceSlotsInGlobalReplicationGroup
-- 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)
--
-- Redistribute slots to ensure uniform distribution across existing shards
-- in the cluster.
module Amazonka.ElastiCache.RebalanceSlotsInGlobalReplicationGroup
  ( -- * Creating a Request
    RebalanceSlotsInGlobalReplicationGroup (..),
    newRebalanceSlotsInGlobalReplicationGroup,

    -- * Request Lenses
    rebalanceSlotsInGlobalReplicationGroup_globalReplicationGroupId,
    rebalanceSlotsInGlobalReplicationGroup_applyImmediately,

    -- * Destructuring the Response
    RebalanceSlotsInGlobalReplicationGroupResponse (..),
    newRebalanceSlotsInGlobalReplicationGroupResponse,

    -- * Response Lenses
    rebalanceSlotsInGlobalReplicationGroupResponse_globalReplicationGroup,
    rebalanceSlotsInGlobalReplicationGroupResponse_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:/ 'newRebalanceSlotsInGlobalReplicationGroup' smart constructor.
data RebalanceSlotsInGlobalReplicationGroup = RebalanceSlotsInGlobalReplicationGroup'
  { -- | The name of the Global datastore
    RebalanceSlotsInGlobalReplicationGroup -> Text
globalReplicationGroupId :: Prelude.Text,
    -- | If @True@, redistribution is applied immediately.
    RebalanceSlotsInGlobalReplicationGroup -> Bool
applyImmediately :: Prelude.Bool
  }
  deriving (RebalanceSlotsInGlobalReplicationGroup
-> RebalanceSlotsInGlobalReplicationGroup -> Bool
(RebalanceSlotsInGlobalReplicationGroup
 -> RebalanceSlotsInGlobalReplicationGroup -> Bool)
-> (RebalanceSlotsInGlobalReplicationGroup
    -> RebalanceSlotsInGlobalReplicationGroup -> Bool)
-> Eq RebalanceSlotsInGlobalReplicationGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RebalanceSlotsInGlobalReplicationGroup
-> RebalanceSlotsInGlobalReplicationGroup -> Bool
$c/= :: RebalanceSlotsInGlobalReplicationGroup
-> RebalanceSlotsInGlobalReplicationGroup -> Bool
== :: RebalanceSlotsInGlobalReplicationGroup
-> RebalanceSlotsInGlobalReplicationGroup -> Bool
$c== :: RebalanceSlotsInGlobalReplicationGroup
-> RebalanceSlotsInGlobalReplicationGroup -> Bool
Prelude.Eq, ReadPrec [RebalanceSlotsInGlobalReplicationGroup]
ReadPrec RebalanceSlotsInGlobalReplicationGroup
Int -> ReadS RebalanceSlotsInGlobalReplicationGroup
ReadS [RebalanceSlotsInGlobalReplicationGroup]
(Int -> ReadS RebalanceSlotsInGlobalReplicationGroup)
-> ReadS [RebalanceSlotsInGlobalReplicationGroup]
-> ReadPrec RebalanceSlotsInGlobalReplicationGroup
-> ReadPrec [RebalanceSlotsInGlobalReplicationGroup]
-> Read RebalanceSlotsInGlobalReplicationGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RebalanceSlotsInGlobalReplicationGroup]
$creadListPrec :: ReadPrec [RebalanceSlotsInGlobalReplicationGroup]
readPrec :: ReadPrec RebalanceSlotsInGlobalReplicationGroup
$creadPrec :: ReadPrec RebalanceSlotsInGlobalReplicationGroup
readList :: ReadS [RebalanceSlotsInGlobalReplicationGroup]
$creadList :: ReadS [RebalanceSlotsInGlobalReplicationGroup]
readsPrec :: Int -> ReadS RebalanceSlotsInGlobalReplicationGroup
$creadsPrec :: Int -> ReadS RebalanceSlotsInGlobalReplicationGroup
Prelude.Read, Int -> RebalanceSlotsInGlobalReplicationGroup -> ShowS
[RebalanceSlotsInGlobalReplicationGroup] -> ShowS
RebalanceSlotsInGlobalReplicationGroup -> String
(Int -> RebalanceSlotsInGlobalReplicationGroup -> ShowS)
-> (RebalanceSlotsInGlobalReplicationGroup -> String)
-> ([RebalanceSlotsInGlobalReplicationGroup] -> ShowS)
-> Show RebalanceSlotsInGlobalReplicationGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RebalanceSlotsInGlobalReplicationGroup] -> ShowS
$cshowList :: [RebalanceSlotsInGlobalReplicationGroup] -> ShowS
show :: RebalanceSlotsInGlobalReplicationGroup -> String
$cshow :: RebalanceSlotsInGlobalReplicationGroup -> String
showsPrec :: Int -> RebalanceSlotsInGlobalReplicationGroup -> ShowS
$cshowsPrec :: Int -> RebalanceSlotsInGlobalReplicationGroup -> ShowS
Prelude.Show, (forall x.
 RebalanceSlotsInGlobalReplicationGroup
 -> Rep RebalanceSlotsInGlobalReplicationGroup x)
-> (forall x.
    Rep RebalanceSlotsInGlobalReplicationGroup x
    -> RebalanceSlotsInGlobalReplicationGroup)
-> Generic RebalanceSlotsInGlobalReplicationGroup
forall x.
Rep RebalanceSlotsInGlobalReplicationGroup x
-> RebalanceSlotsInGlobalReplicationGroup
forall x.
RebalanceSlotsInGlobalReplicationGroup
-> Rep RebalanceSlotsInGlobalReplicationGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RebalanceSlotsInGlobalReplicationGroup x
-> RebalanceSlotsInGlobalReplicationGroup
$cfrom :: forall x.
RebalanceSlotsInGlobalReplicationGroup
-> Rep RebalanceSlotsInGlobalReplicationGroup x
Prelude.Generic)

-- |
-- Create a value of 'RebalanceSlotsInGlobalReplicationGroup' 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:
--
-- 'globalReplicationGroupId', 'rebalanceSlotsInGlobalReplicationGroup_globalReplicationGroupId' - The name of the Global datastore
--
-- 'applyImmediately', 'rebalanceSlotsInGlobalReplicationGroup_applyImmediately' - If @True@, redistribution is applied immediately.
newRebalanceSlotsInGlobalReplicationGroup ::
  -- | 'globalReplicationGroupId'
  Prelude.Text ->
  -- | 'applyImmediately'
  Prelude.Bool ->
  RebalanceSlotsInGlobalReplicationGroup
newRebalanceSlotsInGlobalReplicationGroup :: Text -> Bool -> RebalanceSlotsInGlobalReplicationGroup
newRebalanceSlotsInGlobalReplicationGroup
  Text
pGlobalReplicationGroupId_
  Bool
pApplyImmediately_ =
    RebalanceSlotsInGlobalReplicationGroup' :: Text -> Bool -> RebalanceSlotsInGlobalReplicationGroup
RebalanceSlotsInGlobalReplicationGroup'
      { $sel:globalReplicationGroupId:RebalanceSlotsInGlobalReplicationGroup' :: Text
globalReplicationGroupId =
          Text
pGlobalReplicationGroupId_,
        $sel:applyImmediately:RebalanceSlotsInGlobalReplicationGroup' :: Bool
applyImmediately =
          Bool
pApplyImmediately_
      }

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

-- | If @True@, redistribution is applied immediately.
rebalanceSlotsInGlobalReplicationGroup_applyImmediately :: Lens.Lens' RebalanceSlotsInGlobalReplicationGroup Prelude.Bool
rebalanceSlotsInGlobalReplicationGroup_applyImmediately :: (Bool -> f Bool)
-> RebalanceSlotsInGlobalReplicationGroup
-> f RebalanceSlotsInGlobalReplicationGroup
rebalanceSlotsInGlobalReplicationGroup_applyImmediately = (RebalanceSlotsInGlobalReplicationGroup -> Bool)
-> (RebalanceSlotsInGlobalReplicationGroup
    -> Bool -> RebalanceSlotsInGlobalReplicationGroup)
-> Lens
     RebalanceSlotsInGlobalReplicationGroup
     RebalanceSlotsInGlobalReplicationGroup
     Bool
     Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RebalanceSlotsInGlobalReplicationGroup' {Bool
applyImmediately :: Bool
$sel:applyImmediately:RebalanceSlotsInGlobalReplicationGroup' :: RebalanceSlotsInGlobalReplicationGroup -> Bool
applyImmediately} -> Bool
applyImmediately) (\s :: RebalanceSlotsInGlobalReplicationGroup
s@RebalanceSlotsInGlobalReplicationGroup' {} Bool
a -> RebalanceSlotsInGlobalReplicationGroup
s {$sel:applyImmediately:RebalanceSlotsInGlobalReplicationGroup' :: Bool
applyImmediately = Bool
a} :: RebalanceSlotsInGlobalReplicationGroup)

instance
  Core.AWSRequest
    RebalanceSlotsInGlobalReplicationGroup
  where
  type
    AWSResponse
      RebalanceSlotsInGlobalReplicationGroup =
      RebalanceSlotsInGlobalReplicationGroupResponse
  request :: RebalanceSlotsInGlobalReplicationGroup
-> Request RebalanceSlotsInGlobalReplicationGroup
request = Service
-> RebalanceSlotsInGlobalReplicationGroup
-> Request RebalanceSlotsInGlobalReplicationGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy RebalanceSlotsInGlobalReplicationGroup
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse RebalanceSlotsInGlobalReplicationGroup)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either
         String (AWSResponse RebalanceSlotsInGlobalReplicationGroup))
-> Logger
-> Service
-> Proxy RebalanceSlotsInGlobalReplicationGroup
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse RebalanceSlotsInGlobalReplicationGroup)))
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
"RebalanceSlotsInGlobalReplicationGroupResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe GlobalReplicationGroup
-> Int -> RebalanceSlotsInGlobalReplicationGroupResponse
RebalanceSlotsInGlobalReplicationGroupResponse'
            (Maybe GlobalReplicationGroup
 -> Int -> RebalanceSlotsInGlobalReplicationGroupResponse)
-> Either String (Maybe GlobalReplicationGroup)
-> Either
     String (Int -> RebalanceSlotsInGlobalReplicationGroupResponse)
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 -> RebalanceSlotsInGlobalReplicationGroupResponse)
-> Either String Int
-> Either String RebalanceSlotsInGlobalReplicationGroupResponse
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
    RebalanceSlotsInGlobalReplicationGroup

instance
  Prelude.NFData
    RebalanceSlotsInGlobalReplicationGroup

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

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

instance
  Core.ToQuery
    RebalanceSlotsInGlobalReplicationGroup
  where
  toQuery :: RebalanceSlotsInGlobalReplicationGroup -> QueryString
toQuery RebalanceSlotsInGlobalReplicationGroup' {Bool
Text
applyImmediately :: Bool
globalReplicationGroupId :: Text
$sel:applyImmediately:RebalanceSlotsInGlobalReplicationGroup' :: RebalanceSlotsInGlobalReplicationGroup -> Bool
$sel:globalReplicationGroupId:RebalanceSlotsInGlobalReplicationGroup' :: RebalanceSlotsInGlobalReplicationGroup -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"RebalanceSlotsInGlobalReplicationGroup" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"GlobalReplicationGroupId"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
globalReplicationGroupId,
        ByteString
"ApplyImmediately" ByteString -> Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Bool
applyImmediately
      ]

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

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

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

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

instance
  Prelude.NFData
    RebalanceSlotsInGlobalReplicationGroupResponse