{-# 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.DescribeReplicationGroups
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns information about a particular replication group. If no
-- identifier is specified, @DescribeReplicationGroups@ returns information
-- about all replication groups.
--
-- This operation is valid for Redis only.
--
-- This operation returns paginated results.
module Amazonka.ElastiCache.DescribeReplicationGroups
  ( -- * Creating a Request
    DescribeReplicationGroups (..),
    newDescribeReplicationGroups,

    -- * Request Lenses
    describeReplicationGroups_marker,
    describeReplicationGroups_maxRecords,
    describeReplicationGroups_replicationGroupId,

    -- * Destructuring the Response
    DescribeReplicationGroupsResponse (..),
    newDescribeReplicationGroupsResponse,

    -- * Response Lenses
    describeReplicationGroupsResponse_marker,
    describeReplicationGroupsResponse_replicationGroups,
    describeReplicationGroupsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElastiCache.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents the input of a @DescribeReplicationGroups@ operation.
--
-- /See:/ 'newDescribeReplicationGroups' smart constructor.
data DescribeReplicationGroups = DescribeReplicationGroups'
  { -- | An optional marker returned from a prior request. Use this marker for
    -- pagination of results from this operation. If this parameter is
    -- specified, the response includes only records beyond the marker, up to
    -- the value specified by @MaxRecords@.
    DescribeReplicationGroups -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more
    -- records exist than the specified @MaxRecords@ value, a marker is
    -- included in the response so that the remaining results can be retrieved.
    --
    -- Default: 100
    --
    -- Constraints: minimum 20; maximum 100.
    DescribeReplicationGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The identifier for the replication group to be described. This parameter
    -- is not case sensitive.
    --
    -- If you do not specify this parameter, information about all replication
    -- groups is returned.
    DescribeReplicationGroups -> Maybe Text
replicationGroupId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeReplicationGroups -> DescribeReplicationGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReplicationGroups -> DescribeReplicationGroups -> Bool
$c/= :: DescribeReplicationGroups -> DescribeReplicationGroups -> Bool
== :: DescribeReplicationGroups -> DescribeReplicationGroups -> Bool
$c== :: DescribeReplicationGroups -> DescribeReplicationGroups -> Bool
Prelude.Eq, ReadPrec [DescribeReplicationGroups]
ReadPrec DescribeReplicationGroups
Int -> ReadS DescribeReplicationGroups
ReadS [DescribeReplicationGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReplicationGroups]
$creadListPrec :: ReadPrec [DescribeReplicationGroups]
readPrec :: ReadPrec DescribeReplicationGroups
$creadPrec :: ReadPrec DescribeReplicationGroups
readList :: ReadS [DescribeReplicationGroups]
$creadList :: ReadS [DescribeReplicationGroups]
readsPrec :: Int -> ReadS DescribeReplicationGroups
$creadsPrec :: Int -> ReadS DescribeReplicationGroups
Prelude.Read, Int -> DescribeReplicationGroups -> ShowS
[DescribeReplicationGroups] -> ShowS
DescribeReplicationGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReplicationGroups] -> ShowS
$cshowList :: [DescribeReplicationGroups] -> ShowS
show :: DescribeReplicationGroups -> String
$cshow :: DescribeReplicationGroups -> String
showsPrec :: Int -> DescribeReplicationGroups -> ShowS
$cshowsPrec :: Int -> DescribeReplicationGroups -> ShowS
Prelude.Show, forall x.
Rep DescribeReplicationGroups x -> DescribeReplicationGroups
forall x.
DescribeReplicationGroups -> Rep DescribeReplicationGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReplicationGroups x -> DescribeReplicationGroups
$cfrom :: forall x.
DescribeReplicationGroups -> Rep DescribeReplicationGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReplicationGroups' 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:
--
-- 'marker', 'describeReplicationGroups_marker' - An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
--
-- 'maxRecords', 'describeReplicationGroups_maxRecords' - The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a marker is
-- included in the response so that the remaining results can be retrieved.
--
-- Default: 100
--
-- Constraints: minimum 20; maximum 100.
--
-- 'replicationGroupId', 'describeReplicationGroups_replicationGroupId' - The identifier for the replication group to be described. This parameter
-- is not case sensitive.
--
-- If you do not specify this parameter, information about all replication
-- groups is returned.
newDescribeReplicationGroups ::
  DescribeReplicationGroups
newDescribeReplicationGroups :: DescribeReplicationGroups
newDescribeReplicationGroups =
  DescribeReplicationGroups'
    { $sel:marker:DescribeReplicationGroups' :: Maybe Text
marker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeReplicationGroups' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupId:DescribeReplicationGroups' :: Maybe Text
replicationGroupId = forall a. Maybe a
Prelude.Nothing
    }

-- | An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
describeReplicationGroups_marker :: Lens.Lens' DescribeReplicationGroups (Prelude.Maybe Prelude.Text)
describeReplicationGroups_marker :: Lens' DescribeReplicationGroups (Maybe Text)
describeReplicationGroups_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationGroups' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReplicationGroups
s@DescribeReplicationGroups' {} Maybe Text
a -> DescribeReplicationGroups
s {$sel:marker:DescribeReplicationGroups' :: Maybe Text
marker = Maybe Text
a} :: DescribeReplicationGroups)

-- | The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a marker is
-- included in the response so that the remaining results can be retrieved.
--
-- Default: 100
--
-- Constraints: minimum 20; maximum 100.
describeReplicationGroups_maxRecords :: Lens.Lens' DescribeReplicationGroups (Prelude.Maybe Prelude.Int)
describeReplicationGroups_maxRecords :: Lens' DescribeReplicationGroups (Maybe Int)
describeReplicationGroups_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationGroups' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeReplicationGroups
s@DescribeReplicationGroups' {} Maybe Int
a -> DescribeReplicationGroups
s {$sel:maxRecords:DescribeReplicationGroups' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeReplicationGroups)

-- | The identifier for the replication group to be described. This parameter
-- is not case sensitive.
--
-- If you do not specify this parameter, information about all replication
-- groups is returned.
describeReplicationGroups_replicationGroupId :: Lens.Lens' DescribeReplicationGroups (Prelude.Maybe Prelude.Text)
describeReplicationGroups_replicationGroupId :: Lens' DescribeReplicationGroups (Maybe Text)
describeReplicationGroups_replicationGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationGroups' {Maybe Text
replicationGroupId :: Maybe Text
$sel:replicationGroupId:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Text
replicationGroupId} -> Maybe Text
replicationGroupId) (\s :: DescribeReplicationGroups
s@DescribeReplicationGroups' {} Maybe Text
a -> DescribeReplicationGroups
s {$sel:replicationGroupId:DescribeReplicationGroups' :: Maybe Text
replicationGroupId = Maybe Text
a} :: DescribeReplicationGroups)

instance Core.AWSPager DescribeReplicationGroups where
  page :: DescribeReplicationGroups
-> AWSResponse DescribeReplicationGroups
-> Maybe DescribeReplicationGroups
page DescribeReplicationGroups
rq AWSResponse DescribeReplicationGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReplicationGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReplicationGroupsResponse (Maybe Text)
describeReplicationGroupsResponse_marker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReplicationGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReplicationGroupsResponse (Maybe [ReplicationGroup])
describeReplicationGroupsResponse_replicationGroups
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeReplicationGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeReplicationGroups (Maybe Text)
describeReplicationGroups_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeReplicationGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReplicationGroupsResponse (Maybe Text)
describeReplicationGroupsResponse_marker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeReplicationGroups where
  type
    AWSResponse DescribeReplicationGroups =
      DescribeReplicationGroupsResponse
  request :: (Service -> Service)
-> DescribeReplicationGroups -> Request DescribeReplicationGroups
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeReplicationGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeReplicationGroups)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeReplicationGroupsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [ReplicationGroup]
-> Int
-> DescribeReplicationGroupsResponse
DescribeReplicationGroupsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ReplicationGroups"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"ReplicationGroup")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeReplicationGroups where
  hashWithSalt :: Int -> DescribeReplicationGroups -> Int
hashWithSalt Int
_salt DescribeReplicationGroups' {Maybe Int
Maybe Text
replicationGroupId :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:replicationGroupId:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Text
$sel:maxRecords:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Int
$sel:marker:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
replicationGroupId

instance Prelude.NFData DescribeReplicationGroups where
  rnf :: DescribeReplicationGroups -> ()
rnf DescribeReplicationGroups' {Maybe Int
Maybe Text
replicationGroupId :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:replicationGroupId:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Text
$sel:maxRecords:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Int
$sel:marker:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
replicationGroupId

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

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

instance Data.ToQuery DescribeReplicationGroups where
  toQuery :: DescribeReplicationGroups -> QueryString
toQuery DescribeReplicationGroups' {Maybe Int
Maybe Text
replicationGroupId :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:replicationGroupId:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Text
$sel:maxRecords:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Int
$sel:marker:DescribeReplicationGroups' :: DescribeReplicationGroups -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeReplicationGroups" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxRecords,
        ByteString
"ReplicationGroupId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
replicationGroupId
      ]

-- | Represents the output of a @DescribeReplicationGroups@ operation.
--
-- /See:/ 'newDescribeReplicationGroupsResponse' smart constructor.
data DescribeReplicationGroupsResponse = DescribeReplicationGroupsResponse'
  { -- | Provides an identifier to allow retrieval of paginated results.
    DescribeReplicationGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of replication groups. Each item in the list contains detailed
    -- information about one replication group.
    DescribeReplicationGroupsResponse -> Maybe [ReplicationGroup]
replicationGroups :: Prelude.Maybe [ReplicationGroup],
    -- | The response's http status code.
    DescribeReplicationGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeReplicationGroupsResponse
-> DescribeReplicationGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReplicationGroupsResponse
-> DescribeReplicationGroupsResponse -> Bool
$c/= :: DescribeReplicationGroupsResponse
-> DescribeReplicationGroupsResponse -> Bool
== :: DescribeReplicationGroupsResponse
-> DescribeReplicationGroupsResponse -> Bool
$c== :: DescribeReplicationGroupsResponse
-> DescribeReplicationGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeReplicationGroupsResponse]
ReadPrec DescribeReplicationGroupsResponse
Int -> ReadS DescribeReplicationGroupsResponse
ReadS [DescribeReplicationGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReplicationGroupsResponse]
$creadListPrec :: ReadPrec [DescribeReplicationGroupsResponse]
readPrec :: ReadPrec DescribeReplicationGroupsResponse
$creadPrec :: ReadPrec DescribeReplicationGroupsResponse
readList :: ReadS [DescribeReplicationGroupsResponse]
$creadList :: ReadS [DescribeReplicationGroupsResponse]
readsPrec :: Int -> ReadS DescribeReplicationGroupsResponse
$creadsPrec :: Int -> ReadS DescribeReplicationGroupsResponse
Prelude.Read, Int -> DescribeReplicationGroupsResponse -> ShowS
[DescribeReplicationGroupsResponse] -> ShowS
DescribeReplicationGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReplicationGroupsResponse] -> ShowS
$cshowList :: [DescribeReplicationGroupsResponse] -> ShowS
show :: DescribeReplicationGroupsResponse -> String
$cshow :: DescribeReplicationGroupsResponse -> String
showsPrec :: Int -> DescribeReplicationGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeReplicationGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeReplicationGroupsResponse x
-> DescribeReplicationGroupsResponse
forall x.
DescribeReplicationGroupsResponse
-> Rep DescribeReplicationGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReplicationGroupsResponse x
-> DescribeReplicationGroupsResponse
$cfrom :: forall x.
DescribeReplicationGroupsResponse
-> Rep DescribeReplicationGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReplicationGroupsResponse' 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:
--
-- 'marker', 'describeReplicationGroupsResponse_marker' - Provides an identifier to allow retrieval of paginated results.
--
-- 'replicationGroups', 'describeReplicationGroupsResponse_replicationGroups' - A list of replication groups. Each item in the list contains detailed
-- information about one replication group.
--
-- 'httpStatus', 'describeReplicationGroupsResponse_httpStatus' - The response's http status code.
newDescribeReplicationGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeReplicationGroupsResponse
newDescribeReplicationGroupsResponse :: Int -> DescribeReplicationGroupsResponse
newDescribeReplicationGroupsResponse Int
pHttpStatus_ =
  DescribeReplicationGroupsResponse'
    { $sel:marker:DescribeReplicationGroupsResponse' :: Maybe Text
marker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroups:DescribeReplicationGroupsResponse' :: Maybe [ReplicationGroup]
replicationGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeReplicationGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Provides an identifier to allow retrieval of paginated results.
describeReplicationGroupsResponse_marker :: Lens.Lens' DescribeReplicationGroupsResponse (Prelude.Maybe Prelude.Text)
describeReplicationGroupsResponse_marker :: Lens' DescribeReplicationGroupsResponse (Maybe Text)
describeReplicationGroupsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReplicationGroupsResponse' :: DescribeReplicationGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReplicationGroupsResponse
s@DescribeReplicationGroupsResponse' {} Maybe Text
a -> DescribeReplicationGroupsResponse
s {$sel:marker:DescribeReplicationGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeReplicationGroupsResponse)

-- | A list of replication groups. Each item in the list contains detailed
-- information about one replication group.
describeReplicationGroupsResponse_replicationGroups :: Lens.Lens' DescribeReplicationGroupsResponse (Prelude.Maybe [ReplicationGroup])
describeReplicationGroupsResponse_replicationGroups :: Lens' DescribeReplicationGroupsResponse (Maybe [ReplicationGroup])
describeReplicationGroupsResponse_replicationGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationGroupsResponse' {Maybe [ReplicationGroup]
replicationGroups :: Maybe [ReplicationGroup]
$sel:replicationGroups:DescribeReplicationGroupsResponse' :: DescribeReplicationGroupsResponse -> Maybe [ReplicationGroup]
replicationGroups} -> Maybe [ReplicationGroup]
replicationGroups) (\s :: DescribeReplicationGroupsResponse
s@DescribeReplicationGroupsResponse' {} Maybe [ReplicationGroup]
a -> DescribeReplicationGroupsResponse
s {$sel:replicationGroups:DescribeReplicationGroupsResponse' :: Maybe [ReplicationGroup]
replicationGroups = Maybe [ReplicationGroup]
a} :: DescribeReplicationGroupsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeReplicationGroupsResponse
  where
  rnf :: DescribeReplicationGroupsResponse -> ()
rnf DescribeReplicationGroupsResponse' {Int
Maybe [ReplicationGroup]
Maybe Text
httpStatus :: Int
replicationGroups :: Maybe [ReplicationGroup]
marker :: Maybe Text
$sel:httpStatus:DescribeReplicationGroupsResponse' :: DescribeReplicationGroupsResponse -> Int
$sel:replicationGroups:DescribeReplicationGroupsResponse' :: DescribeReplicationGroupsResponse -> Maybe [ReplicationGroup]
$sel:marker:DescribeReplicationGroupsResponse' :: DescribeReplicationGroupsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ReplicationGroup]
replicationGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus