{-# 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.DescribeDBClusterParameters
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the detailed parameter list for a particular DB cluster
-- parameter group.
--
-- For more information on Amazon Aurora, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html What Is Amazon Aurora?>
-- in the /Amazon Aurora User Guide./
--
-- This action only applies to Aurora DB clusters.
--
-- This operation returns paginated results.
module Amazonka.RDS.DescribeDBClusterParameters
  ( -- * Creating a Request
    DescribeDBClusterParameters (..),
    newDescribeDBClusterParameters,

    -- * Request Lenses
    describeDBClusterParameters_filters,
    describeDBClusterParameters_marker,
    describeDBClusterParameters_maxRecords,
    describeDBClusterParameters_source,
    describeDBClusterParameters_dbClusterParameterGroupName,

    -- * Destructuring the Response
    DescribeDBClusterParametersResponse (..),
    newDescribeDBClusterParametersResponse,

    -- * Response Lenses
    describeDBClusterParametersResponse_marker,
    describeDBClusterParametersResponse_parameters,
    describeDBClusterParametersResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'DescribeDBClusterParameters' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'filters', 'describeDBClusterParameters_filters' - This parameter isn\'t currently supported.
--
-- 'marker', 'describeDBClusterParameters_marker' - An optional pagination token provided by a previous
-- @DescribeDBClusterParameters@ request. If this parameter is specified,
-- the response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@.
--
-- 'maxRecords', 'describeDBClusterParameters_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 you can retrieve the
-- remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
--
-- 'source', 'describeDBClusterParameters_source' - A value that indicates to return only parameters for a specific source.
-- Parameter sources can be @engine@, @service@, or @customer@.
--
-- 'dbClusterParameterGroupName', 'describeDBClusterParameters_dbClusterParameterGroupName' - The name of a specific DB cluster parameter group to return parameter
-- details for.
--
-- Constraints:
--
-- -   If supplied, must match the name of an existing
--     DBClusterParameterGroup.
newDescribeDBClusterParameters ::
  -- | 'dbClusterParameterGroupName'
  Prelude.Text ->
  DescribeDBClusterParameters
newDescribeDBClusterParameters :: Text -> DescribeDBClusterParameters
newDescribeDBClusterParameters
  Text
pDBClusterParameterGroupName_ =
    DescribeDBClusterParameters' :: Maybe [Filter]
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Text
-> DescribeDBClusterParameters
DescribeDBClusterParameters'
      { $sel:filters:DescribeDBClusterParameters' :: Maybe [Filter]
filters =
          Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
        $sel:marker:DescribeDBClusterParameters' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxRecords:DescribeDBClusterParameters' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:source:DescribeDBClusterParameters' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dbClusterParameterGroupName:DescribeDBClusterParameters' :: Text
dbClusterParameterGroupName =
          Text
pDBClusterParameterGroupName_
      }

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

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

-- | A value that indicates to return only parameters for a specific source.
-- Parameter sources can be @engine@, @service@, or @customer@.
describeDBClusterParameters_source :: Lens.Lens' DescribeDBClusterParameters (Prelude.Maybe Prelude.Text)
describeDBClusterParameters_source :: (Maybe Text -> f (Maybe Text))
-> DescribeDBClusterParameters -> f DescribeDBClusterParameters
describeDBClusterParameters_source = (DescribeDBClusterParameters -> Maybe Text)
-> (DescribeDBClusterParameters
    -> Maybe Text -> DescribeDBClusterParameters)
-> Lens
     DescribeDBClusterParameters
     DescribeDBClusterParameters
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterParameters' {Maybe Text
source :: Maybe Text
$sel:source:DescribeDBClusterParameters' :: DescribeDBClusterParameters -> Maybe Text
source} -> Maybe Text
source) (\s :: DescribeDBClusterParameters
s@DescribeDBClusterParameters' {} Maybe Text
a -> DescribeDBClusterParameters
s {$sel:source:DescribeDBClusterParameters' :: Maybe Text
source = Maybe Text
a} :: DescribeDBClusterParameters)

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

instance Core.AWSPager DescribeDBClusterParameters where
  page :: DescribeDBClusterParameters
