{-# 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.Redshift.DescribeClusterParameters
-- 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 a detailed list of parameters contained within the specified
-- Amazon Redshift parameter group. For each parameter the response
-- includes information such as parameter name, description, data type,
-- value, whether the parameter value is modifiable, and so on.
--
-- You can specify /source/ filter to retrieve parameters of only specific
-- type. For example, to retrieve parameters that were modified by a user
-- action such as from ModifyClusterParameterGroup, you can specify
-- /source/ equal to /user/.
--
-- For more information about parameters and parameter groups, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html Amazon Redshift Parameter Groups>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- This operation returns paginated results.
module Amazonka.Redshift.DescribeClusterParameters
  ( -- * Creating a Request
    DescribeClusterParameters (..),
    newDescribeClusterParameters,

    -- * Request Lenses
    describeClusterParameters_marker,
    describeClusterParameters_maxRecords,
    describeClusterParameters_source,
    describeClusterParameters_parameterGroupName,

    -- * Destructuring the Response
    DescribeClusterParametersResponse (..),
    newDescribeClusterParametersResponse,

    -- * Response Lenses
    describeClusterParametersResponse_marker,
    describeClusterParametersResponse_parameters,
    describeClusterParametersResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newDescribeClusterParameters' smart constructor.
data DescribeClusterParameters = DescribeClusterParameters'
  { -- | An optional parameter that specifies the starting point to return a set
    -- of response records. When the results of a DescribeClusterParameters
    -- request exceed the value specified in @MaxRecords@, Amazon Web Services
    -- returns a value in the @Marker@ field of the response. You can retrieve
    -- the next set of response records by providing the returned marker value
    -- in the @Marker@ parameter and retrying the request.
    DescribeClusterParameters -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of response records to return in each call. If the
    -- number of remaining response records exceeds the specified @MaxRecords@
    -- value, a value is returned in a @marker@ field of the response. You can
    -- retrieve the next set of records by retrying the command with the
    -- returned marker value.
    --
    -- Default: @100@
    --
    -- Constraints: minimum 20, maximum 100.
    DescribeClusterParameters -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The parameter types to return. Specify @user@ to show parameters that
    -- are different form the default. Similarly, specify @engine-default@ to
    -- show parameters that are the same as the default parameter group.
    --
    -- Default: All parameter types returned.
    --
    -- Valid Values: @user@ | @engine-default@
    DescribeClusterParameters -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | The name of a cluster parameter group for which to return details.
    DescribeClusterParameters -> Text
parameterGroupName :: Prelude.Text
  }
  deriving (DescribeClusterParameters -> DescribeClusterParameters -> Bool
(DescribeClusterParameters -> DescribeClusterParameters -> Bool)
-> (DescribeClusterParameters -> DescribeClusterParameters -> Bool)
-> Eq DescribeClusterParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClusterParameters -> DescribeClusterParameters -> Bool
$c/= :: DescribeClusterParameters -> DescribeClusterParameters -> Bool
== :: DescribeClusterParameters -> DescribeClusterParameters -> Bool
$c== :: DescribeClusterParameters -> DescribeClusterParameters -> Bool
Prelude.Eq, ReadPrec [DescribeClusterParameters]
ReadPrec DescribeClusterParameters
Int -> ReadS DescribeClusterParameters
ReadS [DescribeClusterParameters]
(Int -> ReadS DescribeClusterParameters)
-> ReadS [DescribeClusterParameters]
-> ReadPrec DescribeClusterParameters
-> ReadPrec [DescribeClusterParameters]
-> Read DescribeClusterParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClusterParameters]
$creadListPrec :: ReadPrec [DescribeClusterParameters]
readPrec :: ReadPrec DescribeClusterParameters
$creadPrec :: ReadPrec DescribeClusterParameters
readList :: ReadS [DescribeClusterParameters]
$creadList :: ReadS [DescribeClusterParameters]
readsPrec :: Int -> ReadS DescribeClusterParameters
$creadsPrec :: Int -> ReadS DescribeClusterParameters
Prelude.Read, Int -> DescribeClusterParameters -> ShowS
[DescribeClusterParameters] -> ShowS
DescribeClusterParameters -> String
(Int -> DescribeClusterParameters -> ShowS)
-> (DescribeClusterParameters -> String)
-> ([DescribeClusterParameters] -> ShowS)
-> Show DescribeClusterParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClusterParameters] -> ShowS
$cshowList :: [DescribeClusterParameters] -> ShowS
show :: DescribeClusterParameters -> String
$cshow :: DescribeClusterParameters -> String
showsPrec :: Int -> DescribeClusterParameters -> ShowS
$cshowsPrec :: Int -> DescribeClusterParameters -> ShowS
Prelude.Show, (forall x.
 DescribeClusterParameters -> Rep DescribeClusterParameters x)
-> (forall x.
    Rep DescribeClusterParameters x -> DescribeClusterParameters)
-> Generic DescribeClusterParameters
forall x.
Rep DescribeClusterParameters x -> DescribeClusterParameters
forall x.
DescribeClusterParameters -> Rep DescribeClusterParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClusterParameters x -> DescribeClusterParameters
$cfrom :: forall x.
DescribeClusterParameters -> Rep DescribeClusterParameters x
Prelude.Generic)

-- |
-- Create a value of 'DescribeClusterParameters' 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', 'describeClusterParameters_marker' - An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a DescribeClusterParameters
-- request exceed the value specified in @MaxRecords@, Amazon Web Services
-- returns a value in the @Marker@ field of the response. You can retrieve
-- the next set of response records by providing the returned marker value
-- in the @Marker@ parameter and retrying the request.
--
-- 'maxRecords', 'describeClusterParameters_maxRecords' - The maximum number of response records to return in each call. If the
-- number of remaining response records exceeds the specified @MaxRecords@
-- value, a value is returned in a @marker@ field of the response. You can
-- retrieve the next set of records by retrying the command with the
-- returned marker value.
--
-- Default: @100@
--
-- Constraints: minimum 20, maximum 100.
--
-- 'source', 'describeClusterParameters_source' - The parameter types to return. Specify @user@ to show parameters that
-- are different form the default. Similarly, specify @engine-default@ to
-- show parameters that are the same as the default parameter group.
--
-- Default: All parameter types returned.
--
-- Valid Values: @user@ | @engine-default@
--
-- 'parameterGroupName', 'describeClusterParameters_parameterGroupName' - The name of a cluster parameter group for which to return details.
newDescribeClusterParameters ::
  -- | 'parameterGroupName'
  Prelude.Text ->
  DescribeClusterParameters
newDescribeClusterParameters :: Text -> DescribeClusterParameters
newDescribeClusterParameters Text
pParameterGroupName_ =
  DescribeClusterParameters' :: Maybe Text
-> Maybe Int -> Maybe Text -> Text -> DescribeClusterParameters
DescribeClusterParameters'
    { $sel:marker:DescribeClusterParameters' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeClusterParameters' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:source:DescribeClusterParameters' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupName:DescribeClusterParameters' :: Text
parameterGroupName = Text
pParameterGroupName_
    }

-- | An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a DescribeClusterParameters
-- request exceed the value specified in @MaxRecords@, Amazon Web Services
-- returns a value in the @Marker@ field of the response. You can retrieve
-- the next set of response records by providing the returned marker value
-- in the @Marker@ parameter and retrying the request.
describeClusterParameters_marker :: Lens.Lens' DescribeClusterParameters (Prelude.Maybe Prelude.Text)
describeClusterParameters_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeClusterParameters -> f DescribeClusterParameters
describeClusterParameters_marker = (DescribeClusterParameters -> Maybe Text)
-> (DescribeClusterParameters
    -> Maybe Text -> DescribeClusterParameters)
-> Lens
     DescribeClusterParameters
     DescribeClusterParameters
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameters' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeClusterParameters' :: DescribeClusterParameters -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeClusterParameters
s@DescribeClusterParameters' {} Maybe Text
a -> DescribeClusterParameters
s {$sel:marker:DescribeClusterParameters' :: Maybe Text
marker = Maybe Text
a} :: DescribeClusterParameters)

-- | The maximum number of response records to return in each call. If the
-- number of remaining response records exceeds the specified @MaxRecords@
-- value, a value is returned in a @marker@ field of the response. You can
-- retrieve the next set of records by retrying the command with the
-- returned marker value.
--
-- Default: @100@
--
-- Constraints: minimum 20, maximum 100.
describeClusterParameters_maxRecords :: Lens.Lens' DescribeClusterParameters (Prelude.Maybe Prelude.Int)
describeClusterParameters_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeClusterParameters -> f DescribeClusterParameters
describeClusterParameters_maxRecords = (DescribeClusterParameters -> Maybe Int)
-> (DescribeClusterParameters
    -> Maybe Int -> DescribeClusterParameters)
-> Lens
     DescribeClusterParameters
     DescribeClusterParameters
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameters' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeClusterParameters' :: DescribeClusterParameters -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeClusterParameters
s@DescribeClusterParameters' {} Maybe Int
a -> DescribeClusterParameters
s {$sel:maxRecords:DescribeClusterParameters' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeClusterParameters)

-- | The parameter types to return. Specify @user@ to show parameters that
-- are different form the default. Similarly, specify @engine-default@ to
-- show parameters that are the same as the default parameter group.
--
-- Default: All parameter types returned.
--
-- Valid Values: @user@ | @engine-default@
describeClusterParameters_source :: Lens.Lens' DescribeClusterParameters (Prelude.Maybe Prelude.Text)
describeClusterParameters_source :: (Maybe Text -> f (Maybe Text))
-> DescribeClusterParameters -> f DescribeClusterParameters
describeClusterParameters_source = (DescribeClusterParameters -> Maybe Text)
-> (DescribeClusterParameters
    -> Maybe Text -> DescribeClusterParameters)
-> Lens
     DescribeClusterParameters
     DescribeClusterParameters
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameters' {Maybe Text
source :: Maybe Text
$sel:source:DescribeClusterParameters' :: DescribeClusterParameters -> Maybe Text
source} -> Maybe Text
source) (\s :: DescribeClusterParameters
s@DescribeClusterParameters' {} Maybe Text
a -> DescribeClusterParameters
s {$sel:source:DescribeClusterParameters' :: Maybe Text
source = Maybe Text
a} :: DescribeClusterParameters)

-- | The name of a cluster parameter group for which to return details.
describeClusterParameters_parameterGroupName :: Lens.Lens' DescribeClusterParameters Prelude.Text
describeClusterParameters_parameterGroupName :: (Text -> f Text)
-> DescribeClusterParameters -> f DescribeClusterParameters
describeClusterParameters_parameterGroupName = (DescribeClusterParameters -> Text)
-> (DescribeClusterParameters -> Text -> DescribeClusterParameters)
-> Lens
     DescribeClusterParameters DescribeClusterParameters Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameters' {Text
parameterGroupName :: Text
$sel:parameterGroupName:DescribeClusterParameters' :: DescribeClusterParameters -> Text
parameterGroupName} -> Text
parameterGroupName) (\s :: DescribeClusterParameters
s@DescribeClusterParameters' {} Text
a -> DescribeClusterParameters
s {$sel:parameterGroupName:DescribeClusterParameters' :: Text
parameterGroupName = Text
a} :: DescribeClusterParameters)

instance Core.AWSPager DescribeClusterParameters where
  page :: DescribeClusterParameters
-> AWSResponse DescribeClusterParameters
-> Maybe DescribeClusterParameters
page DescribeClusterParameters
rq AWSResponse DescribeClusterParameters
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeClusterParameters
DescribeClusterParametersResponse
rs
            DescribeClusterParametersResponse
-> Getting (First Text) DescribeClusterParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeClusterParametersResponse
-> Const (First Text) DescribeClusterParametersResponse
Lens' DescribeClusterParametersResponse (Maybe Text)
describeClusterParametersResponse_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeClusterParametersResponse
 -> Const (First Text) DescribeClusterParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeClusterParametersResponse 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 DescribeClusterParameters
forall a. Maybe a
Prelude.Nothing
    | Maybe [Parameter] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeClusterParameters
DescribeClusterParametersResponse
rs
            DescribeClusterParametersResponse
-> Getting
     (First [Parameter]) DescribeClusterParametersResponse [Parameter]
-> Maybe [Parameter]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Parameter]
 -> Const (First [Parameter]) (Maybe [Parameter]))
-> DescribeClusterParametersResponse
-> Const (First [Parameter]) DescribeClusterParametersResponse
Lens' DescribeClusterParametersResponse (Maybe [Parameter])
describeClusterParametersResponse_parameters
              ((Maybe [Parameter]
  -> Const (First [Parameter]) (Maybe [Parameter]))
 -> DescribeClusterParametersResponse
 -> Const (First [Parameter]) DescribeClusterParametersResponse)
-> (([Parameter] -> Const (First [Parameter]) [Parameter])
    -> Maybe [Parameter]
    -> Const (First [Parameter]) (Maybe [Parameter]))
-> Getting
     (First [Parameter]) DescribeClusterParametersResponse [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 DescribeClusterParameters
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeClusterParameters -> Maybe DescribeClusterParameters
forall a. a -> Maybe a
Prelude.Just (DescribeClusterParameters -> Maybe DescribeClusterParameters)
-> DescribeClusterParameters -> Maybe DescribeClusterParameters
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeClusterParameters
rq
          DescribeClusterParameters
-> (DescribeClusterParameters -> DescribeClusterParameters)
-> DescribeClusterParameters
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeClusterParameters -> Identity DescribeClusterParameters
Lens
  DescribeClusterParameters
  DescribeClusterParameters
  (Maybe Text)
  (Maybe Text)
describeClusterParameters_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeClusterParameters -> Identity DescribeClusterParameters)
-> Maybe Text
-> DescribeClusterParameters
-> DescribeClusterParameters
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeClusterParameters
DescribeClusterParametersResponse
rs
          DescribeClusterParametersResponse
-> Getting (First Text) DescribeClusterParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeClusterParametersResponse
-> Const (First Text) DescribeClusterParametersResponse
Lens' DescribeClusterParametersResponse (Maybe Text)
describeClusterParametersResponse_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeClusterParametersResponse
 -> Const (First Text) DescribeClusterParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeClusterParametersResponse 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 DescribeClusterParameters where
  type
    AWSResponse DescribeClusterParameters =
      DescribeClusterParametersResponse
  request :: DescribeClusterParameters -> Request DescribeClusterParameters
request = Service
-> DescribeClusterParameters -> Request DescribeClusterParameters
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeClusterParameters
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeClusterParameters)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeClusterParameters))
-> Logger
-> Service
-> Proxy DescribeClusterParameters
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeClusterParameters)))
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
"DescribeClusterParametersResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [Parameter] -> Int -> DescribeClusterParametersResponse
DescribeClusterParametersResponse'
            (Maybe Text
 -> Maybe [Parameter] -> Int -> DescribeClusterParametersResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Parameter] -> Int -> DescribeClusterParametersResponse)
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 -> DescribeClusterParametersResponse)
-> Either String (Maybe [Parameter])
-> Either String (Int -> DescribeClusterParametersResponse)
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 -> DescribeClusterParametersResponse)
-> Either String Int
-> Either String DescribeClusterParametersResponse
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 DescribeClusterParameters

instance Prelude.NFData DescribeClusterParameters

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

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

instance Core.ToQuery DescribeClusterParameters where
  toQuery :: DescribeClusterParameters -> QueryString
toQuery DescribeClusterParameters' {Maybe Int
Maybe Text
Text
parameterGroupName :: Text
source :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:parameterGroupName:DescribeClusterParameters' :: DescribeClusterParameters -> Text
$sel:source:DescribeClusterParameters' :: DescribeClusterParameters -> Maybe Text
$sel:maxRecords:DescribeClusterParameters' :: DescribeClusterParameters -> Maybe Int
$sel:marker:DescribeClusterParameters' :: DescribeClusterParameters -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeClusterParameters" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        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
"ParameterGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
parameterGroupName
      ]

