{-# 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.DescribeClusterParameterGroups
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of Amazon Redshift parameter groups, including parameter
-- groups you created and the default parameter group. For each parameter
-- group, the response includes the parameter group name, description, and
-- parameter group family name. You can optionally specify a name to
-- retrieve the description of a specific parameter group.
--
-- 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/.
--
-- If you specify both tag keys and tag values in the same request, Amazon
-- Redshift returns all parameter groups that match any combination of the
-- specified keys and values. For example, if you have @owner@ and
-- @environment@ for tag keys, and @admin@ and @test@ for tag values, all
-- parameter groups that have any combination of those values are returned.
--
-- If both tag keys and values are omitted from the request, parameter
-- groups are returned regardless of whether they have tag keys or values
-- associated with them.
--
-- This operation returns paginated results.
module Amazonka.Redshift.DescribeClusterParameterGroups
  ( -- * Creating a Request
    DescribeClusterParameterGroups (..),
    newDescribeClusterParameterGroups,

    -- * Request Lenses
    describeClusterParameterGroups_marker,
    describeClusterParameterGroups_maxRecords,
    describeClusterParameterGroups_parameterGroupName,
    describeClusterParameterGroups_tagKeys,
    describeClusterParameterGroups_tagValues,

    -- * Destructuring the Response
    DescribeClusterParameterGroupsResponse (..),
    newDescribeClusterParameterGroupsResponse,

    -- * Response Lenses
    describeClusterParameterGroupsResponse_marker,
    describeClusterParameterGroupsResponse_parameterGroups,
    describeClusterParameterGroupsResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newDescribeClusterParameterGroups' smart constructor.
data DescribeClusterParameterGroups = DescribeClusterParameterGroups'
  { -- | An optional parameter that specifies the starting point to return a set
    -- of response records. When the results of a
    -- DescribeClusterParameterGroups 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.
    DescribeClusterParameterGroups -> 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.
    DescribeClusterParameterGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The name of a specific parameter group for which to return details. By
    -- default, details about all parameter groups and the default parameter
    -- group are returned.
    DescribeClusterParameterGroups -> Maybe Text
parameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | A tag key or keys for which you want to return all matching cluster
    -- parameter groups that are associated with the specified key or keys. For
    -- example, suppose that you have parameter groups that are tagged with
    -- keys called @owner@ and @environment@. If you specify both of these tag
    -- keys in the request, Amazon Redshift returns a response with the
    -- parameter groups that have either or both of these tag keys associated
    -- with them.
    DescribeClusterParameterGroups -> Maybe [Text]
tagKeys :: Prelude.Maybe [Prelude.Text],
    -- | A tag value or values for which you want to return all matching cluster
    -- parameter groups that are associated with the specified tag value or
    -- values. For example, suppose that you have parameter groups that are
    -- tagged with values called @admin@ and @test@. If you specify both of
    -- these tag values in the request, Amazon Redshift returns a response with
    -- the parameter groups that have either or both of these tag values
    -- associated with them.
    DescribeClusterParameterGroups -> Maybe [Text]
tagValues :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeClusterParameterGroups
-> DescribeClusterParameterGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClusterParameterGroups
-> DescribeClusterParameterGroups -> Bool
$c/= :: DescribeClusterParameterGroups
-> DescribeClusterParameterGroups -> Bool
== :: DescribeClusterParameterGroups
-> DescribeClusterParameterGroups -> Bool
$c== :: DescribeClusterParameterGroups
-> DescribeClusterParameterGroups -> Bool
Prelude.Eq, ReadPrec [DescribeClusterParameterGroups]
ReadPrec DescribeClusterParameterGroups
Int -> ReadS DescribeClusterParameterGroups
ReadS [DescribeClusterParameterGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClusterParameterGroups]
$creadListPrec :: ReadPrec [DescribeClusterParameterGroups]
readPrec :: ReadPrec DescribeClusterParameterGroups
$creadPrec :: ReadPrec DescribeClusterParameterGroups
readList :: ReadS [DescribeClusterParameterGroups]
$creadList :: ReadS [DescribeClusterParameterGroups]
readsPrec :: Int -> ReadS DescribeClusterParameterGroups
$creadsPrec :: Int -> ReadS DescribeClusterParameterGroups
Prelude.Read, Int -> DescribeClusterParameterGroups -> ShowS
[DescribeClusterParameterGroups] -> ShowS
DescribeClusterParameterGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClusterParameterGroups] -> ShowS
$cshowList :: [DescribeClusterParameterGroups] -> ShowS
show :: DescribeClusterParameterGroups -> String
$cshow :: DescribeClusterParameterGroups -> String
showsPrec :: Int -> DescribeClusterParameterGroups -> ShowS
$cshowsPrec :: Int -> DescribeClusterParameterGroups -> ShowS
Prelude.Show, forall x.
Rep DescribeClusterParameterGroups x
-> DescribeClusterParameterGroups
forall x.
DescribeClusterParameterGroups
-> Rep DescribeClusterParameterGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClusterParameterGroups x
-> DescribeClusterParameterGroups
$cfrom :: forall x.
DescribeClusterParameterGroups
-> Rep DescribeClusterParameterGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeClusterParameterGroups' 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', 'describeClusterParameterGroups_marker' - An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a
-- DescribeClusterParameterGroups 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', 'describeClusterParameterGroups_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.
--
-- 'parameterGroupName', 'describeClusterParameterGroups_parameterGroupName' - The name of a specific parameter group for which to return details. By
-- default, details about all parameter groups and the default parameter
-- group are returned.
--
-- 'tagKeys', 'describeClusterParameterGroups_tagKeys' - A tag key or keys for which you want to return all matching cluster
-- parameter groups that are associated with the specified key or keys. For
-- example, suppose that you have parameter groups that are tagged with
-- keys called @owner@ and @environment@. If you specify both of these tag
-- keys in the request, Amazon Redshift returns a response with the
-- parameter groups that have either or both of these tag keys associated
-- with them.
--
-- 'tagValues', 'describeClusterParameterGroups_tagValues' - A tag value or values for which you want to return all matching cluster
-- parameter groups that are associated with the specified tag value or
-- values. For example, suppose that you have parameter groups that are
-- tagged with values called @admin@ and @test@. If you specify both of
-- these tag values in the request, Amazon Redshift returns a response with
-- the parameter groups that have either or both of these tag values
-- associated with them.
newDescribeClusterParameterGroups ::
  DescribeClusterParameterGroups
newDescribeClusterParameterGroups :: DescribeClusterParameterGroups
newDescribeClusterParameterGroups =
  DescribeClusterParameterGroups'
    { $sel:marker:DescribeClusterParameterGroups' :: Maybe Text
marker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeClusterParameterGroups' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupName:DescribeClusterParameterGroups' :: Maybe Text
parameterGroupName = forall a. Maybe a
Prelude.Nothing,
      $sel:tagKeys:DescribeClusterParameterGroups' :: Maybe [Text]
tagKeys = forall a. Maybe a
Prelude.Nothing,
      $sel:tagValues:DescribeClusterParameterGroups' :: Maybe [Text]
tagValues = forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | The name of a specific parameter group for which to return details. By
-- default, details about all parameter groups and the default parameter
-- group are returned.
describeClusterParameterGroups_parameterGroupName :: Lens.Lens' DescribeClusterParameterGroups (Prelude.Maybe Prelude.Text)
describeClusterParameterGroups_parameterGroupName :: Lens' DescribeClusterParameterGroups (Maybe Text)
describeClusterParameterGroups_parameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameterGroups' {Maybe Text
parameterGroupName :: Maybe Text
$sel:parameterGroupName:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Text
parameterGroupName} -> Maybe Text
parameterGroupName) (\s :: DescribeClusterParameterGroups
s@DescribeClusterParameterGroups' {} Maybe Text
a -> DescribeClusterParameterGroups
s {$sel:parameterGroupName:DescribeClusterParameterGroups' :: Maybe Text
parameterGroupName = Maybe Text
a} :: DescribeClusterParameterGroups)

-- | A tag key or keys for which you want to return all matching cluster
-- parameter groups that are associated with the specified key or keys. For
-- example, suppose that you have parameter groups that are tagged with
-- keys called @owner@ and @environment@. If you specify both of these tag
-- keys in the request, Amazon Redshift returns a response with the
-- parameter groups that have either or both of these tag keys associated
-- with them.
describeClusterParameterGroups_tagKeys :: Lens.Lens' DescribeClusterParameterGroups (Prelude.Maybe [Prelude.Text])
describeClusterParameterGroups_tagKeys :: Lens' DescribeClusterParameterGroups (Maybe [Text])
describeClusterParameterGroups_tagKeys = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameterGroups' {Maybe [Text]
tagKeys :: Maybe [Text]
$sel:tagKeys:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe [Text]
tagKeys} -> Maybe [Text]
tagKeys) (\s :: DescribeClusterParameterGroups
s@DescribeClusterParameterGroups' {} Maybe [Text]
a -> DescribeClusterParameterGroups
s {$sel:tagKeys:DescribeClusterParameterGroups' :: Maybe [Text]
tagKeys = Maybe [Text]
a} :: DescribeClusterParameterGroups) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A tag value or values for which you want to return all matching cluster
-- parameter groups that are associated with the specified tag value or
-- values. For example, suppose that you have parameter groups that are
-- tagged with values called @admin@ and @test@. If you specify both of
-- these tag values in the request, Amazon Redshift returns a response with
-- the parameter groups that have either or both of these tag values
-- associated with them.
describeClusterParameterGroups_tagValues :: Lens.Lens' DescribeClusterParameterGroups (Prelude.Maybe [Prelude.Text])
describeClusterParameterGroups_tagValues :: Lens' DescribeClusterParameterGroups (Maybe [Text])
describeClusterParameterGroups_tagValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameterGroups' {Maybe [Text]
tagValues :: Maybe [Text]
$sel:tagValues:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe [Text]
tagValues} -> Maybe [Text]
tagValues) (\s :: DescribeClusterParameterGroups
s@DescribeClusterParameterGroups' {} Maybe [Text]
a -> DescribeClusterParameterGroups
s {$sel:tagValues:DescribeClusterParameterGroups' :: Maybe [Text]
tagValues = Maybe [Text]
a} :: DescribeClusterParameterGroups) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSPager DescribeClusterParameterGroups where
  page :: DescribeClusterParameterGroups
-> AWSResponse DescribeClusterParameterGroups
-> Maybe DescribeClusterParameterGroups
page DescribeClusterParameterGroups
rq AWSResponse DescribeClusterParameterGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeClusterParameterGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeClusterParameterGroupsResponse (Maybe Text)
describeClusterParameterGroupsResponse_marker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeClusterParameterGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeClusterParameterGroupsResponse
  (Maybe [ClusterParameterGroup])
describeClusterParameterGroupsResponse_parameterGroups
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeClusterParameterGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeClusterParameterGroups (Maybe Text)
describeClusterParameterGroups_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeClusterParameterGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeClusterParameterGroupsResponse (Maybe Text)
describeClusterParameterGroupsResponse_marker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance
  Prelude.Hashable
    DescribeClusterParameterGroups
  where
  hashWithSalt :: Int -> DescribeClusterParameterGroups -> Int
hashWithSalt
    Int
_salt
    DescribeClusterParameterGroups' {Maybe Int
Maybe [Text]
Maybe Text
tagValues :: Maybe [Text]
tagKeys :: Maybe [Text]
parameterGroupName :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:tagValues:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe [Text]
$sel:tagKeys:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe [Text]
$sel:parameterGroupName:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Text
$sel:maxRecords:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Int
$sel:marker:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parameterGroupName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
tagKeys
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
tagValues

