{-# 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.DescribeDefaultClusterParameters
-- 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 list of parameter settings for the specified parameter group
-- family.
--
-- 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.DescribeDefaultClusterParameters
  ( -- * Creating a Request
    DescribeDefaultClusterParameters (..),
    newDescribeDefaultClusterParameters,

    -- * Request Lenses
    describeDefaultClusterParameters_marker,
    describeDefaultClusterParameters_maxRecords,
    describeDefaultClusterParameters_parameterGroupFamily,

    -- * Destructuring the Response
    DescribeDefaultClusterParametersResponse (..),
    newDescribeDefaultClusterParametersResponse,

    -- * Response Lenses
    describeDefaultClusterParametersResponse_httpStatus,
    describeDefaultClusterParametersResponse_defaultClusterParameters,
  )
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:/ 'newDescribeDefaultClusterParameters' smart constructor.
data DescribeDefaultClusterParameters = DescribeDefaultClusterParameters'
  { -- | An optional parameter that specifies the starting point to return a set
    -- of response records. When the results of a
    -- DescribeDefaultClusterParameters 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.
    DescribeDefaultClusterParameters -> 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.
    DescribeDefaultClusterParameters -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The name of the cluster parameter group family.
    DescribeDefaultClusterParameters -> Text
parameterGroupFamily :: Prelude.Text
  }
  deriving (DescribeDefaultClusterParameters
-> DescribeDefaultClusterParameters -> Bool
(DescribeDefaultClusterParameters
 -> DescribeDefaultClusterParameters -> Bool)
-> (DescribeDefaultClusterParameters
    -> DescribeDefaultClusterParameters -> Bool)
-> Eq DescribeDefaultClusterParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDefaultClusterParameters
-> DescribeDefaultClusterParameters -> Bool
$c/= :: DescribeDefaultClusterParameters
-> DescribeDefaultClusterParameters -> Bool
== :: DescribeDefaultClusterParameters
-> DescribeDefaultClusterParameters -> Bool
$c== :: DescribeDefaultClusterParameters
-> DescribeDefaultClusterParameters -> Bool
Prelude.Eq, ReadPrec [DescribeDefaultClusterParameters]
ReadPrec DescribeDefaultClusterParameters
Int -> ReadS DescribeDefaultClusterParameters
ReadS [DescribeDefaultClusterParameters]
(Int -> ReadS DescribeDefaultClusterParameters)
-> ReadS [DescribeDefaultClusterParameters]
-> ReadPrec DescribeDefaultClusterParameters
-> ReadPrec [DescribeDefaultClusterParameters]
-> Read DescribeDefaultClusterParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDefaultClusterParameters]
$creadListPrec :: ReadPrec [DescribeDefaultClusterParameters]
readPrec :: ReadPrec DescribeDefaultClusterParameters
$creadPrec :: ReadPrec DescribeDefaultClusterParameters
readList :: ReadS [DescribeDefaultClusterParameters]
$creadList :: ReadS [DescribeDefaultClusterParameters]
readsPrec :: Int -> ReadS DescribeDefaultClusterParameters
$creadsPrec :: Int -> ReadS DescribeDefaultClusterParameters
Prelude.Read, Int -> DescribeDefaultClusterParameters -> ShowS
[DescribeDefaultClusterParameters] -> ShowS
DescribeDefaultClusterParameters -> String
(Int -> DescribeDefaultClusterParameters -> ShowS)
-> (DescribeDefaultClusterParameters -> String)
-> ([DescribeDefaultClusterParameters] -> ShowS)
-> Show DescribeDefaultClusterParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDefaultClusterParameters] -> ShowS
$cshowList :: [DescribeDefaultClusterParameters] -> ShowS
show :: DescribeDefaultClusterParameters -> String
$cshow :: DescribeDefaultClusterParameters -> String
showsPrec :: Int -> DescribeDefaultClusterParameters -> ShowS
$cshowsPrec :: Int -> DescribeDefaultClusterParameters -> ShowS
Prelude.Show, (forall x.
 DescribeDefaultClusterParameters
 -> Rep DescribeDefaultClusterParameters x)