-> AWSResponse DescribeDBClusterParameters
-> Maybe DescribeDBClusterParameters
page DescribeDBClusterParameters
rq AWSResponse DescribeDBClusterParameters
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDBClusterParameters
DescribeDBClusterParametersResponse
rs
            DescribeDBClusterParametersResponse
-> Getting (First Text) DescribeDBClusterParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDBClusterParametersResponse
-> Const (First Text) DescribeDBClusterParametersResponse
Lens' DescribeDBClusterParametersResponse (Maybe Text)
describeDBClusterParametersResponse_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeDBClusterParametersResponse
 -> Const (First Text) DescribeDBClusterParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDBClusterParametersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeDBClusterParameters
forall a. Maybe a
Prelude.Nothing
    | Maybe [Parameter] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDBClusterParameters
DescribeDBClusterParametersResponse
rs
            DescribeDBClusterParametersResponse
-> Getting
     (First [Parameter]) DescribeDBClusterParametersResponse [Parameter]
-> Maybe [Parameter]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Parameter]
 -> Const (First [Parameter]) (Maybe [Parameter]))
-> DescribeDBClusterParametersResponse
-> Const (First [Parameter]) DescribeDBClusterParametersResponse
Lens' DescribeDBClusterParametersResponse (Maybe [Parameter])
describeDBClusterParametersResponse_parameters
              ((Maybe [Parameter]
  -> Const (First [Parameter]) (Maybe [Parameter]))
 -> DescribeDBClusterParametersResponse
 -> Const (First [Parameter]) DescribeDBClusterParametersResponse)
-> (([Parameter] -> Const (First [Parameter]) [Parameter])
    -> Maybe [Parameter]
    -> Const (First [Parameter]) (Maybe [Parameter]))
-> Getting
     (First [Parameter]) DescribeDBClusterParametersResponse [Parameter]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Parameter] -> Const (First [Parameter]) [Parameter])
-> Maybe [Parameter]
-> Const (First [Parameter]) (Maybe [Parameter])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeDBClusterParameters
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeDBClusterParameters -> Maybe DescribeDBClusterParameters
forall a. a -> Maybe a
Prelude.Just (DescribeDBClusterParameters -> Maybe DescribeDBClusterParameters)
-> DescribeDBClusterParameters -> Maybe DescribeDBClusterParameters
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeDBClusterParameters
rq
          DescribeDBClusterParameters
-> (DescribeDBClusterParameters -> DescribeDBClusterParameters)
-> DescribeDBClusterParameters
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeDBClusterParameters
-> Identity DescribeDBClusterParameters
Lens
  DescribeDBClusterParameters
  DescribeDBClusterParameters
  (Maybe Text)
  (Maybe Text)
describeDBClusterParameters_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeDBClusterParameters
 -> Identity DescribeDBClusterParameters)
-> Maybe Text
-> DescribeDBClusterParameters
-> DescribeDBClusterParameters
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDBClusterParameters
DescribeDBClusterParametersResponse
rs
          DescribeDBClusterParametersResponse
-> Getting (First Text) DescribeDBClusterParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDBClusterParametersResponse
-> Const (First Text) DescribeDBClusterParametersResponse
Lens' DescribeDBClusterParametersResponse (Maybe Text)
describeDBClusterParametersResponse_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeDBClusterParametersResponse
 -> Const (First Text) DescribeDBClusterParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDBClusterParametersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeDBClusterParameters where
  type
    AWSResponse DescribeDBClusterParameters =
      DescribeDBClusterParametersResponse
  request :: DescribeDBClusterParameters -> Request DescribeDBClusterParameters
request = Service
-> DescribeDBClusterParameters
-> Request DescribeDBClusterParameters
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDBClusterParameters
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDBClusterParameters)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeDBClusterParameters))
-> Logger
-> Service
-> Proxy DescribeDBClusterParameters
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDBClusterParameters)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeDBClusterParametersResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [Parameter] -> Int -> DescribeDBClusterParametersResponse
DescribeDBClusterParametersResponse'
            (Maybe Text
 -> Maybe [Parameter] -> Int -> DescribeDBClusterParametersResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Parameter] -> Int -> DescribeDBClusterParametersResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
            Either
  String
  (Maybe [Parameter] -> Int -> DescribeDBClusterParametersResponse)
-> Either String (Maybe [Parameter])
-> Either String (Int -> DescribeDBClusterParametersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Parameters" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Parameter]))
-> Either String (Maybe [Parameter])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Parameter])
-> [Node] -> Either String (Maybe [Parameter])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Parameter]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Parameter")
                        )
            Either String (Int -> DescribeDBClusterParametersResponse)
-> Either String Int
-> Either String DescribeDBClusterParametersResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeDBClusterParameters

instance Prelude.NFData DescribeDBClusterParameters

instance Core.ToHeaders DescribeDBClusterParameters where
  toHeaders :: DescribeDBClusterParameters -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeDBClusterParameters -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery DescribeDBClusterParameters where
  toQuery :: DescribeDBClusterParameters -> QueryString
toQuery DescribeDBClusterParameters' {Maybe Int
Maybe [Filter]
Maybe Text
Text
dbClusterParameterGroupName :: Text
source :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
filters :: Maybe [Filter]
$sel:dbClusterParameterGroupName:DescribeDBClusterParameters' :: DescribeDBClusterParameters -> Text
$sel:source:DescribeDBClusterParameters' :: DescribeDBClusterParameters -> Maybe Text
$sel:maxRecords:DescribeDBClusterParameters' :: DescribeDBClusterParameters -> Maybe Int
$sel:marker:DescribeDBClusterParameters' :: DescribeDBClusterParameters -> Maybe Text
$sel:filters:DescribeDBClusterParameters' :: DescribeDBClusterParameters -> Maybe [Filter]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeDBClusterParameters" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"Filters"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Filter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Filter" ([Filter] -> QueryString) -> Maybe [Filter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords,
        ByteString
"Source" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
source,
        ByteString
"DBClusterParameterGroupName"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dbClusterParameterGroupName
      ]

-- | Provides details about a DB cluster parameter group including the
-- parameters in the DB cluster parameter group.
--
-- /See:/ 'newDescribeDBClusterParametersResponse' smart constructor.
data DescribeDBClusterParametersResponse = DescribeDBClusterParametersResponse'
  { -- | An optional pagination token provided by a previous
    -- DescribeDBClusterParameters request. If this parameter is specified, the
    -- response includes only records beyond the marker, up to the value
    -- specified by @MaxRecords@ .
    DescribeDBClusterParametersResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Provides a list of parameters for the DB cluster parameter group.
    DescribeDBClusterParametersResponse -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | The response's http status code.
    DescribeDBClusterParametersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDBClusterParametersResponse
-> DescribeDBClusterParametersResponse -> Bool
(DescribeDBClusterParametersResponse
 -> DescribeDBClusterParametersResponse -> Bool)
-> (DescribeDBClusterParametersResponse
    -> DescribeDBClusterParametersResponse -> Bool)
-> Eq DescribeDBClusterParametersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBClusterParametersResponse
-> DescribeDBClusterParametersResponse -> Bool
$c/= :: DescribeDBClusterParametersResponse
-> DescribeDBClusterParametersResponse -> Bool
== :: DescribeDBClusterParametersResponse
-> DescribeDBClusterParametersResponse -> Bool
$c== :: DescribeDBClusterParametersResponse
-> DescribeDBClusterParametersResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDBClusterParametersResponse]
ReadPrec DescribeDBClusterParametersResponse
Int -> ReadS DescribeDBClusterParametersResponse
ReadS [DescribeDBClusterParametersResponse]
(Int -> ReadS DescribeDBClusterParametersResponse)
-> ReadS [DescribeDBClusterParametersResponse]
-> ReadPrec DescribeDBClusterParametersResponse
-> ReadPrec [DescribeDBClusterParametersResponse]
-> Read DescribeDBClusterParametersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBClusterParametersResponse]
$creadListPrec :: ReadPrec [DescribeDBClusterParametersResponse]
readPrec :: ReadPrec DescribeDBClusterParametersResponse
$creadPrec :: ReadPrec DescribeDBClusterParametersResponse
readList :: ReadS [DescribeDBClusterParametersResponse]
$creadList :: ReadS [DescribeDBClusterParametersResponse]
readsPrec :: Int -> ReadS DescribeDBClusterParametersResponse
$creadsPrec :: Int -> ReadS DescribeDBClusterParametersResponse
Prelude.Read, Int -> DescribeDBClusterParametersResponse -> ShowS
[DescribeDBClusterParametersResponse] -> ShowS
DescribeDBClusterParametersResponse -> String
(Int -> DescribeDBClusterParametersResponse -> ShowS)
-> (DescribeDBClusterParametersResponse -> String)
-> ([DescribeDBClusterParametersResponse] -> ShowS)
-> Show DescribeDBClusterParametersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBClusterParametersResponse] -> ShowS
$cshowList :: [DescribeDBClusterParametersResponse] -> ShowS
show :: DescribeDBClusterParametersResponse -> String
$cshow :: DescribeDBClusterParametersResponse -> String
showsPrec :: Int -> DescribeDBClusterParametersResponse -> ShowS
$cshowsPrec :: Int -> DescribeDBClusterParametersResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDBClusterParametersResponse
 -> Rep DescribeDBClusterParametersResponse x)
-> (forall x.
    Rep DescribeDBClusterParametersResponse x
    -> DescribeDBClusterParametersResponse)
-> Generic DescribeDBClusterParametersResponse
forall x.
Rep DescribeDBClusterParametersResponse x
-> DescribeDBClusterParametersResponse
forall x.
DescribeDBClusterParametersResponse
-> Rep DescribeDBClusterParametersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBClusterParametersResponse x
-> DescribeDBClusterParametersResponse
$cfrom :: forall x.
DescribeDBClusterParametersResponse
-> Rep DescribeDBClusterParametersResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDBClusterParametersResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'marker', 'describeDBClusterParametersResponse_marker' - An optional pagination token provided by a previous
-- DescribeDBClusterParameters request. If this parameter is specified, the
-- response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@ .
--
-- 'parameters', 'describeDBClusterParametersResponse_parameters' - Provides a list of parameters for the DB cluster parameter group.
--
-- 'httpStatus', 'describeDBClusterParametersResponse_httpStatus' - The response's http status code.
newDescribeDBClusterParametersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDBClusterParametersResponse
newDescribeDBClusterParametersResponse :: Int -> DescribeDBClusterParametersResponse
newDescribeDBClusterParametersResponse Int
pHttpStatus_ =
  DescribeDBClusterParametersResponse' :: Maybe Text
-> Maybe [Parameter] -> Int -> DescribeDBClusterParametersResponse
DescribeDBClusterParametersResponse'
    { $sel:marker:DescribeDBClusterParametersResponse' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:DescribeDBClusterParametersResponse' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDBClusterParametersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | Provides a list of parameters for the DB cluster parameter group.
describeDBClusterParametersResponse_parameters :: Lens.Lens' DescribeDBClusterParametersResponse (Prelude.Maybe [Parameter])
describeDBClusterParametersResponse_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> DescribeDBClusterParametersResponse
-> f DescribeDBClusterParametersResponse
describeDBClusterParametersResponse_parameters = (DescribeDBClusterParametersResponse -> Maybe [Parameter])
-> (DescribeDBClusterParametersResponse
    -> Maybe [Parameter] -> DescribeDBClusterParametersResponse)
-> Lens' DescribeDBClusterParametersResponse (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterParametersResponse' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:DescribeDBClusterParametersResponse' :: DescribeDBClusterParametersResponse -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: DescribeDBClusterParametersResponse
s@DescribeDBClusterParametersResponse' {} Maybe [Parameter]
a -> DescribeDBClusterParametersResponse
s {$sel:parameters:DescribeDBClusterParametersResponse' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: DescribeDBClusterParametersResponse) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> DescribeDBClusterParametersResponse
 -> f DescribeDBClusterParametersResponse)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> DescribeDBClusterParametersResponse
-> f DescribeDBClusterParametersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Parameter] [Parameter] [Parameter] [Parameter]
-> Iso
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
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 AnIso [Parameter] [Parameter] [Parameter] [Parameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeDBClusterParametersResponse