{-# 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.DescribeDBParameterGroups
-- 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 @DBParameterGroup@ descriptions. If a
-- @DBParameterGroupName@ is specified, the list will contain only the
-- description of the specified DB parameter group.
--
-- This operation returns paginated results.
module Amazonka.RDS.DescribeDBParameterGroups
  ( -- * Creating a Request
    DescribeDBParameterGroups (..),
    newDescribeDBParameterGroups,

    -- * Request Lenses
    describeDBParameterGroups_dbParameterGroupName,
    describeDBParameterGroups_filters,
    describeDBParameterGroups_marker,
    describeDBParameterGroups_maxRecords,

    -- * Destructuring the Response
    DescribeDBParameterGroupsResponse (..),
    newDescribeDBParameterGroupsResponse,

    -- * Response Lenses
    describeDBParameterGroupsResponse_dbParameterGroups,
    describeDBParameterGroupsResponse_marker,
    describeDBParameterGroupsResponse_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:/ 'newDescribeDBParameterGroups' smart constructor.
data DescribeDBParameterGroups = DescribeDBParameterGroups'
  { -- | The name of a specific DB parameter group to return details for.
    --
    -- Constraints:
    --
    -- -   If supplied, must match the name of an existing
    --     DBClusterParameterGroup.
    DescribeDBParameterGroups -> Maybe Text
dbParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | This parameter isn\'t currently supported.
    DescribeDBParameterGroups -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | An optional pagination token provided by a previous
    -- @DescribeDBParameterGroups@ request. If this parameter is specified, the
    -- response includes only records beyond the marker, up to the value
    -- specified by @MaxRecords@.
    DescribeDBParameterGroups -> 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.
    DescribeDBParameterGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeDBParameterGroups -> DescribeDBParameterGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBParameterGroups -> DescribeDBParameterGroups -> Bool
$c/= :: DescribeDBParameterGroups -> DescribeDBParameterGroups -> Bool
== :: DescribeDBParameterGroups -> DescribeDBParameterGroups -> Bool
$c== :: DescribeDBParameterGroups -> DescribeDBParameterGroups -> Bool
Prelude.Eq, ReadPrec [DescribeDBParameterGroups]
ReadPrec DescribeDBParameterGroups
Int -> ReadS DescribeDBParameterGroups
ReadS [DescribeDBParameterGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBParameterGroups]
$creadListPrec :: ReadPrec [DescribeDBParameterGroups]
readPrec :: ReadPrec DescribeDBParameterGroups
$creadPrec :: ReadPrec DescribeDBParameterGroups
readList :: ReadS [DescribeDBParameterGroups]
$creadList :: ReadS [DescribeDBParameterGroups]
readsPrec :: Int -> ReadS DescribeDBParameterGroups
$creadsPrec :: Int -> ReadS DescribeDBParameterGroups
Prelude.Read, Int -> DescribeDBParameterGroups -> ShowS
[DescribeDBParameterGroups] -> ShowS
DescribeDBParameterGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBParameterGroups] -> ShowS
$cshowList :: [DescribeDBParameterGroups] -> ShowS
show :: DescribeDBParameterGroups -> String
$cshow :: DescribeDBParameterGroups -> String
showsPrec :: Int -> DescribeDBParameterGroups -> ShowS
$cshowsPrec :: Int -> DescribeDBParameterGroups -> ShowS
Prelude.Show, forall x.
Rep DescribeDBParameterGroups x -> DescribeDBParameterGroups
forall x.
DescribeDBParameterGroups -> Rep DescribeDBParameterGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBParameterGroups x -> DescribeDBParameterGroups
$cfrom :: forall x.
DescribeDBParameterGroups -> Rep DescribeDBParameterGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDBParameterGroups' 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:
--
-- 'dbParameterGroupName', 'describeDBParameterGroups_dbParameterGroupName' - The name of a specific DB parameter group to return details for.
--
-- Constraints:
--
-- -   If supplied, must match the name of an existing
--     DBClusterParameterGroup.
--
-- 'filters', 'describeDBParameterGroups_filters' - This parameter isn\'t currently supported.
--
-- 'marker', 'describeDBParameterGroups_marker' - An optional pagination token provided by a previous
-- @DescribeDBParameterGroups@ request. If this parameter is specified, the
-- response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@.
--
-- 'maxRecords', 'describeDBParameterGroups_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.
newDescribeDBParameterGroups ::
  DescribeDBParameterGroups
newDescribeDBParameterGroups :: DescribeDBParameterGroups
newDescribeDBParameterGroups =
  DescribeDBParameterGroups'
    { $sel:dbParameterGroupName:DescribeDBParameterGroups' :: Maybe Text
dbParameterGroupName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeDBParameterGroups' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeDBParameterGroups' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeDBParameterGroups' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of a specific DB parameter group to return details for.
--
-- Constraints:
--
-- -   If supplied, must match the name of an existing
--     DBClusterParameterGroup.
describeDBParameterGroups_dbParameterGroupName :: Lens.Lens' DescribeDBParameterGroups (Prelude.Maybe Prelude.Text)
describeDBParameterGroups_dbParameterGroupName :: Lens' DescribeDBParameterGroups (Maybe Text)
describeDBParameterGroups_dbParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBParameterGroups' {Maybe Text
dbParameterGroupName :: Maybe Text
$sel:dbParameterGroupName:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Text
dbParameterGroupName} -> Maybe Text
dbParameterGroupName) (\s :: DescribeDBParameterGroups
s@DescribeDBParameterGroups' {} Maybe Text
a -> DescribeDBParameterGroups
s {$sel:dbParameterGroupName:DescribeDBParameterGroups' :: Maybe Text
dbParameterGroupName = Maybe Text
a} :: DescribeDBParameterGroups)

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

-- | 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.
describeDBParameterGroups_maxRecords :: Lens.Lens' DescribeDBParameterGroups (Prelude.Maybe Prelude.Int)
describeDBParameterGroups_maxRecords :: Lens' DescribeDBParameterGroups (Maybe Int)
describeDBParameterGroups_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBParameterGroups' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeDBParameterGroups
s@DescribeDBParameterGroups' {} Maybe Int
a -> DescribeDBParameterGroups
s {$sel:maxRecords:DescribeDBParameterGroups' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeDBParameterGroups)

instance Core.AWSPager DescribeDBParameterGroups where
  page :: DescribeDBParameterGroups
-> AWSResponse DescribeDBParameterGroups
-> Maybe DescribeDBParameterGroups
page DescribeDBParameterGroups
rq AWSResponse DescribeDBParameterGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDBParameterGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeDBParameterGroupsResponse (Maybe Text)
describeDBParameterGroupsResponse_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 DescribeDBParameterGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeDBParameterGroupsResponse (Maybe [DBParameterGroup])
describeDBParameterGroupsResponse_dbParameterGroups
            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.$ DescribeDBParameterGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeDBParameterGroups (Maybe Text)
describeDBParameterGroups_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDBParameterGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeDBParameterGroupsResponse (Maybe Text)
describeDBParameterGroupsResponse_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 DescribeDBParameterGroups where
  type
    AWSResponse DescribeDBParameterGroups =
      DescribeDBParameterGroupsResponse
  request :: (Service -> Service)
-> DescribeDBParameterGroups -> Request DescribeDBParameterGroups
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 DescribeDBParameterGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDBParameterGroups)))
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
"DescribeDBParameterGroupsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [DBParameterGroup]
-> Maybe Text -> Int -> DescribeDBParameterGroupsResponse
DescribeDBParameterGroupsResponse'
            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