-> (forall x.
    Rep DescribeDefaultClusterParameters x
    -> DescribeDefaultClusterParameters)
-> Generic DescribeDefaultClusterParameters
forall x.
Rep DescribeDefaultClusterParameters x
-> DescribeDefaultClusterParameters
forall x.
DescribeDefaultClusterParameters
-> Rep DescribeDefaultClusterParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDefaultClusterParameters x
-> DescribeDefaultClusterParameters
$cfrom :: forall x.
DescribeDefaultClusterParameters
-> Rep DescribeDefaultClusterParameters x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDefaultClusterParameters' 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', 'describeDefaultClusterParameters_marker' - An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a
-- DescribeDefaultClusterParameters 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', 'describeDefaultClusterParameters_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.
--
-- 'parameterGroupFamily', 'describeDefaultClusterParameters_parameterGroupFamily' - The name of the cluster parameter group family.
newDescribeDefaultClusterParameters ::
  -- | 'parameterGroupFamily'
  Prelude.Text ->
  DescribeDefaultClusterParameters
newDescribeDefaultClusterParameters :: Text -> DescribeDefaultClusterParameters
newDescribeDefaultClusterParameters
  Text
pParameterGroupFamily_ =
    DescribeDefaultClusterParameters' :: Maybe Text -> Maybe Int -> Text -> DescribeDefaultClusterParameters
DescribeDefaultClusterParameters'
      { $sel:marker:DescribeDefaultClusterParameters' :: Maybe Text
marker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxRecords:DescribeDefaultClusterParameters' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:parameterGroupFamily:DescribeDefaultClusterParameters' :: Text
parameterGroupFamily =
          Text
pParameterGroupFamily_
      }

-- | An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a
-- DescribeDefaultClusterParameters 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.
describeDefaultClusterParameters_marker :: Lens.Lens' DescribeDefaultClusterParameters (Prelude.Maybe Prelude.Text)
describeDefaultClusterParameters_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeDefaultClusterParameters
-> f DescribeDefaultClusterParameters
describeDefaultClusterParameters_marker = (DescribeDefaultClusterParameters -> Maybe Text)
-> (DescribeDefaultClusterParameters
    -> Maybe Text -> DescribeDefaultClusterParameters)
-> Lens
     DescribeDefaultClusterParameters
     DescribeDefaultClusterParameters
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDefaultClusterParameters' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDefaultClusterParameters' :: DescribeDefaultClusterParameters -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDefaultClusterParameters
s@DescribeDefaultClusterParameters' {} Maybe Text
a -> DescribeDefaultClusterParameters
s {$sel:marker:DescribeDefaultClusterParameters' :: Maybe Text
marker = Maybe Text
a} :: DescribeDefaultClusterParameters)

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

-- | The name of the cluster parameter group family.
describeDefaultClusterParameters_parameterGroupFamily :: Lens.Lens' DescribeDefaultClusterParameters Prelude.Text
describeDefaultClusterParameters_parameterGroupFamily :: (Text -> f Text)
-> DescribeDefaultClusterParameters
-> f DescribeDefaultClusterParameters
describeDefaultClusterParameters_parameterGroupFamily = (DescribeDefaultClusterParameters -> Text)
-> (DescribeDefaultClusterParameters
    -> Text -> DescribeDefaultClusterParameters)
-> Lens
     DescribeDefaultClusterParameters
     DescribeDefaultClusterParameters
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDefaultClusterParameters' {Text
parameterGroupFamily :: Text
$sel:parameterGroupFamily:DescribeDefaultClusterParameters' :: DescribeDefaultClusterParameters -> Text
parameterGroupFamily} -> Text
parameterGroupFamily) (\s :: DescribeDefaultClusterParameters
s@DescribeDefaultClusterParameters' {} Text
a -> DescribeDefaultClusterParameters
s {$sel:parameterGroupFamily:DescribeDefaultClusterParameters' :: Text
parameterGroupFamily = Text
a} :: DescribeDefaultClusterParameters)

