{-# 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.MemoryDb.DescribeSubnetGroups
-- 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 subnet group descriptions. If a subnet group name is
-- specified, the list contains only the description of that group.
--
-- This operation returns paginated results.
module Amazonka.MemoryDb.DescribeSubnetGroups
  ( -- * Creating a Request
    DescribeSubnetGroups (..),
    newDescribeSubnetGroups,

    -- * Request Lenses
    describeSubnetGroups_maxResults,
    describeSubnetGroups_nextToken,
    describeSubnetGroups_subnetGroupName,

    -- * Destructuring the Response
    DescribeSubnetGroupsResponse (..),
    newDescribeSubnetGroupsResponse,

    -- * Response Lenses
    describeSubnetGroupsResponse_nextToken,
    describeSubnetGroupsResponse_subnetGroups,
    describeSubnetGroupsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeSubnetGroups' smart constructor.
data DescribeSubnetGroups = DescribeSubnetGroups'
  { -- | The maximum number of records to include in the response. If more
    -- records exist than the specified MaxResults value, a token is included
    -- in the response so that the remaining results can be retrieved.
    DescribeSubnetGroups -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | An optional argument to pass in case the total number of records exceeds
    -- the value of MaxResults. If nextToken is returned, there are more
    -- results available. The value of nextToken is a unique pagination token
    -- for each page. Make the call again using the returned token to retrieve
    -- the next page. Keep all other arguments unchanged.
    DescribeSubnetGroups -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the subnet group to return details for.
    DescribeSubnetGroups -> Maybe Text
subnetGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeSubnetGroups -> DescribeSubnetGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSubnetGroups -> DescribeSubnetGroups -> Bool
$c/= :: DescribeSubnetGroups -> DescribeSubnetGroups -> Bool
== :: DescribeSubnetGroups -> DescribeSubnetGroups -> Bool
$c== :: DescribeSubnetGroups -> DescribeSubnetGroups -> Bool
Prelude.Eq, ReadPrec [DescribeSubnetGroups]
ReadPrec DescribeSubnetGroups
Int -> ReadS DescribeSubnetGroups
ReadS [DescribeSubnetGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSubnetGroups]
$creadListPrec :: ReadPrec [DescribeSubnetGroups]
readPrec :: ReadPrec DescribeSubnetGroups
$creadPrec :: ReadPrec DescribeSubnetGroups
readList :: ReadS [DescribeSubnetGroups]
$creadList :: ReadS [DescribeSubnetGroups]
readsPrec :: Int -> ReadS DescribeSubnetGroups
$creadsPrec :: Int -> ReadS DescribeSubnetGroups
Prelude.Read, Int -> DescribeSubnetGroups -> ShowS
[DescribeSubnetGroups] -> ShowS
DescribeSubnetGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSubnetGroups] -> ShowS
$cshowList :: [DescribeSubnetGroups] -> ShowS
show :: DescribeSubnetGroups -> String
$cshow :: DescribeSubnetGroups -> String
showsPrec :: Int -> DescribeSubnetGroups -> ShowS
$cshowsPrec :: Int -> DescribeSubnetGroups -> ShowS
Prelude.Show, forall x. Rep DescribeSubnetGroups x -> DescribeSubnetGroups
forall x. DescribeSubnetGroups -> Rep DescribeSubnetGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeSubnetGroups x -> DescribeSubnetGroups
$cfrom :: forall x. DescribeSubnetGroups -> Rep DescribeSubnetGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSubnetGroups' 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:
--
-- 'maxResults', 'describeSubnetGroups_maxResults' - The maximum number of records to include in the response. If more
-- records exist than the specified MaxResults value, a token is included
-- in the response so that the remaining results can be retrieved.
--
-- 'nextToken', 'describeSubnetGroups_nextToken' - An optional argument to pass in case the total number of records exceeds
-- the value of MaxResults. If nextToken is returned, there are more
-- results available. The value of nextToken is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
--
-- 'subnetGroupName', 'describeSubnetGroups_subnetGroupName' - The name of the subnet group to return details for.
newDescribeSubnetGroups ::
  DescribeSubnetGroups
newDescribeSubnetGroups :: DescribeSubnetGroups
newDescribeSubnetGroups =
  DescribeSubnetGroups'
    { $sel:maxResults:DescribeSubnetGroups' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeSubnetGroups' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetGroupName:DescribeSubnetGroups' :: Maybe Text
subnetGroupName = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of records to include in the response. If more
-- records exist than the specified MaxResults value, a token is included
-- in the response so that the remaining results can be retrieved.
describeSubnetGroups_maxResults :: Lens.Lens' DescribeSubnetGroups (Prelude.Maybe Prelude.Int)
describeSubnetGroups_maxResults :: Lens' DescribeSubnetGroups (Maybe Int)
describeSubnetGroups_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSubnetGroups' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeSubnetGroups
s@DescribeSubnetGroups' {} Maybe Int
a -> DescribeSubnetGroups
s {$sel:maxResults:DescribeSubnetGroups' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeSubnetGroups)

-- | An optional argument to pass in case the total number of records exceeds
-- the value of MaxResults. If nextToken is returned, there are more
-- results available. The value of nextToken is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
describeSubnetGroups_nextToken :: Lens.Lens' DescribeSubnetGroups (Prelude.Maybe Prelude.Text)
describeSubnetGroups_nextToken :: Lens' DescribeSubnetGroups (Maybe Text)
describeSubnetGroups_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSubnetGroups' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeSubnetGroups
s@DescribeSubnetGroups' {} Maybe Text
a -> DescribeSubnetGroups
s {$sel:nextToken:DescribeSubnetGroups' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeSubnetGroups)

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

instance Core.AWSPager DescribeSubnetGroups where
  page :: DescribeSubnetGroups
-> AWSResponse DescribeSubnetGroups -> Maybe DescribeSubnetGroups
page DescribeSubnetGroups
rq AWSResponse DescribeSubnetGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeSubnetGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSubnetGroupsResponse (Maybe Text)
describeSubnetGroupsResponse_nextToken
            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 DescribeSubnetGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSubnetGroupsResponse (Maybe [SubnetGroup])
describeSubnetGroupsResponse_subnetGroups
            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.$ DescribeSubnetGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeSubnetGroups (Maybe Text)
describeSubnetGroups_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeSubnetGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeSubnetGroupsResponse (Maybe Text)
describeSubnetGroupsResponse_nextToken
          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 DescribeSubnetGroups where
  type
    AWSResponse DescribeSubnetGroups =
      DescribeSubnetGroupsResponse
  request :: (Service -> Service)
-> DescribeSubnetGroups -> Request DescribeSubnetGroups
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 DescribeSubnetGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSubnetGroups)))
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 [SubnetGroup] -> Int -> DescribeSubnetGroupsResponse
DescribeSubnetGroupsResponse'
            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
"NextToken")
            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
"SubnetGroups" 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 DescribeSubnetGroups where
  hashWithSalt :: Int -> DescribeSubnetGroups -> Int
hashWithSalt Int
_salt DescribeSubnetGroups' {Maybe Int
Maybe Text
subnetGroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:subnetGroupName:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Text
$sel:nextToken:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Text
$sel:maxResults:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetGroupName

instance Prelude.NFData DescribeSubnetGroups where
  rnf :: DescribeSubnetGroups -> ()
rnf DescribeSubnetGroups' {Maybe Int
Maybe Text
subnetGroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:subnetGroupName:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Text
$sel:nextToken:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Text
$sel:maxResults:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetGroupName

instance Data.ToHeaders DescribeSubnetGroups where
  toHeaders :: DescribeSubnetGroups -> 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
"AmazonMemoryDB.DescribeSubnetGroups" ::
                          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 DescribeSubnetGroups where
  toJSON :: DescribeSubnetGroups -> Value
toJSON DescribeSubnetGroups' {Maybe Int
Maybe Text
subnetGroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:subnetGroupName:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Text
$sel:nextToken:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Text
$sel:maxResults:DescribeSubnetGroups' :: DescribeSubnetGroups -> Maybe Int
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" 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
maxResults,
            (Key
"NextToken" 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
nextToken,
            (Key
"SubnetGroupName" 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
subnetGroupName
          ]
      )

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

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

-- | /See:/ 'newDescribeSubnetGroupsResponse' smart constructor.
data DescribeSubnetGroupsResponse = DescribeSubnetGroupsResponse'
  { -- | An optional argument to pass in case the total number of records exceeds
    -- the value of MaxResults. If nextToken is returned, there are more
    -- results available. The value of nextToken is a unique pagination token
    -- for each page. Make the call again using the returned token to retrieve
    -- the next page. Keep all other arguments unchanged.
    DescribeSubnetGroupsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of subnet groups. Each element in the list contains detailed
    -- information about one group.
    DescribeSubnetGroupsResponse -> Maybe [SubnetGroup]
subnetGroups :: Prelude.Maybe [SubnetGroup],
    -- | The response's http status code.
    DescribeSubnetGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSubnetGroupsResponse
-> DescribeSubnetGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSubnetGroupsResponse
-> DescribeSubnetGroupsResponse -> Bool
$c/= :: DescribeSubnetGroupsResponse
-> DescribeSubnetGroupsResponse -> Bool
== :: DescribeSubnetGroupsResponse
-> DescribeSubnetGroupsResponse -> Bool
$c== :: DescribeSubnetGroupsResponse
-> DescribeSubnetGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSubnetGroupsResponse]
ReadPrec DescribeSubnetGroupsResponse
Int -> ReadS DescribeSubnetGroupsResponse
ReadS [DescribeSubnetGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSubnetGroupsResponse]
$creadListPrec :: ReadPrec [DescribeSubnetGroupsResponse]
readPrec :: ReadPrec DescribeSubnetGroupsResponse
$creadPrec :: ReadPrec DescribeSubnetGroupsResponse
readList :: ReadS [DescribeSubnetGroupsResponse]
$creadList :: ReadS [DescribeSubnetGroupsResponse]
readsPrec :: Int -> ReadS DescribeSubnetGroupsResponse
$creadsPrec :: Int -> ReadS DescribeSubnetGroupsResponse
Prelude.Read, Int -> DescribeSubnetGroupsResponse -> ShowS
[DescribeSubnetGroupsResponse] -> ShowS
DescribeSubnetGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSubnetGroupsResponse] -> ShowS
$cshowList :: [DescribeSubnetGroupsResponse] -> ShowS
show :: DescribeSubnetGroupsResponse -> String
$cshow :: DescribeSubnetGroupsResponse -> String
showsPrec :: Int -> DescribeSubnetGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeSubnetGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeSubnetGroupsResponse x -> DescribeSubnetGroupsResponse
forall x.
DescribeSubnetGroupsResponse -> Rep DescribeSubnetGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSubnetGroupsResponse x -> DescribeSubnetGroupsResponse
$cfrom :: forall x.
DescribeSubnetGroupsResponse -> Rep DescribeSubnetGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSubnetGroupsResponse' 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:
--
-- 'nextToken', 'describeSubnetGroupsResponse_nextToken' - An optional argument to pass in case the total number of records exceeds
-- the value of MaxResults. If nextToken is returned, there are more
-- results available. The value of nextToken is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
--
-- 'subnetGroups', 'describeSubnetGroupsResponse_subnetGroups' - A list of subnet groups. Each element in the list contains detailed
-- information about one group.
--
-- 'httpStatus', 'describeSubnetGroupsResponse_httpStatus' - The response's http status code.
newDescribeSubnetGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSubnetGroupsResponse
newDescribeSubnetGroupsResponse :: Int -> DescribeSubnetGroupsResponse
newDescribeSubnetGroupsResponse Int
pHttpStatus_ =
  DescribeSubnetGroupsResponse'
    { $sel:nextToken:DescribeSubnetGroupsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:subnetGroups:DescribeSubnetGroupsResponse' :: Maybe [SubnetGroup]
subnetGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSubnetGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An optional argument to pass in case the total number of records exceeds
-- the value of MaxResults. If nextToken is returned, there are more
-- results available. The value of nextToken is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
describeSubnetGroupsResponse_nextToken :: Lens.Lens' DescribeSubnetGroupsResponse (Prelude.Maybe Prelude.Text)
describeSubnetGroupsResponse_nextToken :: Lens' DescribeSubnetGroupsResponse (Maybe Text)
describeSubnetGroupsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSubnetGroupsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeSubnetGroupsResponse' :: DescribeSubnetGroupsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeSubnetGroupsResponse
s@DescribeSubnetGroupsResponse' {} Maybe Text
a -> DescribeSubnetGroupsResponse
s {$sel:nextToken:DescribeSubnetGroupsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeSubnetGroupsResponse)

-- | A list of subnet groups. Each element in the list contains detailed
-- information about one group.
describeSubnetGroupsResponse_subnetGroups :: Lens.Lens' DescribeSubnetGroupsResponse (Prelude.Maybe [SubnetGroup])
describeSubnetGroupsResponse_subnetGroups :: Lens' DescribeSubnetGroupsResponse (Maybe [SubnetGroup])
describeSubnetGroupsResponse_subnetGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSubnetGroupsResponse' {Maybe [SubnetGroup]
subnetGroups :: Maybe [SubnetGroup]
$sel:subnetGroups:DescribeSubnetGroupsResponse' :: DescribeSubnetGroupsResponse -> Maybe [SubnetGroup]
subnetGroups} -> Maybe [SubnetGroup]
subnetGroups) (\s :: DescribeSubnetGroupsResponse
s@DescribeSubnetGroupsResponse' {} Maybe [SubnetGroup]
a -> DescribeSubnetGroupsResponse
s {$sel:subnetGroups:DescribeSubnetGroupsResponse' :: Maybe [SubnetGroup]
subnetGroups = Maybe [SubnetGroup]
a} :: DescribeSubnetGroupsResponse) 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.
describeSubnetGroupsResponse_httpStatus :: Lens.Lens' DescribeSubnetGroupsResponse Prelude.Int
describeSubnetGroupsResponse_httpStatus :: Lens' DescribeSubnetGroupsResponse Int
describeSubnetGroupsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSubnetGroupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeSubnetGroupsResponse' :: DescribeSubnetGroupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeSubnetGroupsResponse
s@DescribeSubnetGroupsResponse' {} Int
a -> DescribeSubnetGroupsResponse
s {$sel:httpStatus:DescribeSubnetGroupsResponse' :: Int
httpStatus = Int
a} :: DescribeSubnetGroupsResponse)

instance Prelude.NFData DescribeSubnetGroupsResponse where
  rnf :: DescribeSubnetGroupsResponse -> ()
rnf DescribeSubnetGroupsResponse' {Int
Maybe [SubnetGroup]
Maybe Text
httpStatus :: Int
subnetGroups :: Maybe [SubnetGroup]
nextToken :: Maybe Text
$sel:httpStatus:DescribeSubnetGroupsResponse' :: DescribeSubnetGroupsResponse -> Int
$sel:subnetGroups:DescribeSubnetGroupsResponse' :: DescribeSubnetGroupsResponse -> Maybe [SubnetGroup]
$sel:nextToken:DescribeSubnetGroupsResponse' :: DescribeSubnetGroupsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SubnetGroup]
subnetGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus