{-# 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.DMS.DescribeReplicationSubnetGroups
-- 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 the replication subnet groups.
--
-- This operation returns paginated results.
module Amazonka.DMS.DescribeReplicationSubnetGroups
  ( -- * Creating a Request
    DescribeReplicationSubnetGroups (..),
    newDescribeReplicationSubnetGroups,

    -- * Request Lenses
    describeReplicationSubnetGroups_filters,
    describeReplicationSubnetGroups_marker,
    describeReplicationSubnetGroups_maxRecords,

    -- * Destructuring the Response
    DescribeReplicationSubnetGroupsResponse (..),
    newDescribeReplicationSubnetGroupsResponse,

    -- * Response Lenses
    describeReplicationSubnetGroupsResponse_marker,
    describeReplicationSubnetGroupsResponse_replicationSubnetGroups,
    describeReplicationSubnetGroupsResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newDescribeReplicationSubnetGroups' smart constructor.
data DescribeReplicationSubnetGroups = DescribeReplicationSubnetGroups'
  { -- | Filters applied to replication subnet groups.
    --
    -- Valid filter names: replication-subnet-group-id
    DescribeReplicationSubnetGroups -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | An optional pagination token provided by a previous request. If this
    -- parameter is specified, the response includes only records beyond the
    -- marker, up to the value specified by @MaxRecords@.
    DescribeReplicationSubnetGroups -> 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 pagination token
    -- called a marker is included in the response so that the remaining
    -- results can be retrieved.
    --
    -- Default: 100
    --
    -- Constraints: Minimum 20, maximum 100.
    DescribeReplicationSubnetGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeReplicationSubnetGroups
-> DescribeReplicationSubnetGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReplicationSubnetGroups
-> DescribeReplicationSubnetGroups -> Bool
$c/= :: DescribeReplicationSubnetGroups
-> DescribeReplicationSubnetGroups -> Bool
== :: DescribeReplicationSubnetGroups
-> DescribeReplicationSubnetGroups -> Bool
$c== :: DescribeReplicationSubnetGroups
-> DescribeReplicationSubnetGroups -> Bool
Prelude.Eq, ReadPrec [DescribeReplicationSubnetGroups]
ReadPrec DescribeReplicationSubnetGroups
Int -> ReadS DescribeReplicationSubnetGroups
ReadS [DescribeReplicationSubnetGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReplicationSubnetGroups]
$creadListPrec :: ReadPrec [DescribeReplicationSubnetGroups]
readPrec :: ReadPrec DescribeReplicationSubnetGroups
$creadPrec :: ReadPrec DescribeReplicationSubnetGroups
readList :: ReadS [DescribeReplicationSubnetGroups]
$creadList :: ReadS [DescribeReplicationSubnetGroups]
readsPrec :: Int -> ReadS DescribeReplicationSubnetGroups
$creadsPrec :: Int -> ReadS DescribeReplicationSubnetGroups
Prelude.Read, Int -> DescribeReplicationSubnetGroups -> ShowS
[DescribeReplicationSubnetGroups] -> ShowS
DescribeReplicationSubnetGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReplicationSubnetGroups] -> ShowS
$cshowList :: [DescribeReplicationSubnetGroups] -> ShowS
show :: DescribeReplicationSubnetGroups -> String
$cshow :: DescribeReplicationSubnetGroups -> String
showsPrec :: Int -> DescribeReplicationSubnetGroups -> ShowS
$cshowsPrec :: Int -> DescribeReplicationSubnetGroups -> ShowS
Prelude.Show, forall x.
Rep DescribeReplicationSubnetGroups x
-> DescribeReplicationSubnetGroups
forall x.
DescribeReplicationSubnetGroups
-> Rep DescribeReplicationSubnetGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReplicationSubnetGroups x
-> DescribeReplicationSubnetGroups
$cfrom :: forall x.
DescribeReplicationSubnetGroups
-> Rep DescribeReplicationSubnetGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReplicationSubnetGroups' 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:
--
-- 'filters', 'describeReplicationSubnetGroups_filters' - Filters applied to replication subnet groups.
--
-- Valid filter names: replication-subnet-group-id
--
-- 'marker', 'describeReplicationSubnetGroups_marker' - An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
--
-- 'maxRecords', 'describeReplicationSubnetGroups_maxRecords' - The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a pagination token
-- called a marker is included in the response so that the remaining
-- results can be retrieved.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
newDescribeReplicationSubnetGroups ::
  DescribeReplicationSubnetGroups
newDescribeReplicationSubnetGroups :: DescribeReplicationSubnetGroups
newDescribeReplicationSubnetGroups =
  DescribeReplicationSubnetGroups'
    { $sel:filters:DescribeReplicationSubnetGroups' :: Maybe [Filter]
filters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeReplicationSubnetGroups' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeReplicationSubnetGroups' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing
    }

-- | Filters applied to replication subnet groups.
--
-- Valid filter names: replication-subnet-group-id
describeReplicationSubnetGroups_filters :: Lens.Lens' DescribeReplicationSubnetGroups (Prelude.Maybe [Filter])
describeReplicationSubnetGroups_filters :: Lens' DescribeReplicationSubnetGroups (Maybe [Filter])
describeReplicationSubnetGroups_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationSubnetGroups' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeReplicationSubnetGroups
s@DescribeReplicationSubnetGroups' {} Maybe [Filter]
a -> DescribeReplicationSubnetGroups
s {$sel:filters:DescribeReplicationSubnetGroups' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeReplicationSubnetGroups) 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

-- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
describeReplicationSubnetGroups_marker :: Lens.Lens' DescribeReplicationSubnetGroups (Prelude.Maybe Prelude.Text)
describeReplicationSubnetGroups_marker :: Lens' DescribeReplicationSubnetGroups (Maybe Text)
describeReplicationSubnetGroups_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationSubnetGroups' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReplicationSubnetGroups
s@DescribeReplicationSubnetGroups' {} Maybe Text
a -> DescribeReplicationSubnetGroups
s {$sel:marker:DescribeReplicationSubnetGroups' :: Maybe Text
marker = Maybe Text
a} :: DescribeReplicationSubnetGroups)

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

instance
  Core.AWSPager
    DescribeReplicationSubnetGroups
  where
  page :: DescribeReplicationSubnetGroups
-> AWSResponse DescribeReplicationSubnetGroups
-> Maybe DescribeReplicationSubnetGroups
page DescribeReplicationSubnetGroups
rq AWSResponse DescribeReplicationSubnetGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeReplicationSubnetGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReplicationSubnetGroupsResponse (Maybe Text)
describeReplicationSubnetGroupsResponse_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 DescribeReplicationSubnetGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeReplicationSubnetGroupsResponse
  (Maybe [ReplicationSubnetGroup])
describeReplicationSubnetGroupsResponse_replicationSubnetGroups
            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.$ DescribeReplicationSubnetGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeReplicationSubnetGroups (Maybe Text)
describeReplicationSubnetGroups_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeReplicationSubnetGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReplicationSubnetGroupsResponse (Maybe Text)
describeReplicationSubnetGroupsResponse_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
    DescribeReplicationSubnetGroups
  where
  type
    AWSResponse DescribeReplicationSubnetGroups =
      DescribeReplicationSubnetGroupsResponse
  request :: (Service -> Service)
-> DescribeReplicationSubnetGroups
-> Request DescribeReplicationSubnetGroups
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeReplicationSubnetGroups
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeReplicationSubnetGroups)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [ReplicationSubnetGroup]
-> Int
-> DescribeReplicationSubnetGroupsResponse
DescribeReplicationSubnetGroupsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ReplicationSubnetGroups"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            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
    DescribeReplicationSubnetGroups
  where
  hashWithSalt :: Int -> DescribeReplicationSubnetGroups -> Int
hashWithSalt
    Int
_salt
    DescribeReplicationSubnetGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
$sel:maxRecords:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe Int
$sel:marker:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe Text
$sel:filters:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe [Filter]
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords

instance
  Prelude.NFData
    DescribeReplicationSubnetGroups
  where
  rnf :: DescribeReplicationSubnetGroups -> ()
rnf DescribeReplicationSubnetGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
$sel:maxRecords:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe Int
$sel:marker:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe Text
$sel:filters:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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

instance
  Data.ToHeaders
    DescribeReplicationSubnetGroups
  where
  toHeaders :: DescribeReplicationSubnetGroups -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AmazonDMSv20160101.DescribeReplicationSubnetGroups" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DescribeReplicationSubnetGroups where
  toJSON :: DescribeReplicationSubnetGroups -> Value
toJSON DescribeReplicationSubnetGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
$sel:maxRecords:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe Int
$sel:marker:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe Text
$sel:filters:DescribeReplicationSubnetGroups' :: DescribeReplicationSubnetGroups -> Maybe [Filter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Key
"Marker" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
marker,
            (Key
"MaxRecords" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxRecords
          ]
      )

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

