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

    -- * Request Lenses
    describeParameterGroups_maxResults,
    describeParameterGroups_nextToken,
    describeParameterGroups_parameterGroupName,

    -- * Destructuring the Response
    DescribeParameterGroupsResponse (..),
    newDescribeParameterGroupsResponse,

    -- * Response Lenses
    describeParameterGroupsResponse_nextToken,
    describeParameterGroupsResponse_parameterGroups,
    describeParameterGroupsResponse_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:/ 'newDescribeParameterGroups' smart constructor.
data DescribeParameterGroups = DescribeParameterGroups'
  { -- | 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.
    DescribeParameterGroups -> 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.
    DescribeParameterGroups -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of a specific parameter group to return details for.
    DescribeParameterGroups -> Maybe Text
parameterGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeParameterGroups -> DescribeParameterGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeParameterGroups -> DescribeParameterGroups -> Bool
$c/= :: DescribeParameterGroups -> DescribeParameterGroups -> Bool
== :: DescribeParameterGroups -> DescribeParameterGroups -> Bool
$c== :: DescribeParameterGroups -> DescribeParameterGroups -> Bool
Prelude.Eq, ReadPrec [DescribeParameterGroups]
ReadPrec DescribeParameterGroups
Int -> ReadS DescribeParameterGroups
ReadS [DescribeParameterGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeParameterGroups]
$creadListPrec :: ReadPrec [DescribeParameterGroups]
readPrec :: ReadPrec DescribeParameterGroups
$creadPrec :: ReadPrec DescribeParameterGroups
readList :: ReadS [DescribeParameterGroups]
$creadList :: ReadS [DescribeParameterGroups]
readsPrec :: Int -> ReadS DescribeParameterGroups
$creadsPrec :: Int -> ReadS DescribeParameterGroups
Prelude.Read, Int -> DescribeParameterGroups -> ShowS
[DescribeParameterGroups] -> ShowS
DescribeParameterGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeParameterGroups] -> ShowS
$cshowList :: [DescribeParameterGroups] -> ShowS
show :: DescribeParameterGroups -> String
$cshow :: DescribeParameterGroups -> String
showsPrec :: Int -> DescribeParameterGroups -> ShowS
$cshowsPrec :: Int -> DescribeParameterGroups -> ShowS
Prelude.Show, forall x. Rep DescribeParameterGroups x -> DescribeParameterGroups
forall x. DescribeParameterGroups -> Rep DescribeParameterGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeParameterGroups x -> DescribeParameterGroups
$cfrom :: forall x. DescribeParameterGroups -> Rep DescribeParameterGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeParameterGroups' 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', 'describeParameterGroups_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', 'describeParameterGroups_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.
--
-- 'parameterGroupName', 'describeParameterGroups_parameterGroupName' - The name of a specific parameter group to return details for.
newDescribeParameterGroups ::
  DescribeParameterGroups
newDescribeParameterGroups :: DescribeParameterGroups
newDescribeParameterGroups =
  DescribeParameterGroups'
    { $sel:maxResults:DescribeParameterGroups' :: Maybe Int
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeParameterGroups' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupName:DescribeParameterGroups' :: Maybe Text
parameterGroupName = 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.
describeParameterGroups_maxResults :: Lens.Lens' DescribeParameterGroups (Prelude.Maybe Prelude.Int)
describeParameterGroups_maxResults :: Lens' DescribeParameterGroups (Maybe Int)
describeParameterGroups_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameterGroups' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeParameterGroups
s@DescribeParameterGroups' {} Maybe Int
a -> DescribeParameterGroups
s {$sel:maxResults:DescribeParameterGroups' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeParameterGroups)

-- | 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.
describeParameterGroups_nextToken :: Lens.Lens' DescribeParameterGroups (Prelude.Maybe Prelude.Text)
describeParameterGroups_nextToken :: Lens' DescribeParameterGroups (Maybe Text)
describeParameterGroups_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameterGroups' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeParameterGroups
s@DescribeParameterGroups' {} Maybe Text
a -> DescribeParameterGroups
s {$sel:nextToken:DescribeParameterGroups' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeParameterGroups)

-- | The name of a specific parameter group to return details for.
describeParameterGroups_parameterGroupName :: Lens.Lens' DescribeParameterGroups (Prelude.Maybe Prelude.Text)
describeParameterGroups_parameterGroupName :: Lens' DescribeParameterGroups (Maybe Text)
describeParameterGroups_parameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameterGroups' {Maybe Text
parameterGroupName :: Maybe Text
$sel:parameterGroupName:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Text
parameterGroupName} -> Maybe Text
parameterGroupName) (\s :: DescribeParameterGroups
s@DescribeParameterGroups' {} Maybe Text
a -> DescribeParameterGroups
s {$sel:parameterGroupName:DescribeParameterGroups' :: Maybe Text
parameterGroupName = Maybe Text
a} :: DescribeParameterGroups)

instance Core.AWSPager DescribeParameterGroups where
  page :: DescribeParameterGroups
-> AWSResponse DescribeParameterGroups
-> Maybe DescribeParameterGroups
page DescribeParameterGroups
rq AWSResponse DescribeParameterGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeParameterGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeParameterGroupsResponse (Maybe Text)
describeParameterGroupsResponse_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 DescribeParameterGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeParameterGroupsResponse (Maybe [ParameterGroup])
describeParameterGroupsResponse_parameterGroups
            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.$ DescribeParameterGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeParameterGroups (Maybe Text)
describeParameterGroups_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeParameterGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeParameterGroupsResponse (Maybe Text)
describeParameterGroupsResponse_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 DescribeParameterGroups where
  type
    AWSResponse DescribeParameterGroups =
      DescribeParameterGroupsResponse
  request :: (Service -> Service)
-> DescribeParameterGroups -> Request DescribeParameterGroups
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 DescribeParameterGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeParameterGroups)))
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 [ParameterGroup] -> Int -> DescribeParameterGroupsResponse
DescribeParameterGroupsResponse'
            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
"ParameterGroups"
                            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 DescribeParameterGroups where
  hashWithSalt :: Int -> DescribeParameterGroups -> Int
hashWithSalt Int
_salt DescribeParameterGroups' {Maybe Int
Maybe Text
parameterGroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:parameterGroupName:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Text
$sel:nextToken:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Text
$sel:maxResults:DescribeParameterGroups' :: DescribeParameterGroups -> 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
parameterGroupName

instance Prelude.NFData DescribeParameterGroups where
  rnf :: DescribeParameterGroups -> ()
rnf DescribeParameterGroups' {Maybe Int
Maybe Text
parameterGroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:parameterGroupName:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Text
$sel:nextToken:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Text
$sel:maxResults:DescribeParameterGroups' :: DescribeParameterGroups -> 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
parameterGroupName

instance Data.ToHeaders DescribeParameterGroups where
  toHeaders :: DescribeParameterGroups -> 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.DescribeParameterGroups" ::
                          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 DescribeParameterGroups where
  toJSON :: DescribeParameterGroups -> Value
toJSON DescribeParameterGroups' {Maybe Int
Maybe Text
parameterGroupName :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:parameterGroupName:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Text
$sel:nextToken:DescribeParameterGroups' :: DescribeParameterGroups -> Maybe Text
$sel:maxResults:DescribeParameterGroups' :: DescribeParameterGroups -> 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
"ParameterGroupName" 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
parameterGroupName
          ]
      )

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

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