instance
  Prelude.NFData
    DescribeClusterParameterGroups
  where
  rnf :: DescribeClusterParameterGroups -> ()
rnf DescribeClusterParameterGroups' {Maybe Int
Maybe [Text]
Maybe Text
tagValues :: Maybe [Text]
tagKeys :: Maybe [Text]
parameterGroupName :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:tagValues:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe [Text]
$sel:tagKeys:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe [Text]
$sel:parameterGroupName:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Text
$sel:maxRecords:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Int
$sel:marker:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parameterGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
tagKeys
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
tagValues

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

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

instance Data.ToQuery DescribeClusterParameterGroups where
  toQuery :: DescribeClusterParameterGroups -> QueryString
toQuery DescribeClusterParameterGroups' {Maybe Int
Maybe [Text]
Maybe Text
tagValues :: Maybe [Text]
tagKeys :: Maybe [Text]
parameterGroupName :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:tagValues:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe [Text]
$sel:tagKeys:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe [Text]
$sel:parameterGroupName:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Text
$sel:maxRecords:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Int
$sel:marker:DescribeClusterParameterGroups' :: DescribeClusterParameterGroups -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DescribeClusterParameterGroups" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
        ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxRecords,
        ByteString
"ParameterGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
parameterGroupName,
        ByteString
"TagKeys"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"TagKey" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagKeys),
        ByteString
"TagValues"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"TagValue" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagValues)
      ]

-- | Contains the output from the DescribeClusterParameterGroups action.
--
-- /See:/ 'newDescribeClusterParameterGroupsResponse' smart constructor.
data DescribeClusterParameterGroupsResponse = DescribeClusterParameterGroupsResponse'
  { -- | 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.
    DescribeClusterParameterGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of ClusterParameterGroup instances. Each instance describes one
    -- cluster parameter group.
    DescribeClusterParameterGroupsResponse
-> Maybe [ClusterParameterGroup]
parameterGroups :: Prelude.Maybe [ClusterParameterGroup],
    -- | The response's http status code.
    DescribeClusterParameterGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeClusterParameterGroupsResponse
-> DescribeClusterParameterGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClusterParameterGroupsResponse
-> DescribeClusterParameterGroupsResponse -> Bool
$c/= :: DescribeClusterParameterGroupsResponse
-> DescribeClusterParameterGroupsResponse -> Bool
== :: DescribeClusterParameterGroupsResponse
-> DescribeClusterParameterGroupsResponse -> Bool
$c== :: DescribeClusterParameterGroupsResponse
-> DescribeClusterParameterGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeClusterParameterGroupsResponse]
ReadPrec DescribeClusterParameterGroupsResponse
Int -> ReadS DescribeClusterParameterGroupsResponse
ReadS [DescribeClusterParameterGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClusterParameterGroupsResponse]
$creadListPrec :: ReadPrec [DescribeClusterParameterGroupsResponse]
readPrec :: ReadPrec DescribeClusterParameterGroupsResponse
$creadPrec :: ReadPrec DescribeClusterParameterGroupsResponse
readList :: ReadS [DescribeClusterParameterGroupsResponse]
$creadList :: ReadS [DescribeClusterParameterGroupsResponse]
readsPrec :: Int -> ReadS DescribeClusterParameterGroupsResponse
$creadsPrec :: Int -> ReadS DescribeClusterParameterGroupsResponse
Prelude.Read, Int -> DescribeClusterParameterGroupsResponse -> ShowS
[DescribeClusterParameterGroupsResponse] -> ShowS
DescribeClusterParameterGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClusterParameterGroupsResponse] -> ShowS
$cshowList :: [DescribeClusterParameterGroupsResponse] -> ShowS
show :: DescribeClusterParameterGroupsResponse -> String
$cshow :: DescribeClusterParameterGroupsResponse -> String
showsPrec :: Int -> DescribeClusterParameterGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeClusterParameterGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeClusterParameterGroupsResponse x
-> DescribeClusterParameterGroupsResponse
forall x.
DescribeClusterParameterGroupsResponse
-> Rep DescribeClusterParameterGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClusterParameterGroupsResponse x
-> DescribeClusterParameterGroupsResponse
$cfrom :: forall x.
DescribeClusterParameterGroupsResponse
-> Rep DescribeClusterParameterGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeClusterParameterGroupsResponse' 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', 'describeClusterParameterGroupsResponse_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.
--
-- 'parameterGroups', 'describeClusterParameterGroupsResponse_parameterGroups' - A list of ClusterParameterGroup instances. Each instance describes one
-- cluster parameter group.
--
-- 'httpStatus', 'describeClusterParameterGroupsResponse_httpStatus' - The response's http status code.
newDescribeClusterParameterGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeClusterParameterGroupsResponse
newDescribeClusterParameterGroupsResponse :: Int -> DescribeClusterParameterGroupsResponse
newDescribeClusterParameterGroupsResponse
  Int
pHttpStatus_ =
    DescribeClusterParameterGroupsResponse'
      { $sel:marker:DescribeClusterParameterGroupsResponse' :: Maybe Text
marker =
          forall a. Maybe a
Prelude.Nothing,
        $sel:parameterGroups:DescribeClusterParameterGroupsResponse' :: Maybe [ClusterParameterGroup]
parameterGroups = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeClusterParameterGroupsResponse' :: 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.
describeClusterParameterGroupsResponse_marker :: Lens.Lens' DescribeClusterParameterGroupsResponse (Prelude.Maybe Prelude.Text)
describeClusterParameterGroupsResponse_marker :: Lens' DescribeClusterParameterGroupsResponse (Maybe Text)
describeClusterParameterGroupsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameterGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeClusterParameterGroupsResponse' :: DescribeClusterParameterGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeClusterParameterGroupsResponse
s@DescribeClusterParameterGroupsResponse' {} Maybe Text
a -> DescribeClusterParameterGroupsResponse
s {$sel:marker:DescribeClusterParameterGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeClusterParameterGroupsResponse)

-- | A list of ClusterParameterGroup instances. Each instance describes one
-- cluster parameter group.
describeClusterParameterGroupsResponse_parameterGroups :: Lens.Lens' DescribeClusterParameterGroupsResponse (Prelude.Maybe [ClusterParameterGroup])
describeClusterParameterGroupsResponse_parameterGroups :: Lens'
  DescribeClusterParameterGroupsResponse
  (Maybe [ClusterParameterGroup])
describeClusterParameterGroupsResponse_parameterGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterParameterGroupsResponse' {Maybe [ClusterParameterGroup]
parameterGroups :: Maybe [ClusterParameterGroup]
$sel:parameterGroups:DescribeClusterParameterGroupsResponse' :: DescribeClusterParameterGroupsResponse
-> Maybe [ClusterParameterGroup]
parameterGroups} -> Maybe [ClusterParameterGroup]
parameterGroups) (\s :: DescribeClusterParameterGroupsResponse
s@DescribeClusterParameterGroupsResponse' {} Maybe [ClusterParameterGroup]
a -> DescribeClusterParameterGroupsResponse
s {$sel:parameterGroups:DescribeClusterParameterGroupsResponse' :: Maybe [ClusterParameterGroup]
parameterGroups = Maybe [ClusterParameterGroup]
a} :: DescribeClusterParameterGroupsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeClusterParameterGroupsResponse
  where
  rnf :: DescribeClusterParameterGroupsResponse -> ()
rnf DescribeClusterParameterGroupsResponse' {Int
Maybe [ClusterParameterGroup]
Maybe Text
httpStatus :: Int
parameterGroups :: Maybe [ClusterParameterGroup]
marker :: Maybe Text
$sel:httpStatus:DescribeClusterParameterGroupsResponse' :: DescribeClusterParameterGroupsResponse -> Int
$sel:parameterGroups:DescribeClusterParameterGroupsResponse' :: DescribeClusterParameterGroupsResponse
-> Maybe [ClusterParameterGroup]
$sel:marker:DescribeClusterParameterGroupsResponse' :: DescribeClusterParameterGroupsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ClusterParameterGroup]
parameterGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus