{-# 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.RDS.DescribeDBSubnetGroups
-- 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 a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is
-- specified, the list will contain only the descriptions of the specified
-- DBSubnetGroup.
--
-- For an overview of CIDR ranges, go to the
-- <http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing Wikipedia Tutorial>.
--
-- This operation returns paginated results.
module Amazonka.RDS.DescribeDBSubnetGroups
  ( -- * Creating a Request
    DescribeDBSubnetGroups (..),
    newDescribeDBSubnetGroups,

    -- * Request Lenses
    describeDBSubnetGroups_dbSubnetGroupName,
    describeDBSubnetGroups_filters,
    describeDBSubnetGroups_marker,
    describeDBSubnetGroups_maxRecords,

    -- * Destructuring the Response
    DescribeDBSubnetGroupsResponse (..),
    newDescribeDBSubnetGroupsResponse,

    -- * Response Lenses
    describeDBSubnetGroupsResponse_dbSubnetGroups,
    describeDBSubnetGroupsResponse_marker,
    describeDBSubnetGroupsResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newDescribeDBSubnetGroups' smart constructor.
data DescribeDBSubnetGroups = DescribeDBSubnetGroups'
  { -- | The name of the DB subnet group to return details for.
    DescribeDBSubnetGroups -> Maybe Text
dbSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | This parameter isn\'t currently supported.
    DescribeDBSubnetGroups -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | An optional pagination token provided by a previous
    -- DescribeDBSubnetGroups request. If this parameter is specified, the
    -- response includes only records beyond the marker, up to the value
    -- specified by @MaxRecords@.
    DescribeDBSubnetGroups -> 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 you can retrieve the
    -- remaining results.
    --
    -- Default: 100
    --
    -- Constraints: Minimum 20, maximum 100.
    DescribeDBSubnetGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeDBSubnetGroups -> DescribeDBSubnetGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBSubnetGroups -> DescribeDBSubnetGroups -> Bool
$c/= :: DescribeDBSubnetGroups -> DescribeDBSubnetGroups -> Bool
== :: DescribeDBSubnetGroups -> DescribeDBSubnetGroups -> Bool
$c== :: DescribeDBSubnetGroups -> DescribeDBSubnetGroups -> Bool
Prelude.Eq, ReadPrec [DescribeDBSubnetGroups]
ReadPrec DescribeDBSubnetGroups
Int -> ReadS DescribeDBSubnetGroups
ReadS [DescribeDBSubnetGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBSubnetGroups]
$creadListPrec :: ReadPrec [DescribeDBSubnetGroups]
readPrec :: ReadPrec DescribeDBSubnetGroups
$creadPrec :: ReadPrec DescribeDBSubnetGroups
readList :: ReadS [DescribeDBSubnetGroups]
$creadList :: ReadS [DescribeDBSubnetGroups]
readsPrec :: Int -> ReadS DescribeDBSubnetGroups
$creadsPrec :: Int -> ReadS DescribeDBSubnetGroups
Prelude.Read, Int -> DescribeDBSubnetGroups -> ShowS
[DescribeDBSubnetGroups] -> ShowS
DescribeDBSubnetGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBSubnetGroups] -> ShowS
$cshowList :: [DescribeDBSubnetGroups] -> ShowS
show :: DescribeDBSubnetGroups -> String
$cshow :: DescribeDBSubnetGroups -> String
showsPrec :: Int -> DescribeDBSubnetGroups -> ShowS
$cshowsPrec :: Int -> DescribeDBSubnetGroups -> ShowS
Prelude.Show, forall x. Rep DescribeDBSubnetGroups x -> DescribeDBSubnetGroups
forall x. DescribeDBSubnetGroups -> Rep DescribeDBSubnetGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDBSubnetGroups x -> DescribeDBSubnetGroups
$cfrom :: forall x. DescribeDBSubnetGroups -> Rep DescribeDBSubnetGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDBSubnetGroups' 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:
--
-- 'dbSubnetGroupName', 'describeDBSubnetGroups_dbSubnetGroupName' - The name of the DB subnet group to return details for.
--
-- 'filters', 'describeDBSubnetGroups_filters' - This parameter isn\'t currently supported.
--
-- 'marker', 'describeDBSubnetGroups_marker' - An optional pagination token provided by a previous
-- DescribeDBSubnetGroups request. If this parameter is specified, the
-- response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@.
--
-- 'maxRecords', 'describeDBSubnetGroups_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 you can retrieve the
-- remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
newDescribeDBSubnetGroups ::
  DescribeDBSubnetGroups
newDescribeDBSubnetGroups :: DescribeDBSubnetGroups
newDescribeDBSubnetGroups =
  DescribeDBSubnetGroups'
    { $sel:dbSubnetGroupName:DescribeDBSubnetGroups' :: Maybe Text
dbSubnetGroupName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeDBSubnetGroups' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeDBSubnetGroups' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeDBSubnetGroups' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the DB subnet group to return details for.
describeDBSubnetGroups_dbSubnetGroupName :: Lens.Lens' DescribeDBSubnetGroups (Prelude.Maybe Prelude.Text)
describeDBSubnetGroups_dbSubnetGroupName :: Lens' DescribeDBSubnetGroups (Maybe Text)
describeDBSubnetGroups_dbSubnetGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSubnetGroups' {Maybe Text
dbSubnetGroupName :: Maybe Text
$sel:dbSubnetGroupName:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Text
dbSubnetGroupName} -> Maybe Text
dbSubnetGroupName) (\s :: DescribeDBSubnetGroups
s@DescribeDBSubnetGroups' {} Maybe Text
a -> DescribeDBSubnetGroups
s {$sel:dbSubnetGroupName:DescribeDBSubnetGroups' :: Maybe Text
dbSubnetGroupName = Maybe Text
a} :: DescribeDBSubnetGroups)

-- | This parameter isn\'t currently supported.
describeDBSubnetGroups_filters :: Lens.Lens' DescribeDBSubnetGroups (Prelude.Maybe [Filter])
describeDBSubnetGroups_filters :: Lens' DescribeDBSubnetGroups (Maybe [Filter])
describeDBSubnetGroups_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSubnetGroups' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeDBSubnetGroups
s@DescribeDBSubnetGroups' {} Maybe [Filter]
a -> DescribeDBSubnetGroups
s {$sel:filters:DescribeDBSubnetGroups' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeDBSubnetGroups) 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
-- DescribeDBSubnetGroups request. If this parameter is specified, the
-- response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@.
describeDBSubnetGroups_marker :: Lens.Lens' DescribeDBSubnetGroups (Prelude.Maybe Prelude.Text)
describeDBSubnetGroups_marker :: Lens' DescribeDBSubnetGroups (Maybe Text)
describeDBSubnetGroups_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSubnetGroups' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDBSubnetGroups
s@DescribeDBSubnetGroups' {} Maybe Text
a -> DescribeDBSubnetGroups
s {$sel:marker:DescribeDBSubnetGroups' :: Maybe Text
marker = Maybe Text
a} :: DescribeDBSubnetGroups)

-- | 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 you can retrieve the
-- remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
describeDBSubnetGroups_maxRecords :: Lens.Lens' DescribeDBSubnetGroups (Prelude.Maybe Prelude.Int)
describeDBSubnetGroups_maxRecords :: Lens' DescribeDBSubnetGroups (Maybe Int)
describeDBSubnetGroups_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSubnetGroups' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeDBSubnetGroups
s@DescribeDBSubnetGroups' {} Maybe Int
a -> DescribeDBSubnetGroups
s {$sel:maxRecords:DescribeDBSubnetGroups' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeDBSubnetGroups)

instance Core.AWSPager DescribeDBSubnetGroups where
  page :: DescribeDBSubnetGroups
-> AWSResponse DescribeDBSubnetGroups
-> Maybe DescribeDBSubnetGroups
page DescribeDBSubnetGroups
rq AWSResponse DescribeDBSubnetGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDBSubnetGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeDBSubnetGroupsResponse (Maybe Text)
describeDBSubnetGroupsResponse_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 DescribeDBSubnetGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeDBSubnetGroupsResponse (Maybe [DBSubnetGroup])
describeDBSubnetGroupsResponse_dbSubnetGroups
            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.$ DescribeDBSubnetGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeDBSubnetGroups (Maybe Text)
describeDBSubnetGroups_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDBSubnetGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeDBSubnetGroupsResponse (Maybe Text)
describeDBSubnetGroupsResponse_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 DescribeDBSubnetGroups where
  type
    AWSResponse DescribeDBSubnetGroups =
      DescribeDBSubnetGroupsResponse
  request :: (Service -> Service)
-> DescribeDBSubnetGroups -> Request DescribeDBSubnetGroups
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 DescribeDBSubnetGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDBSubnetGroups)))
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
"DescribeDBSubnetGroupsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [DBSubnetGroup]
-> Maybe Text -> Int -> DescribeDBSubnetGroupsResponse
DescribeDBSubnetGroupsResponse'
            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