-- | /See:/ 'newDescribeParameterGroupsResponse' smart constructor.
data DescribeParameterGroupsResponse = DescribeParameterGroupsResponse'
  { -- | 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.
    DescribeParameterGroupsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of parameter groups. Each element in the list contains detailed
    -- information about one parameter group.
    DescribeParameterGroupsResponse -> Maybe [ParameterGroup]
parameterGroups :: Prelude.Maybe [ParameterGroup],
    -- | The response's http status code.
    DescribeParameterGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeParameterGroupsResponse
-> DescribeParameterGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeParameterGroupsResponse
-> DescribeParameterGroupsResponse -> Bool
$c/= :: DescribeParameterGroupsResponse
-> DescribeParameterGroupsResponse -> Bool
== :: DescribeParameterGroupsResponse
-> DescribeParameterGroupsResponse -> Bool
$c== :: DescribeParameterGroupsResponse
-> DescribeParameterGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeParameterGroupsResponse]
ReadPrec DescribeParameterGroupsResponse
Int -> ReadS DescribeParameterGroupsResponse
ReadS [DescribeParameterGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeParameterGroupsResponse]
$creadListPrec :: ReadPrec [DescribeParameterGroupsResponse]
readPrec :: ReadPrec DescribeParameterGroupsResponse
$creadPrec :: ReadPrec DescribeParameterGroupsResponse
readList :: ReadS [DescribeParameterGroupsResponse]
$creadList :: ReadS [DescribeParameterGroupsResponse]
readsPrec :: Int -> ReadS DescribeParameterGroupsResponse
$creadsPrec :: Int -> ReadS DescribeParameterGroupsResponse
Prelude.Read, Int -> DescribeParameterGroupsResponse -> ShowS
[DescribeParameterGroupsResponse] -> ShowS
DescribeParameterGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeParameterGroupsResponse] -> ShowS
$cshowList :: [DescribeParameterGroupsResponse] -> ShowS
show :: DescribeParameterGroupsResponse -> String
$cshow :: DescribeParameterGroupsResponse -> String
showsPrec :: Int -> DescribeParameterGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeParameterGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeParameterGroupsResponse x
-> DescribeParameterGroupsResponse
forall x.
DescribeParameterGroupsResponse
-> Rep DescribeParameterGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeParameterGroupsResponse x
-> DescribeParameterGroupsResponse
$cfrom :: forall x.
DescribeParameterGroupsResponse
-> Rep DescribeParameterGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeParameterGroupsResponse' 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', 'describeParameterGroupsResponse_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.
--
-- 'parameterGroups', 'describeParameterGroupsResponse_parameterGroups' - A list of parameter groups. Each element in the list contains detailed
-- information about one parameter group.
--
-- 'httpStatus', 'describeParameterGroupsResponse_httpStatus' - The response's http status code.
newDescribeParameterGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeParameterGroupsResponse
newDescribeParameterGroupsResponse :: Int -> DescribeParameterGroupsResponse
newDescribeParameterGroupsResponse Int
pHttpStatus_ =
  DescribeParameterGroupsResponse'
    { $sel:nextToken:DescribeParameterGroupsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroups:DescribeParameterGroupsResponse' :: Maybe [ParameterGroup]
parameterGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeParameterGroupsResponse' :: 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.
describeParameterGroupsResponse_nextToken :: Lens.Lens' DescribeParameterGroupsResponse (Prelude.Maybe Prelude.Text)
describeParameterGroupsResponse_nextToken :: Lens' DescribeParameterGroupsResponse (Maybe Text)
describeParameterGroupsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameterGroupsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeParameterGroupsResponse' :: DescribeParameterGroupsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeParameterGroupsResponse
s@DescribeParameterGroupsResponse' {} Maybe Text
a -> DescribeParameterGroupsResponse
s {$sel:nextToken:DescribeParameterGroupsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeParameterGroupsResponse)

-- | A list of parameter groups. Each element in the list contains detailed
-- information about one parameter group.
describeParameterGroupsResponse_parameterGroups :: Lens.Lens' DescribeParameterGroupsResponse (Prelude.Maybe [ParameterGroup])
describeParameterGroupsResponse_parameterGroups :: Lens' DescribeParameterGroupsResponse (Maybe [ParameterGroup])
describeParameterGroupsResponse_parameterGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameterGroupsResponse' {Maybe [ParameterGroup]
parameterGroups :: Maybe [ParameterGroup]
$sel:parameterGroups:DescribeParameterGroupsResponse' :: DescribeParameterGroupsResponse -> Maybe [ParameterGroup]
parameterGroups} -> Maybe [ParameterGroup]
parameterGroups) (\s :: DescribeParameterGroupsResponse
s@DescribeParameterGroupsResponse' {} Maybe [ParameterGroup]
a -> DescribeParameterGroupsResponse
s {$sel:parameterGroups:DescribeParameterGroupsResponse' :: Maybe [ParameterGroup]
parameterGroups = Maybe [ParameterGroup]
a} :: DescribeParameterGroupsResponse) 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.
describeParameterGroupsResponse_httpStatus :: Lens.Lens' DescribeParameterGroupsResponse Prelude.Int
describeParameterGroupsResponse_httpStatus :: Lens' DescribeParameterGroupsResponse Int
describeParameterGroupsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameterGroupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeParameterGroupsResponse' :: DescribeParameterGroupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeParameterGroupsResponse
s@DescribeParameterGroupsResponse' {} Int
a -> DescribeParameterGroupsResponse
s {$sel:httpStatus:DescribeParameterGroupsResponse' :: Int
httpStatus = Int
a} :: DescribeParameterGroupsResponse)

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