-- | Contains the output from the DescribeClusterParameters action.
--
-- /See:/ 'newDescribeClusterParametersResponse' smart constructor.
data DescribeClusterParametersResponse = DescribeClusterParametersResponse'
  { -- | A value that indicates the starting point for the next set of response
    -- records in a subsequent request. If a value is returned in a response,
    -- you can retrieve the next set of records by providing this returned
    -- marker value in the @Marker@ parameter and retrying the command. If the
    -- @Marker@ field is empty, all response records have been retrieved for
    -- the request.
    DescribeClusterParametersResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of Parameter instances. Each instance lists the parameters of one
    -- cluster parameter group.
    DescribeClusterParametersResponse -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | The response's http status code.
    DescribeClusterParametersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeClusterParametersResponse
-> DescribeClusterParametersResponse -> Bool
(DescribeClusterParametersResponse
 -> DescribeClusterParametersResponse -> Bool)
-> (DescribeClusterParametersResponse
    -> DescribeClusterParametersResponse -> Bool)
-> Eq DescribeClusterParametersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClusterParametersResponse
-> DescribeClusterParametersResponse -> Bool
$c/= :: DescribeClusterParametersResponse
-> DescribeClusterParametersResponse -> Bool
== :: DescribeClusterParametersResponse
-> DescribeClusterParametersResponse -> Bool
$c== :: DescribeClusterParametersResponse
-> DescribeClusterParametersResponse -> Bool
Prelude.Eq, ReadPrec [DescribeClusterParametersResponse]
ReadPrec DescribeClusterParametersResponse
Int -> ReadS DescribeClusterParametersResponse
ReadS [DescribeClusterParametersResponse]
(Int -> ReadS DescribeClusterParametersResponse)
-> ReadS [DescribeClusterParametersResponse]
-> ReadPrec DescribeClusterParametersResponse
-> ReadPrec [DescribeClusterParametersResponse]
-> Read DescribeClusterParametersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClusterParametersResponse]
$creadListPrec :: ReadPrec [DescribeClusterParametersResponse]
readPrec :: ReadPrec DescribeClusterParametersResponse
$creadPrec :: ReadPrec DescribeClusterParametersResponse
readList :: ReadS [DescribeClusterParametersResponse]
$creadList :: ReadS [DescribeClusterParametersResponse]
readsPrec :: Int -> ReadS DescribeClusterParametersResponse
$creadsPrec :: Int -> ReadS DescribeClusterParametersResponse
Prelude.Read, Int -> DescribeClusterParametersResponse -> ShowS
[DescribeClusterParametersResponse] -> ShowS
DescribeClusterParametersResponse -> String
(Int -> DescribeClusterParametersResponse -> ShowS)
-> (DescribeClusterParametersResponse -> String)
-> ([DescribeClusterParametersResponse] -> ShowS)
-> Show DescribeClusterParametersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClusterParametersResponse] -> ShowS
$cshowList :: [DescribeClusterParametersResponse] -> ShowS
show :: DescribeClusterParametersResponse -> String
$cshow :: DescribeClusterParametersResponse -> String
showsPrec :: Int -> DescribeClusterParametersResponse -> ShowS
$cshowsPrec :: Int -> DescribeClusterParametersResponse -> ShowS
Prelude.Show, (forall x.
 DescribeClusterParametersResponse
 -> Rep DescribeClusterParametersResponse x)
-> (forall x.
    Rep DescribeClusterParametersResponse x
    -> DescribeClusterParametersResponse)
-> Generic DescribeClusterParametersResponse
forall x.
Rep DescribeClusterParametersResponse x
-> DescribeClusterParametersResponse
forall x.
DescribeClusterParametersResponse
-> Rep DescribeClusterParametersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClusterParametersResponse x
-> DescribeClusterParametersResponse
$cfrom :: forall x.
DescribeClusterParametersResponse
-> Rep DescribeClusterParametersResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeClusterParametersResponse' 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', 'describeClusterParametersResponse_marker' - A value that indicates the starting point for the next set of response
-- records in a subsequent request. If a value is returned in a response,
-- you can retrieve the next set of records by providing this returned
-- marker value in the @Marker@ parameter and retrying the command. If the
-- @Marker@ field is empty, all response records have been retrieved for
-- the request.
--
-- 'parameters', 'describeClusterParametersResponse_parameters' - A list of Parameter instances. Each instance lists the parameters of one
-- cluster parameter group.
--
-- 'httpStatus', 'describeClusterParametersResponse_httpStatus' - The response's http status code.
newDescribeClusterParametersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeClusterParametersResponse
newDescribeClusterParametersResponse :: Int -> DescribeClusterParametersResponse
newDescribeClusterParametersResponse Int
pHttpStatus_ =
  DescribeClusterParametersResponse' :: Maybe Text
-> Maybe [Parameter] -> Int -> DescribeClusterParametersResponse
DescribeClusterParametersResponse'
    { $sel:marker:DescribeClusterParametersResponse' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:DescribeClusterParametersResponse' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeClusterParametersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A value that indicates the starting point for the next set of response
-- records in a subsequent request. If a value is returned in a response,
-- you can retrieve the next set of records by providing this returned
-- marker value in the @Marker@ parameter and retrying the command. If the
-- @Marker@ field is empty, all response records have been retrieved for
-- the request.
describeClusterParametersResponse_marker :: Lens.Lens' DescribeClusterParametersResponse (Prelude.Maybe Prelude.Text)
describeClusterParametersResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeClusterParametersResponse
-> f DescribeClusterParametersResponse
describeClusterParametersResponse_marker = (DescribeClusterParametersResponse -> Maybe Text)
-> (DescribeClusterParametersResponse
    -> Maybe Text -> DescribeClusterParametersResponse)
-> Lens' DescribeClusterParametersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParametersResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeClusterParametersResponse' :: DescribeClusterParametersResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeClusterParametersResponse
s@DescribeClusterParametersResponse' {} Maybe Text
a -> DescribeClusterParametersResponse
s {$sel:marker:DescribeClusterParametersResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeClusterParametersResponse)

-- | A list of Parameter instances. Each instance lists the parameters of one
-- cluster parameter group.
describeClusterParametersResponse_parameters :: Lens.Lens' DescribeClusterParametersResponse (Prelude.Maybe [Parameter])
describeClusterParametersResponse_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> DescribeClusterParametersResponse
-> f DescribeClusterParametersResponse
describeClusterParametersResponse_parameters = (DescribeClusterParametersResponse -> Maybe [Parameter])
-> (DescribeClusterParametersResponse
    -> Maybe [Parameter] -> DescribeClusterParametersResponse)
-> Lens' DescribeClusterParametersResponse (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParametersResponse' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:DescribeClusterParametersResponse' :: DescribeClusterParametersResponse -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: DescribeClusterParametersResponse
s@DescribeClusterParametersResponse' {} Maybe [Parameter]
a -> DescribeClusterParametersResponse
s {$sel:parameters:DescribeClusterParametersResponse' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: DescribeClusterParametersResponse) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> DescribeClusterParametersResponse
 -> f DescribeClusterParametersResponse)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> DescribeClusterParametersResponse
-> f DescribeClusterParametersResponse
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.
describeClusterParametersResponse_httpStatus :: Lens.Lens' DescribeClusterParametersResponse Prelude.Int
describeClusterParametersResponse_httpStatus :: (Int -> f Int)
-> DescribeClusterParametersResponse
-> f DescribeClusterParametersResponse
describeClusterParametersResponse_httpStatus = (DescribeClusterParametersResponse -> Int)
-> (DescribeClusterParametersResponse
    -> Int -> DescribeClusterParametersResponse)
-> Lens
     DescribeClusterParametersResponse
     DescribeClusterParametersResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParametersResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeClusterParametersResponse' :: DescribeClusterParametersResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeClusterParametersResponse
s@DescribeClusterParametersResponse' {} Int
a -> DescribeClusterParametersResponse
s {$sel:httpStatus:DescribeClusterParametersResponse' :: Int
httpStatus = Int
a} :: DescribeClusterParametersResponse)

instance
  Prelude.NFData
    DescribeClusterParametersResponse