"DBSubnetGroups"
                            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
"DBSubnetGroup")
                        )
            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
"Marker")
            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 DescribeDBSubnetGroups where
  hashWithSalt :: Int -> DescribeDBSubnetGroups -> Int
hashWithSalt Int
_salt DescribeDBSubnetGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
dbSubnetGroupName :: Maybe Text
$sel:maxRecords:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Int
$sel:marker:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Text
$sel:filters:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe [Filter]
$sel:dbSubnetGroupName:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbSubnetGroupName
      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 DescribeDBSubnetGroups where
  rnf :: DescribeDBSubnetGroups -> ()
rnf DescribeDBSubnetGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
dbSubnetGroupName :: Maybe Text
$sel:maxRecords:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Int
$sel:marker:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Text
$sel:filters:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe [Filter]
$sel:dbSubnetGroupName:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbSubnetGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 DescribeDBSubnetGroups where
  toHeaders :: DescribeDBSubnetGroups -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery DescribeDBSubnetGroups where
  toQuery :: DescribeDBSubnetGroups -> QueryString
toQuery DescribeDBSubnetGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
dbSubnetGroupName :: Maybe Text
$sel:maxRecords:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Int
$sel:marker:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Text
$sel:filters:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe [Filter]
$sel:dbSubnetGroupName:DescribeDBSubnetGroups' :: DescribeDBSubnetGroups -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeDBSubnetGroups" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"DBSubnetGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
dbSubnetGroupName,
        ByteString
"Filters"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Filter" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        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
      ]

-- | Contains the result of a successful invocation of the
-- @DescribeDBSubnetGroups@ action.
--
-- /See:/ 'newDescribeDBSubnetGroupsResponse' smart constructor.
data DescribeDBSubnetGroupsResponse = DescribeDBSubnetGroupsResponse'
  { -- | A list of @DBSubnetGroup@ instances.
    DescribeDBSubnetGroupsResponse -> Maybe [DBSubnetGroup]
dbSubnetGroups :: Prelude.Maybe [DBSubnetGroup],
    -- | 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@.
    DescribeDBSubnetGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeDBSubnetGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDBSubnetGroupsResponse
-> DescribeDBSubnetGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBSubnetGroupsResponse
-> DescribeDBSubnetGroupsResponse -> Bool
$c/= :: DescribeDBSubnetGroupsResponse
-> DescribeDBSubnetGroupsResponse -> Bool
== :: DescribeDBSubnetGroupsResponse
-> DescribeDBSubnetGroupsResponse -> Bool
$c== :: DescribeDBSubnetGroupsResponse
-> DescribeDBSubnetGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDBSubnetGroupsResponse]
ReadPrec DescribeDBSubnetGroupsResponse
Int -> ReadS DescribeDBSubnetGroupsResponse
ReadS [DescribeDBSubnetGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBSubnetGroupsResponse]
$creadListPrec :: ReadPrec [DescribeDBSubnetGroupsResponse]
readPrec :: ReadPrec DescribeDBSubnetGroupsResponse
$creadPrec :: ReadPrec DescribeDBSubnetGroupsResponse
readList :: ReadS [DescribeDBSubnetGroupsResponse]
$creadList :: ReadS [DescribeDBSubnetGroupsResponse]
readsPrec :: Int -> ReadS DescribeDBSubnetGroupsResponse
$creadsPrec :: Int -> ReadS DescribeDBSubnetGroupsResponse
Prelude.Read, Int -> DescribeDBSubnetGroupsResponse -> ShowS
[DescribeDBSubnetGroupsResponse] -> ShowS
DescribeDBSubnetGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBSubnetGroupsResponse] -> ShowS
$cshowList :: [DescribeDBSubnetGroupsResponse] -> ShowS
show :: DescribeDBSubnetGroupsResponse -> String
$cshow :: DescribeDBSubnetGroupsResponse -> String
showsPrec :: Int -> DescribeDBSubnetGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDBSubnetGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeDBSubnetGroupsResponse x
-> DescribeDBSubnetGroupsResponse
forall x.
DescribeDBSubnetGroupsResponse
-> Rep DescribeDBSubnetGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBSubnetGroupsResponse x
-> DescribeDBSubnetGroupsResponse
$cfrom :: forall x.
DescribeDBSubnetGroupsResponse
-> Rep DescribeDBSubnetGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDBSubnetGroupsResponse' 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:
--
-- 'dbSubnetGroups', 'describeDBSubnetGroupsResponse_dbSubnetGroups' - A list of @DBSubnetGroup@ instances.
--
-- 'marker', 'describeDBSubnetGroupsResponse_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@.
--
-- 'httpStatus', 'describeDBSubnetGroupsResponse_httpStatus' - The response's http status code.
newDescribeDBSubnetGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDBSubnetGroupsResponse
newDescribeDBSubnetGroupsResponse :: Int -> DescribeDBSubnetGroupsResponse
newDescribeDBSubnetGroupsResponse Int
pHttpStatus_ =
  DescribeDBSubnetGroupsResponse'
    { $sel:dbSubnetGroups:DescribeDBSubnetGroupsResponse' :: Maybe [DBSubnetGroup]
dbSubnetGroups =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeDBSubnetGroupsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDBSubnetGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of @DBSubnetGroup@ instances.
describeDBSubnetGroupsResponse_dbSubnetGroups :: Lens.Lens' DescribeDBSubnetGroupsResponse (Prelude.Maybe [DBSubnetGroup])
describeDBSubnetGroupsResponse_dbSubnetGroups :: Lens' DescribeDBSubnetGroupsResponse (Maybe [DBSubnetGroup])
describeDBSubnetGroupsResponse_dbSubnetGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSubnetGroupsResponse' {Maybe [DBSubnetGroup]
dbSubnetGroups :: Maybe [DBSubnetGroup]
$sel:dbSubnetGroups:DescribeDBSubnetGroupsResponse' :: DescribeDBSubnetGroupsResponse -> Maybe [DBSubnetGroup]
dbSubnetGroups} -> Maybe [DBSubnetGroup]
dbSubnetGroups) (\s :: DescribeDBSubnetGroupsResponse
s@DescribeDBSubnetGroupsResponse' {} Maybe [DBSubnetGroup]
a -> DescribeDBSubnetGroupsResponse
s {$sel:dbSubnetGroups:DescribeDBSubnetGroupsResponse' :: Maybe [DBSubnetGroup]
dbSubnetGroups = Maybe [DBSubnetGroup]
a} :: DescribeDBSubnetGroupsResponse) 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@.
describeDBSubnetGroupsResponse_marker :: Lens.Lens' DescribeDBSubnetGroupsResponse (Prelude.Maybe Prelude.Text)
describeDBSubnetGroupsResponse_marker :: Lens' DescribeDBSubnetGroupsResponse (Maybe Text)
describeDBSubnetGroupsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSubnetGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDBSubnetGroupsResponse' :: DescribeDBSubnetGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDBSubnetGroupsResponse
s@DescribeDBSubnetGroupsResponse' {} Maybe Text
a -> DescribeDBSubnetGroupsResponse
s {$sel:marker:DescribeDBSubnetGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeDBSubnetGroupsResponse)

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

instance
  Prelude.NFData
    DescribeDBSubnetGroupsResponse
  where
  rnf :: DescribeDBSubnetGroupsResponse -> ()
rnf DescribeDBSubnetGroupsResponse' {Int
Maybe [DBSubnetGroup]
Maybe Text
httpStatus :: Int
marker :: Maybe Text
dbSubnetGroups :: Maybe [DBSubnetGroup]
$sel:httpStatus:DescribeDBSubnetGroupsResponse' :: DescribeDBSubnetGroupsResponse -> Int
$sel:marker:DescribeDBSubnetGroupsResponse' :: DescribeDBSubnetGroupsResponse -> Maybe Text
$sel:dbSubnetGroups:DescribeDBSubnetGroupsResponse' :: DescribeDBSubnetGroupsResponse -> Maybe [DBSubnetGroup]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [DBSubnetGroup]
dbSubnetGroups
      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 Int
httpStatus