"DBParameterGroups"
                            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
"DBParameterGroup")
                        )
            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 DescribeDBParameterGroups where
  hashWithSalt :: Int -> DescribeDBParameterGroups -> Int
hashWithSalt Int
_salt DescribeDBParameterGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
dbParameterGroupName :: Maybe Text
$sel:maxRecords:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Int
$sel:marker:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Text
$sel:filters:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe [Filter]
$sel:dbParameterGroupName:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbParameterGroupName
      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 DescribeDBParameterGroups where
  rnf :: DescribeDBParameterGroups -> ()
rnf DescribeDBParameterGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
dbParameterGroupName :: Maybe Text
$sel:maxRecords:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Int
$sel:marker:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Text
$sel:filters:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe [Filter]
$sel:dbParameterGroupName:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbParameterGroupName
      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 DescribeDBParameterGroups where
  toHeaders :: DescribeDBParameterGroups -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery DescribeDBParameterGroups where
  toQuery :: DescribeDBParameterGroups -> QueryString
toQuery DescribeDBParameterGroups' {Maybe Int
Maybe [Filter]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
dbParameterGroupName :: Maybe Text
$sel:maxRecords:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Int
$sel:marker:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Text
$sel:filters:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe [Filter]
$sel:dbParameterGroupName:DescribeDBParameterGroups' :: DescribeDBParameterGroups -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeDBParameterGroups" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"DBParameterGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
dbParameterGroupName,
        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
-- @DescribeDBParameterGroups@ action.
--
-- /See:/ 'newDescribeDBParameterGroupsResponse' smart constructor.
data DescribeDBParameterGroupsResponse = DescribeDBParameterGroupsResponse'
  { -- | A list of @DBParameterGroup@ instances.
    DescribeDBParameterGroupsResponse -> Maybe [DBParameterGroup]
dbParameterGroups :: Prelude.Maybe [DBParameterGroup],
    -- | 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@.
    DescribeDBParameterGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeDBParameterGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDBParameterGroupsResponse
-> DescribeDBParameterGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBParameterGroupsResponse
-> DescribeDBParameterGroupsResponse -> Bool
$c/= :: DescribeDBParameterGroupsResponse
-> DescribeDBParameterGroupsResponse -> Bool
== :: DescribeDBParameterGroupsResponse
-> DescribeDBParameterGroupsResponse -> Bool
$c== :: DescribeDBParameterGroupsResponse
-> DescribeDBParameterGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDBParameterGroupsResponse]
ReadPrec DescribeDBParameterGroupsResponse
Int -> ReadS DescribeDBParameterGroupsResponse
ReadS [DescribeDBParameterGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBParameterGroupsResponse]
$creadListPrec :: ReadPrec [DescribeDBParameterGroupsResponse]
readPrec :: ReadPrec DescribeDBParameterGroupsResponse
$creadPrec :: ReadPrec DescribeDBParameterGroupsResponse
readList :: ReadS [DescribeDBParameterGroupsResponse]
$creadList :: ReadS [DescribeDBParameterGroupsResponse]
readsPrec :: Int -> ReadS DescribeDBParameterGroupsResponse
$creadsPrec :: Int -> ReadS DescribeDBParameterGroupsResponse
Prelude.Read, Int -> DescribeDBParameterGroupsResponse -> ShowS
[DescribeDBParameterGroupsResponse] -> ShowS
DescribeDBParameterGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBParameterGroupsResponse] -> ShowS
$cshowList :: [DescribeDBParameterGroupsResponse] -> ShowS
show :: DescribeDBParameterGroupsResponse -> String
$cshow :: DescribeDBParameterGroupsResponse -> String
showsPrec :: Int -> DescribeDBParameterGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDBParameterGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeDBParameterGroupsResponse x
-> DescribeDBParameterGroupsResponse
forall x.
DescribeDBParameterGroupsResponse
-> Rep DescribeDBParameterGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBParameterGroupsResponse x
-> DescribeDBParameterGroupsResponse
$cfrom :: forall x.
DescribeDBParameterGroupsResponse
-> Rep DescribeDBParameterGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDBParameterGroupsResponse' 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:
--
-- 'dbParameterGroups', 'describeDBParameterGroupsResponse_dbParameterGroups' - A list of @DBParameterGroup@ instances.
--
-- 'marker', 'describeDBParameterGroupsResponse_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', 'describeDBParameterGroupsResponse_httpStatus' - The response's http status code.
newDescribeDBParameterGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDBParameterGroupsResponse
newDescribeDBParameterGroupsResponse :: Int -> DescribeDBParameterGroupsResponse
newDescribeDBParameterGroupsResponse Int
pHttpStatus_ =
  DescribeDBParameterGroupsResponse'
    { $sel:dbParameterGroups:DescribeDBParameterGroupsResponse' :: Maybe [DBParameterGroup]
dbParameterGroups =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeDBParameterGroupsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDBParameterGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of @DBParameterGroup@ instances.
describeDBParameterGroupsResponse_dbParameterGroups :: Lens.Lens' DescribeDBParameterGroupsResponse (Prelude.Maybe [DBParameterGroup])
describeDBParameterGroupsResponse_dbParameterGroups :: Lens' DescribeDBParameterGroupsResponse (Maybe [DBParameterGroup])
describeDBParameterGroupsResponse_dbParameterGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBParameterGroupsResponse' {Maybe [DBParameterGroup]
dbParameterGroups :: Maybe [DBParameterGroup]
$sel:dbParameterGroups:DescribeDBParameterGroupsResponse' :: DescribeDBParameterGroupsResponse -> Maybe [DBParameterGroup]
dbParameterGroups} -> Maybe [DBParameterGroup]
dbParameterGroups) (\s :: DescribeDBParameterGroupsResponse
s@DescribeDBParameterGroupsResponse' {} Maybe [DBParameterGroup]
a -> DescribeDBParameterGroupsResponse
s {$sel:dbParameterGroups:DescribeDBParameterGroupsResponse' :: Maybe [DBParameterGroup]
dbParameterGroups = Maybe [DBParameterGroup]
a} :: DescribeDBParameterGroupsResponse) 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@.
describeDBParameterGroupsResponse_marker :: Lens.Lens' DescribeDBParameterGroupsResponse (Prelude.Maybe Prelude.Text)
describeDBParameterGroupsResponse_marker :: Lens' DescribeDBParameterGroupsResponse (Maybe Text)
describeDBParameterGroupsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBParameterGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDBParameterGroupsResponse' :: DescribeDBParameterGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDBParameterGroupsResponse
s@DescribeDBParameterGroupsResponse' {} Maybe Text
a -> DescribeDBParameterGroupsResponse
s {$sel:marker:DescribeDBParameterGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeDBParameterGroupsResponse)

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

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