instance
  Core.AWSPager
    DescribeDefaultClusterParameters
  where
  page :: DescribeDefaultClusterParameters
-> AWSResponse DescribeDefaultClusterParameters
-> Maybe DescribeDefaultClusterParameters
page DescribeDefaultClusterParameters
rq AWSResponse DescribeDefaultClusterParameters
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDefaultClusterParameters
DescribeDefaultClusterParametersResponse
rs
            DescribeDefaultClusterParametersResponse
-> Getting
     (First Text) DescribeDefaultClusterParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (DefaultClusterParameters
 -> Const (First Text) DefaultClusterParameters)
-> DescribeDefaultClusterParametersResponse
-> Const (First Text) DescribeDefaultClusterParametersResponse
Lens'
  DescribeDefaultClusterParametersResponse DefaultClusterParameters
describeDefaultClusterParametersResponse_defaultClusterParameters
              ((DefaultClusterParameters
  -> Const (First Text) DefaultClusterParameters)
 -> DescribeDefaultClusterParametersResponse
 -> Const (First Text) DescribeDefaultClusterParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> DefaultClusterParameters
    -> Const (First Text) DefaultClusterParameters)
-> Getting
     (First Text) DescribeDefaultClusterParametersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> Const (First Text) (Maybe Text))
-> DefaultClusterParameters
-> Const (First Text) DefaultClusterParameters
Lens' DefaultClusterParameters (Maybe Text)
defaultClusterParameters_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DefaultClusterParameters
 -> Const (First Text) DefaultClusterParameters)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> (Text -> Const (First Text) Text)
-> DefaultClusterParameters
-> Const (First Text) DefaultClusterParameters
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 DescribeDefaultClusterParameters
forall a. Maybe a
Prelude.Nothing
    | Maybe [Parameter] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDefaultClusterParameters
DescribeDefaultClusterParametersResponse
rs
            DescribeDefaultClusterParametersResponse
-> Getting
     (First [Parameter])
     DescribeDefaultClusterParametersResponse
     [Parameter]
-> Maybe [Parameter]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (DefaultClusterParameters
 -> Const (First [Parameter]) DefaultClusterParameters)
-> DescribeDefaultClusterParametersResponse
-> Const
     (First [Parameter]) DescribeDefaultClusterParametersResponse
Lens'
  DescribeDefaultClusterParametersResponse DefaultClusterParameters
describeDefaultClusterParametersResponse_defaultClusterParameters
              ((DefaultClusterParameters
  -> Const (First [Parameter]) DefaultClusterParameters)
 -> DescribeDefaultClusterParametersResponse
 -> Const
      (First [Parameter]) DescribeDefaultClusterParametersResponse)
-> (([Parameter] -> Const (First [Parameter]) [Parameter])
    -> DefaultClusterParameters
    -> Const (First [Parameter]) DefaultClusterParameters)
-> Getting
     (First [Parameter])
     DescribeDefaultClusterParametersResponse
     [Parameter]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe [Parameter]
 -> Const (First [Parameter]) (Maybe [Parameter]))
-> DefaultClusterParameters
-> Const (First [Parameter]) DefaultClusterParameters
Lens' DefaultClusterParameters (Maybe [Parameter])
defaultClusterParameters_parameters
              ((Maybe [Parameter]
  -> Const (First [Parameter]) (Maybe [Parameter]))
 -> DefaultClusterParameters
 -> Const (First [Parameter]) DefaultClusterParameters)
-> (([Parameter] -> Const (First [Parameter]) [Parameter])
    -> Maybe [Parameter]
    -> Const (First [Parameter]) (Maybe [Parameter]))
-> ([Parameter] -> Const (First [Parameter]) [Parameter])
-> DefaultClusterParameters
-> Const (First [Parameter]) DefaultClusterParameters
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 DescribeDefaultClusterParameters
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeDefaultClusterParameters
-> Maybe DescribeDefaultClusterParameters
forall a. a -> Maybe a
Prelude.Just (DescribeDefaultClusterParameters
 -> Maybe DescribeDefaultClusterParameters)
-> DescribeDefaultClusterParameters
-> Maybe DescribeDefaultClusterParameters
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeDefaultClusterParameters
rq
          DescribeDefaultClusterParameters
-> (DescribeDefaultClusterParameters
    -> DescribeDefaultClusterParameters)
-> DescribeDefaultClusterParameters
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeDefaultClusterParameters
-> Identity DescribeDefaultClusterParameters
Lens
  DescribeDefaultClusterParameters
  DescribeDefaultClusterParameters
  (Maybe Text)
  (Maybe Text)
describeDefaultClusterParameters_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeDefaultClusterParameters
 -> Identity DescribeDefaultClusterParameters)
-> Maybe Text
-> DescribeDefaultClusterParameters
-> DescribeDefaultClusterParameters
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDefaultClusterParameters
DescribeDefaultClusterParametersResponse
rs
          DescribeDefaultClusterParametersResponse
-> Getting
     (First Text) DescribeDefaultClusterParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (DefaultClusterParameters
 -> Const (First Text) DefaultClusterParameters)
-> DescribeDefaultClusterParametersResponse
-> Const (First Text) DescribeDefaultClusterParametersResponse
Lens'
  DescribeDefaultClusterParametersResponse DefaultClusterParameters
describeDefaultClusterParametersResponse_defaultClusterParameters
            ((DefaultClusterParameters
  -> Const (First Text) DefaultClusterParameters)
 -> DescribeDefaultClusterParametersResponse
 -> Const (First Text) DescribeDefaultClusterParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> DefaultClusterParameters
    -> Const (First Text) DefaultClusterParameters)
-> Getting
     (First Text) DescribeDefaultClusterParametersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Maybe Text -> Const (First Text) (Maybe Text))
-> DefaultClusterParameters
-> Const (First Text) DefaultClusterParameters
Lens' DefaultClusterParameters (Maybe Text)
defaultClusterParameters_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DefaultClusterParameters
 -> Const (First Text) DefaultClusterParameters)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> (Text -> Const (First Text) Text)
-> DefaultClusterParameters
-> Const (First Text) DefaultClusterParameters
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
    DescribeDefaultClusterParameters
  where
  type
    AWSResponse DescribeDefaultClusterParameters =
      DescribeDefaultClusterParametersResponse
  request :: DescribeDefaultClusterParameters
-> Request DescribeDefaultClusterParameters
request = Service
-> DescribeDefaultClusterParameters
-> Request DescribeDefaultClusterParameters
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDefaultClusterParameters
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeDefaultClusterParameters)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeDefaultClusterParameters))
-> Logger
-> Service
-> Proxy DescribeDefaultClusterParameters
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeDefaultClusterParameters)))
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
"DescribeDefaultClusterParametersResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int
-> DefaultClusterParameters
-> DescribeDefaultClusterParametersResponse
DescribeDefaultClusterParametersResponse'
            (Int
 -> DefaultClusterParameters
 -> DescribeDefaultClusterParametersResponse)
-> Either String Int
-> Either
     String
     (DefaultClusterParameters
      -> DescribeDefaultClusterParametersResponse)
forall (f :: * -> *) a b. Functor 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))
            Either
  String
  (DefaultClusterParameters
   -> DescribeDefaultClusterParametersResponse)
-> Either String DefaultClusterParameters
-> Either String DescribeDefaultClusterParametersResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String DefaultClusterParameters
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"DefaultClusterParameters")
      )

instance
  Prelude.Hashable
    DescribeDefaultClusterParameters

instance
  Prelude.NFData
    DescribeDefaultClusterParameters

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

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

instance
  Core.ToQuery
    DescribeDefaultClusterParameters
  where
  toQuery :: DescribeDefaultClusterParameters -> QueryString
toQuery DescribeDefaultClusterParameters' {Maybe Int
Maybe Text
Text
parameterGroupFamily :: Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:parameterGroupFamily:DescribeDefaultClusterParameters' :: DescribeDefaultClusterParameters -> Text
$sel:maxRecords:DescribeDefaultClusterParameters' :: DescribeDefaultClusterParameters -> Maybe Int
$sel:marker:DescribeDefaultClusterParameters' :: DescribeDefaultClusterParameters -> 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
"DescribeDefaultClusterParameters" ::
                      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
"ParameterGroupFamily" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
parameterGroupFamily
      ]

-- | /See:/ 'newDescribeDefaultClusterParametersResponse' smart constructor.
data DescribeDefaultClusterParametersResponse = DescribeDefaultClusterParametersResponse'
  { -- | The response's http status code.
    DescribeDefaultClusterParametersResponse -> Int
httpStatus :: Prelude.Int,
    DescribeDefaultClusterParametersResponse
-> DefaultClusterParameters
defaultClusterParameters :: DefaultClusterParameters
  }
  deriving (DescribeDefaultClusterParametersResponse
-> DescribeDefaultClusterParametersResponse -> Bool
(DescribeDefaultClusterParametersResponse
 -> DescribeDefaultClusterParametersResponse -> Bool)
-> (DescribeDefaultClusterParametersResponse
    -> DescribeDefaultClusterParametersResponse -> Bool)
-> Eq DescribeDefaultClusterParametersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDefaultClusterParametersResponse
-> DescribeDefaultClusterParametersResponse -> Bool
$c/= :: DescribeDefaultClusterParametersResponse
-> DescribeDefaultClusterParametersResponse -> Bool
== :: DescribeDefaultClusterParametersResponse
-> DescribeDefaultClusterParametersResponse -> Bool
$c== :: DescribeDefaultClusterParametersResponse
-> DescribeDefaultClusterParametersResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDefaultClusterParametersResponse]
ReadPrec DescribeDefaultClusterParametersResponse
Int -> ReadS DescribeDefaultClusterParametersResponse
ReadS [DescribeDefaultClusterParametersResponse]
(Int -> ReadS DescribeDefaultClusterParametersResponse)
-> ReadS [DescribeDefaultClusterParametersResponse]
-> ReadPrec DescribeDefaultClusterParametersResponse
-> ReadPrec [DescribeDefaultClusterParametersResponse]
-> Read DescribeDefaultClusterParametersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDefaultClusterParametersResponse]
$creadListPrec :: ReadPrec [DescribeDefaultClusterParametersResponse]
readPrec :: ReadPrec DescribeDefaultClusterParametersResponse
$creadPrec :: ReadPrec DescribeDefaultClusterParametersResponse
readList :: ReadS [DescribeDefaultClusterParametersResponse]
$creadList :: ReadS [DescribeDefaultClusterParametersResponse]
readsPrec :: Int -> ReadS DescribeDefaultClusterParametersResponse
$creadsPrec :: Int -> ReadS DescribeDefaultClusterParametersResponse
Prelude.Read, Int -> DescribeDefaultClusterParametersResponse -> ShowS
[DescribeDefaultClusterParametersResponse] -> ShowS
DescribeDefaultClusterParametersResponse -> String
(Int -> DescribeDefaultClusterParametersResponse -> ShowS)
-> (DescribeDefaultClusterParametersResponse -> String)
-> ([DescribeDefaultClusterParametersResponse] -> ShowS)
-> Show DescribeDefaultClusterParametersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDefaultClusterParametersResponse] -> ShowS
$cshowList :: [DescribeDefaultClusterParametersResponse] -> ShowS
show :: DescribeDefaultClusterParametersResponse -> String
$cshow :: DescribeDefaultClusterParametersResponse -> String
showsPrec :: Int -> DescribeDefaultClusterParametersResponse -> ShowS
$cshowsPrec :: Int -> DescribeDefaultClusterParametersResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDefaultClusterParametersResponse
 -> Rep DescribeDefaultClusterParametersResponse x)
-> (forall x.
    Rep DescribeDefaultClusterParametersResponse x
    -> DescribeDefaultClusterParametersResponse)
-> Generic DescribeDefaultClusterParametersResponse
forall x.
Rep DescribeDefaultClusterParametersResponse x
-> DescribeDefaultClusterParametersResponse
forall x.
DescribeDefaultClusterParametersResponse
-> Rep DescribeDefaultClusterParametersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDefaultClusterParametersResponse x
-> DescribeDefaultClusterParametersResponse
$cfrom :: forall x.
DescribeDefaultClusterParametersResponse
-> Rep DescribeDefaultClusterParametersResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDefaultClusterParametersResponse' 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:
--
-- 'httpStatus', 'describeDefaultClusterParametersResponse_httpStatus' - The response's http status code.
--
-- 'defaultClusterParameters', 'describeDefaultClusterParametersResponse_defaultClusterParameters' - Undocumented member.
newDescribeDefaultClusterParametersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'defaultClusterParameters'
  DefaultClusterParameters ->
  DescribeDefaultClusterParametersResponse
newDescribeDefaultClusterParametersResponse :: Int
-> DefaultClusterParameters
-> DescribeDefaultClusterParametersResponse
newDescribeDefaultClusterParametersResponse
  Int
pHttpStatus_
  DefaultClusterParameters
pDefaultClusterParameters_ =
    DescribeDefaultClusterParametersResponse' :: Int
-> DefaultClusterParameters
-> DescribeDefaultClusterParametersResponse
DescribeDefaultClusterParametersResponse'
      { $sel:httpStatus:DescribeDefaultClusterParametersResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:defaultClusterParameters:DescribeDefaultClusterParametersResponse' :: DefaultClusterParameters
defaultClusterParameters =
          DefaultClusterParameters
pDefaultClusterParameters_
      }

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

-- | Undocumented member.
describeDefaultClusterParametersResponse_defaultClusterParameters :: Lens.Lens' DescribeDefaultClusterParametersResponse DefaultClusterParameters
describeDefaultClusterParametersResponse_defaultClusterParameters :: (DefaultClusterParameters -> f DefaultClusterParameters)
-> DescribeDefaultClusterParametersResponse
-> f DescribeDefaultClusterParametersResponse
describeDefaultClusterParametersResponse_defaultClusterParameters = (DescribeDefaultClusterParametersResponse
 -> DefaultClusterParameters)
-> (DescribeDefaultClusterParametersResponse
    -> DefaultClusterParameters
    -> DescribeDefaultClusterParametersResponse)
-> Lens'
     DescribeDefaultClusterParametersResponse DefaultClusterParameters
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDefaultClusterParametersResponse' {DefaultClusterParameters
defaultClusterParameters :: DefaultClusterParameters
$sel:defaultClusterParameters:DescribeDefaultClusterParametersResponse' :: DescribeDefaultClusterParametersResponse
-> DefaultClusterParameters
defaultClusterParameters} -> DefaultClusterParameters
defaultClusterParameters) (\s :: DescribeDefaultClusterParametersResponse
s@DescribeDefaultClusterParametersResponse' {} DefaultClusterParameters
a -> DescribeDefaultClusterParametersResponse
s {$sel:defaultClusterParameters:DescribeDefaultClusterParametersResponse' :: DefaultClusterParameters
defaultClusterParameters = DefaultClusterParameters
a} :: DescribeDefaultClusterParametersResponse)

instance
  Prelude.NFData
    DescribeDefaultClusterParametersResponse