{-# 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.ElastiCache.DescribeCacheParameterGroups
-- 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 cache parameter group descriptions. If a cache
-- parameter group name is specified, the list contains only the
-- descriptions for that group.
--
-- This operation returns paginated results.
module Amazonka.ElastiCache.DescribeCacheParameterGroups
  ( -- * Creating a Request
    DescribeCacheParameterGroups (..),
    newDescribeCacheParameterGroups,

    -- * Request Lenses
    describeCacheParameterGroups_cacheParameterGroupName,
    describeCacheParameterGroups_marker,
    describeCacheParameterGroups_maxRecords,

    -- * Destructuring the Response
    DescribeCacheParameterGroupsResponse (..),
    newDescribeCacheParameterGroupsResponse,

    -- * Response Lenses
    describeCacheParameterGroupsResponse_cacheParameterGroups,
    describeCacheParameterGroupsResponse_marker,
    describeCacheParameterGroupsResponse_httpStatus,
  )
where

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

-- | Represents the input of a @DescribeCacheParameterGroups@ operation.
--
-- /See:/ 'newDescribeCacheParameterGroups' smart constructor.
data DescribeCacheParameterGroups = DescribeCacheParameterGroups'
  { -- | The name of a specific cache parameter group to return details for.
    DescribeCacheParameterGroups -> Maybe Text
cacheParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | An optional marker returned from a prior request. Use this marker for
    -- pagination of results from this operation. If this parameter is
    -- specified, the response includes only records beyond the marker, up to
    -- the value specified by @MaxRecords@.
    DescribeCacheParameterGroups -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more
    -- records exist than the specified @MaxRecords@ value, a marker is
    -- included in the response so that the remaining results can be retrieved.
    --
    -- Default: 100
    --
    -- Constraints: minimum 20; maximum 100.
    DescribeCacheParameterGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeCacheParameterGroups
-> DescribeCacheParameterGroups -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCacheParameterGroups
-> DescribeCacheParameterGroups -> Bool
$c/= :: DescribeCacheParameterGroups
-> DescribeCacheParameterGroups -> Bool
== :: DescribeCacheParameterGroups
-> DescribeCacheParameterGroups -> Bool
$c== :: DescribeCacheParameterGroups
-> DescribeCacheParameterGroups -> Bool
Prelude.Eq, ReadPrec [DescribeCacheParameterGroups]
ReadPrec DescribeCacheParameterGroups
Int -> ReadS DescribeCacheParameterGroups
ReadS [DescribeCacheParameterGroups]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCacheParameterGroups]
$creadListPrec :: ReadPrec [DescribeCacheParameterGroups]
readPrec :: ReadPrec DescribeCacheParameterGroups
$creadPrec :: ReadPrec DescribeCacheParameterGroups
readList :: ReadS [DescribeCacheParameterGroups]
$creadList :: ReadS [DescribeCacheParameterGroups]
readsPrec :: Int -> ReadS DescribeCacheParameterGroups
$creadsPrec :: Int -> ReadS DescribeCacheParameterGroups
Prelude.Read, Int -> DescribeCacheParameterGroups -> ShowS
[DescribeCacheParameterGroups] -> ShowS
DescribeCacheParameterGroups -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCacheParameterGroups] -> ShowS
$cshowList :: [DescribeCacheParameterGroups] -> ShowS
show :: DescribeCacheParameterGroups -> String
$cshow :: DescribeCacheParameterGroups -> String
showsPrec :: Int -> DescribeCacheParameterGroups -> ShowS
$cshowsPrec :: Int -> DescribeCacheParameterGroups -> ShowS
Prelude.Show, forall x.
Rep DescribeCacheParameterGroups x -> DescribeCacheParameterGroups
forall x.
DescribeCacheParameterGroups -> Rep DescribeCacheParameterGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCacheParameterGroups x -> DescribeCacheParameterGroups
$cfrom :: forall x.
DescribeCacheParameterGroups -> Rep DescribeCacheParameterGroups x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCacheParameterGroups' 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:
--
-- 'cacheParameterGroupName', 'describeCacheParameterGroups_cacheParameterGroupName' - The name of a specific cache parameter group to return details for.
--
-- 'marker', 'describeCacheParameterGroups_marker' - An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
--
-- 'maxRecords', 'describeCacheParameterGroups_maxRecords' - The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a marker is
-- included in the response so that the remaining results can be retrieved.
--
-- Default: 100
--
-- Constraints: minimum 20; maximum 100.
newDescribeCacheParameterGroups ::
  DescribeCacheParameterGroups
newDescribeCacheParameterGroups :: DescribeCacheParameterGroups
newDescribeCacheParameterGroups =
  DescribeCacheParameterGroups'
    { $sel:cacheParameterGroupName:DescribeCacheParameterGroups' :: Maybe Text
cacheParameterGroupName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeCacheParameterGroups' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeCacheParameterGroups' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing
    }

-- | The name of a specific cache parameter group to return details for.
describeCacheParameterGroups_cacheParameterGroupName :: Lens.Lens' DescribeCacheParameterGroups (Prelude.Maybe Prelude.Text)
describeCacheParameterGroups_cacheParameterGroupName :: Lens' DescribeCacheParameterGroups (Maybe Text)
describeCacheParameterGroups_cacheParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheParameterGroups' {Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:cacheParameterGroupName:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Text
cacheParameterGroupName} -> Maybe Text
cacheParameterGroupName) (\s :: DescribeCacheParameterGroups
s@DescribeCacheParameterGroups' {} Maybe Text
a -> DescribeCacheParameterGroups
s {$sel:cacheParameterGroupName:DescribeCacheParameterGroups' :: Maybe Text
cacheParameterGroupName = Maybe Text
a} :: DescribeCacheParameterGroups)

-- | An optional marker returned from a prior request. Use this marker for
-- pagination of results from this operation. If this parameter is
-- specified, the response includes only records beyond the marker, up to
-- the value specified by @MaxRecords@.
describeCacheParameterGroups_marker :: Lens.Lens' DescribeCacheParameterGroups (Prelude.Maybe Prelude.Text)
describeCacheParameterGroups_marker :: Lens' DescribeCacheParameterGroups (Maybe Text)
describeCacheParameterGroups_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheParameterGroups' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeCacheParameterGroups
s@DescribeCacheParameterGroups' {} Maybe Text
a -> DescribeCacheParameterGroups
s {$sel:marker:DescribeCacheParameterGroups' :: Maybe Text
marker = Maybe Text
a} :: DescribeCacheParameterGroups)

-- | The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a marker is
-- included in the response so that the remaining results can be retrieved.
--
-- Default: 100
--
-- Constraints: minimum 20; maximum 100.
describeCacheParameterGroups_maxRecords :: Lens.Lens' DescribeCacheParameterGroups (Prelude.Maybe Prelude.Int)
describeCacheParameterGroups_maxRecords :: Lens' DescribeCacheParameterGroups (Maybe Int)
describeCacheParameterGroups_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheParameterGroups' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeCacheParameterGroups
s@DescribeCacheParameterGroups' {} Maybe Int
a -> DescribeCacheParameterGroups
s {$sel:maxRecords:DescribeCacheParameterGroups' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeCacheParameterGroups)

instance Core.AWSPager DescribeCacheParameterGroups where
  page :: DescribeCacheParameterGroups
-> AWSResponse DescribeCacheParameterGroups
-> Maybe DescribeCacheParameterGroups
page DescribeCacheParameterGroups
rq AWSResponse DescribeCacheParameterGroups
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeCacheParameterGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeCacheParameterGroupsResponse (Maybe Text)
describeCacheParameterGroupsResponse_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 DescribeCacheParameterGroups
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeCacheParameterGroupsResponse (Maybe [CacheParameterGroup])
describeCacheParameterGroupsResponse_cacheParameterGroups
            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.$ DescribeCacheParameterGroups
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeCacheParameterGroups (Maybe Text)
describeCacheParameterGroups_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeCacheParameterGroups
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeCacheParameterGroupsResponse (Maybe Text)
describeCacheParameterGroupsResponse_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 DescribeCacheParameterGroups where
  type
    AWSResponse DescribeCacheParameterGroups =
      DescribeCacheParameterGroupsResponse
  request :: (Service -> Service)
-> DescribeCacheParameterGroups
-> Request DescribeCacheParameterGroups
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 DescribeCacheParameterGroups
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCacheParameterGroups)))
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
"DescribeCacheParameterGroupsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [CacheParameterGroup]
-> Maybe Text -> Int -> DescribeCacheParameterGroupsResponse
DescribeCacheParameterGroupsResponse'
            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
"CacheParameterGroups"
                            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
"CacheParameterGroup")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DescribeCacheParameterGroups
  where
  hashWithSalt :: Int -> DescribeCacheParameterGroups -> Int
hashWithSalt Int
_salt DescribeCacheParameterGroups' {Maybe Int
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:maxRecords:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Int
$sel:marker:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Text
$sel:cacheParameterGroupName:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheParameterGroupName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords

instance Prelude.NFData DescribeCacheParameterGroups where
  rnf :: DescribeCacheParameterGroups -> ()
rnf DescribeCacheParameterGroups' {Maybe Int
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:maxRecords:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Int
$sel:marker:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Text
$sel:cacheParameterGroupName:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheParameterGroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords

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

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

instance Data.ToQuery DescribeCacheParameterGroups where
  toQuery :: DescribeCacheParameterGroups -> QueryString
toQuery DescribeCacheParameterGroups' {Maybe Int
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:maxRecords:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Int
$sel:marker:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Text
$sel:cacheParameterGroupName:DescribeCacheParameterGroups' :: DescribeCacheParameterGroups -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DescribeCacheParameterGroups" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
        ByteString
"CacheParameterGroupName"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheParameterGroupName,
        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
      ]

-- | Represents the output of a @DescribeCacheParameterGroups@ operation.
--
-- /See:/ 'newDescribeCacheParameterGroupsResponse' smart constructor.
data DescribeCacheParameterGroupsResponse = DescribeCacheParameterGroupsResponse'
  { -- | A list of cache parameter groups. Each element in the list contains
    -- detailed information about one cache parameter group.
    DescribeCacheParameterGroupsResponse -> Maybe [CacheParameterGroup]
cacheParameterGroups :: Prelude.Maybe [CacheParameterGroup],
    -- | Provides an identifier to allow retrieval of paginated results.
    DescribeCacheParameterGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeCacheParameterGroupsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeCacheParameterGroupsResponse
-> DescribeCacheParameterGroupsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCacheParameterGroupsResponse
-> DescribeCacheParameterGroupsResponse -> Bool
$c/= :: DescribeCacheParameterGroupsResponse
-> DescribeCacheParameterGroupsResponse -> Bool
== :: DescribeCacheParameterGroupsResponse
-> DescribeCacheParameterGroupsResponse -> Bool
$c== :: DescribeCacheParameterGroupsResponse
-> DescribeCacheParameterGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCacheParameterGroupsResponse]
ReadPrec DescribeCacheParameterGroupsResponse
Int -> ReadS DescribeCacheParameterGroupsResponse
ReadS [DescribeCacheParameterGroupsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCacheParameterGroupsResponse]
$creadListPrec :: ReadPrec [DescribeCacheParameterGroupsResponse]
readPrec :: ReadPrec DescribeCacheParameterGroupsResponse
$creadPrec :: ReadPrec DescribeCacheParameterGroupsResponse
readList :: ReadS [DescribeCacheParameterGroupsResponse]
$creadList :: ReadS [DescribeCacheParameterGroupsResponse]
readsPrec :: Int -> ReadS DescribeCacheParameterGroupsResponse
$creadsPrec :: Int -> ReadS DescribeCacheParameterGroupsResponse
Prelude.Read, Int -> DescribeCacheParameterGroupsResponse -> ShowS
[DescribeCacheParameterGroupsResponse] -> ShowS
DescribeCacheParameterGroupsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCacheParameterGroupsResponse] -> ShowS
$cshowList :: [DescribeCacheParameterGroupsResponse] -> ShowS
show :: DescribeCacheParameterGroupsResponse -> String
$cshow :: DescribeCacheParameterGroupsResponse -> String
showsPrec :: Int -> DescribeCacheParameterGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeCacheParameterGroupsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeCacheParameterGroupsResponse x
-> DescribeCacheParameterGroupsResponse
forall x.
DescribeCacheParameterGroupsResponse
-> Rep DescribeCacheParameterGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCacheParameterGroupsResponse x
-> DescribeCacheParameterGroupsResponse
$cfrom :: forall x.
DescribeCacheParameterGroupsResponse
-> Rep DescribeCacheParameterGroupsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCacheParameterGroupsResponse' 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:
--
-- 'cacheParameterGroups', 'describeCacheParameterGroupsResponse_cacheParameterGroups' - A list of cache parameter groups. Each element in the list contains
-- detailed information about one cache parameter group.
--
-- 'marker', 'describeCacheParameterGroupsResponse_marker' - Provides an identifier to allow retrieval of paginated results.
--
-- 'httpStatus', 'describeCacheParameterGroupsResponse_httpStatus' - The response's http status code.
newDescribeCacheParameterGroupsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeCacheParameterGroupsResponse
newDescribeCacheParameterGroupsResponse :: Int -> DescribeCacheParameterGroupsResponse
newDescribeCacheParameterGroupsResponse Int
pHttpStatus_ =
  DescribeCacheParameterGroupsResponse'
    { $sel:cacheParameterGroups:DescribeCacheParameterGroupsResponse' :: Maybe [CacheParameterGroup]
cacheParameterGroups =
        forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeCacheParameterGroupsResponse' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeCacheParameterGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of cache parameter groups. Each element in the list contains
-- detailed information about one cache parameter group.
describeCacheParameterGroupsResponse_cacheParameterGroups :: Lens.Lens' DescribeCacheParameterGroupsResponse (Prelude.Maybe [CacheParameterGroup])
describeCacheParameterGroupsResponse_cacheParameterGroups :: Lens'
  DescribeCacheParameterGroupsResponse (Maybe [CacheParameterGroup])
describeCacheParameterGroupsResponse_cacheParameterGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheParameterGroupsResponse' {Maybe [CacheParameterGroup]
cacheParameterGroups :: Maybe [CacheParameterGroup]
$sel:cacheParameterGroups:DescribeCacheParameterGroupsResponse' :: DescribeCacheParameterGroupsResponse -> Maybe [CacheParameterGroup]
cacheParameterGroups} -> Maybe [CacheParameterGroup]
cacheParameterGroups) (\s :: DescribeCacheParameterGroupsResponse
s@DescribeCacheParameterGroupsResponse' {} Maybe [CacheParameterGroup]
a -> DescribeCacheParameterGroupsResponse
s {$sel:cacheParameterGroups:DescribeCacheParameterGroupsResponse' :: Maybe [CacheParameterGroup]
cacheParameterGroups = Maybe [CacheParameterGroup]
a} :: DescribeCacheParameterGroupsResponse) 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

-- | Provides an identifier to allow retrieval of paginated results.
describeCacheParameterGroupsResponse_marker :: Lens.Lens' DescribeCacheParameterGroupsResponse (Prelude.Maybe Prelude.Text)
describeCacheParameterGroupsResponse_marker :: Lens' DescribeCacheParameterGroupsResponse (Maybe Text)
describeCacheParameterGroupsResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheParameterGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeCacheParameterGroupsResponse' :: DescribeCacheParameterGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeCacheParameterGroupsResponse
s@DescribeCacheParameterGroupsResponse' {} Maybe Text
a -> DescribeCacheParameterGroupsResponse
s {$sel:marker:DescribeCacheParameterGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeCacheParameterGroupsResponse)

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

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