instance Data.ToQuery DescribeReplicationSubnetGroups where
  toQuery :: DescribeReplicationSubnetGroups -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- |
--
-- /See:/ 'newDescribeReplicationSubnetGroupsResponse' smart constructor.
data DescribeReplicationSubnetGroupsResponse = DescribeReplicationSubnetGroupsResponse'
  { -- | An optional pagination token provided by a previous request. If this
    -- parameter is specified, the response includes only records beyond the
    -- marker, up to the value specified by @MaxRecords@.
    DescribeReplicationSubnetGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A description of the replication subnet groups.
    DescribeReplicationSubnetGroupsResponse
-> Maybe [ReplicationSubnetGroup]
replicationSubnetGroups :: Prelude.Maybe [ReplicationSubnetGroup],
    -- | The response's http status code.
    DescribeReplicationSubnetGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeReplicationSubnetGroupsResponse
-> DescribeReplicationSubnetGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReplicationSubnetGroupsResponse
-> DescribeReplicationSubnetGroupsResponse -> Bool
$c/= :: DescribeReplicationSubnetGroupsResponse
-> DescribeReplicationSubnetGroupsResponse -> Bool
== :: DescribeReplicationSubnetGroupsResponse
-> DescribeReplicationSubnetGroupsResponse -> Bool
$c== :: DescribeReplicationSubnetGroupsResponse
-> DescribeReplicationSubnetGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeReplicationSubnetGroupsResponse]
ReadPrec DescribeReplicationSubnetGroupsResponse
Int -> ReadS DescribeReplicationSubnetGroupsResponse
ReadS [DescribeReplicationSubnetGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReplicationSubnetGroupsResponse]
$creadListPrec :: ReadPrec [DescribeReplicationSubnetGroupsResponse]
readPrec :: ReadPrec DescribeReplicationSubnetGroupsResponse
$creadPrec :: ReadPrec DescribeReplicationSubnetGroupsResponse
readList :: ReadS [DescribeReplicationSubnetGroupsResponse]
$creadList :: ReadS [DescribeReplicationSubnetGroupsResponse]
readsPrec :: Int -> ReadS DescribeReplicationSubnetGroupsResponse
$creadsPrec :: Int -> ReadS DescribeReplicationSubnetGroupsResponse
Prelude.Read, Int -> DescribeReplicationSubnetGroupsResponse -> ShowS
[DescribeReplicationSubnetGroupsResponse] -> ShowS
DescribeReplicationSubnetGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReplicationSubnetGroupsResponse] -> ShowS
$cshowList :: [DescribeReplicationSubnetGroupsResponse] -> ShowS
show :: DescribeReplicationSubnetGroupsResponse -> String
$cshow :: DescribeReplicationSubnetGroupsResponse -> String
showsPrec :: Int -> DescribeReplicationSubnetGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeReplicationSubnetGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeReplicationSubnetGroupsResponse x
-> DescribeReplicationSubnetGroupsResponse
forall x.
DescribeReplicationSubnetGroupsResponse
-> Rep DescribeReplicationSubnetGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReplicationSubnetGroupsResponse x
-> DescribeReplicationSubnetGroupsResponse
$cfrom :: forall x.
DescribeReplicationSubnetGroupsResponse
-> Rep DescribeReplicationSubnetGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeReplicationSubnetGroupsResponse' 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', 'describeReplicationSubnetGroupsResponse_marker' - An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
--
-- 'replicationSubnetGroups', 'describeReplicationSubnetGroupsResponse_replicationSubnetGroups' - A description of the replication subnet groups.
--
-- 'httpStatus', 'describeReplicationSubnetGroupsResponse_httpStatus' - The response's http status code.
newDescribeReplicationSubnetGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeReplicationSubnetGroupsResponse
newDescribeReplicationSubnetGroupsResponse :: Int -> DescribeReplicationSubnetGroupsResponse
newDescribeReplicationSubnetGroupsResponse
  Int
pHttpStatus_ =
    DescribeReplicationSubnetGroupsResponse'
      { $sel:marker:DescribeReplicationSubnetGroupsResponse' :: Maybe Text
marker =
          forall a. Maybe a
Prelude.Nothing,
        $sel:replicationSubnetGroups:DescribeReplicationSubnetGroupsResponse' :: Maybe [ReplicationSubnetGroup]
replicationSubnetGroups =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeReplicationSubnetGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
describeReplicationSubnetGroupsResponse_marker :: Lens.Lens' DescribeReplicationSubnetGroupsResponse (Prelude.Maybe Prelude.Text)
describeReplicationSubnetGroupsResponse_marker :: Lens' DescribeReplicationSubnetGroupsResponse (Maybe Text)
describeReplicationSubnetGroupsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationSubnetGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReplicationSubnetGroupsResponse' :: DescribeReplicationSubnetGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReplicationSubnetGroupsResponse
s@DescribeReplicationSubnetGroupsResponse' {} Maybe Text
a -> DescribeReplicationSubnetGroupsResponse
s {$sel:marker:DescribeReplicationSubnetGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeReplicationSubnetGroupsResponse)

-- | A description of the replication subnet groups.
describeReplicationSubnetGroupsResponse_replicationSubnetGroups :: Lens.Lens' DescribeReplicationSubnetGroupsResponse (Prelude.Maybe [ReplicationSubnetGroup])
describeReplicationSubnetGroupsResponse_replicationSubnetGroups :: Lens'
  DescribeReplicationSubnetGroupsResponse
  (Maybe [ReplicationSubnetGroup])
describeReplicationSubnetGroupsResponse_replicationSubnetGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationSubnetGroupsResponse' {Maybe [ReplicationSubnetGroup]
replicationSubnetGroups :: Maybe [ReplicationSubnetGroup]
$sel:replicationSubnetGroups:DescribeReplicationSubnetGroupsResponse' :: DescribeReplicationSubnetGroupsResponse
-> Maybe [ReplicationSubnetGroup]
replicationSubnetGroups} -> Maybe [ReplicationSubnetGroup]
replicationSubnetGroups) (\s :: DescribeReplicationSubnetGroupsResponse
s@DescribeReplicationSubnetGroupsResponse' {} Maybe [ReplicationSubnetGroup]
a -> DescribeReplicationSubnetGroupsResponse
s {$sel:replicationSubnetGroups:DescribeReplicationSubnetGroupsResponse' :: Maybe [ReplicationSubnetGroup]
replicationSubnetGroups = Maybe [ReplicationSubnetGroup]
a} :: DescribeReplicationSubnetGroupsResponse) 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.
describeReplicationSubnetGroupsResponse_httpStatus :: Lens.Lens' DescribeReplicationSubnetGroupsResponse Prelude.Int
describeReplicationSubnetGroupsResponse_httpStatus :: Lens' DescribeReplicationSubnetGroupsResponse Int
describeReplicationSubnetGroupsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReplicationSubnetGroupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeReplicationSubnetGroupsResponse' :: DescribeReplicationSubnetGroupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeReplicationSubnetGroupsResponse
s@DescribeReplicationSubnetGroupsResponse' {} Int
a -> DescribeReplicationSubnetGroupsResponse
s {$sel:httpStatus:DescribeReplicationSubnetGroupsResponse' :: Int
httpStatus = Int
a} :: DescribeReplicationSubnetGroupsResponse)

instance
  Prelude.NFData
    DescribeReplicationSubnetGroupsResponse
  where
  rnf :: DescribeReplicationSubnetGroupsResponse -> ()
rnf DescribeReplicationSubnetGroupsResponse' {Int
Maybe [ReplicationSubnetGroup]
Maybe Text
httpStatus :: Int
replicationSubnetGroups :: Maybe [ReplicationSubnetGroup]
marker :: Maybe Text
$sel:httpStatus:DescribeReplicationSubnetGroupsResponse' :: DescribeReplicationSubnetGroupsResponse -> Int
$sel:replicationSubnetGroups:DescribeReplicationSubnetGroupsResponse' :: DescribeReplicationSubnetGroupsResponse
-> Maybe [ReplicationSubnetGroup]
$sel:marker:DescribeReplicationSubnetGroupsResponse' :: DescribeReplicationSubnetGroupsResponse -> 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 [ReplicationSubnetGroup]
replicationSubnetGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus