{-# 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.DAX.DescribeParameters
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the detailed parameter list for a particular parameter group.
--
-- This operation returns paginated results.
module Amazonka.DAX.DescribeParameters
  ( -- * Creating a Request
    DescribeParameters (..),
    newDescribeParameters,

    -- * Request Lenses
    describeParameters_nextToken,
    describeParameters_source,
    describeParameters_maxResults,
    describeParameters_parameterGroupName,

    -- * Destructuring the Response
    DescribeParametersResponse (..),
    newDescribeParametersResponse,

    -- * Response Lenses
    describeParametersResponse_nextToken,
    describeParametersResponse_parameters,
    describeParametersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeParameters' smart constructor.
data DescribeParameters = DescribeParameters'
  { -- | An optional token returned from a prior request. Use this token for
    -- pagination of results from this action. If this parameter is specified,
    -- the response includes only results beyond the token, up to the value
    -- specified by @MaxResults@.
    DescribeParameters -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | How the parameter is defined. For example, @system@ denotes a
    -- system-defined parameter.
    DescribeParameters -> Maybe Text
source :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to include in the response. If more
    -- results exist than the specified @MaxResults@ value, a token is included
    -- in the response so that the remaining results can be retrieved.
    --
    -- The value for @MaxResults@ must be between 20 and 100.
    DescribeParameters -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The name of the parameter group.
    DescribeParameters -> Text
parameterGroupName :: Prelude.Text
  }
  deriving (DescribeParameters -> DescribeParameters -> Bool
(DescribeParameters -> DescribeParameters -> Bool)
-> (DescribeParameters -> DescribeParameters -> Bool)
-> Eq DescribeParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeParameters -> DescribeParameters -> Bool
$c/= :: DescribeParameters -> DescribeParameters -> Bool
== :: DescribeParameters -> DescribeParameters -> Bool
$c== :: DescribeParameters -> DescribeParameters -> Bool
Prelude.Eq, ReadPrec [DescribeParameters]
ReadPrec DescribeParameters
Int -> ReadS DescribeParameters
ReadS [DescribeParameters]
(Int -> ReadS DescribeParameters)
-> ReadS [DescribeParameters]
-> ReadPrec DescribeParameters
-> ReadPrec [DescribeParameters]
-> Read DescribeParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeParameters]
$creadListPrec :: ReadPrec [DescribeParameters]
readPrec :: ReadPrec DescribeParameters
$creadPrec :: ReadPrec DescribeParameters
readList :: ReadS [DescribeParameters]
$creadList :: ReadS [DescribeParameters]
readsPrec :: Int -> ReadS DescribeParameters
$creadsPrec :: Int -> ReadS DescribeParameters
Prelude.Read, Int -> DescribeParameters -> ShowS
[DescribeParameters] -> ShowS
DescribeParameters -> String
(Int -> DescribeParameters -> ShowS)
-> (DescribeParameters -> String)
-> ([DescribeParameters] -> ShowS)
-> Show DescribeParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeParameters] -> ShowS
$cshowList :: [DescribeParameters] -> ShowS
show :: DescribeParameters -> String
$cshow :: DescribeParameters -> String
showsPrec :: Int -> DescribeParameters -> ShowS
$cshowsPrec :: Int -> DescribeParameters -> ShowS
Prelude.Show, (forall x. DescribeParameters -> Rep DescribeParameters x)
-> (forall x. Rep DescribeParameters x -> DescribeParameters)
-> Generic DescribeParameters
forall x. Rep DescribeParameters x -> DescribeParameters
forall x. DescribeParameters -> Rep DescribeParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeParameters x -> DescribeParameters
$cfrom :: forall x. DescribeParameters -> Rep DescribeParameters x
Prelude.Generic)

-- |
-- Create a value of 'DescribeParameters' 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:
--
-- 'nextToken', 'describeParameters_nextToken' - An optional token returned from a prior request. Use this token for
-- pagination of results from this action. If this parameter is specified,
-- the response includes only results beyond the token, up to the value
-- specified by @MaxResults@.
--
-- 'source', 'describeParameters_source' - How the parameter is defined. For example, @system@ denotes a
-- system-defined parameter.
--
-- 'maxResults', 'describeParameters_maxResults' - The maximum number of results to include in the response. If more
-- results exist than the specified @MaxResults@ value, a token is included
-- in the response so that the remaining results can be retrieved.
--
-- The value for @MaxResults@ must be between 20 and 100.
--
-- 'parameterGroupName', 'describeParameters_parameterGroupName' - The name of the parameter group.
newDescribeParameters ::
  -- | 'parameterGroupName'
  Prelude.Text ->
  DescribeParameters
newDescribeParameters :: Text -> DescribeParameters
newDescribeParameters Text
pParameterGroupName_ =
  DescribeParameters' :: Maybe Text -> Maybe Text -> Maybe Int -> Text -> DescribeParameters
DescribeParameters'
    { $sel:nextToken:DescribeParameters' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:DescribeParameters' :: Maybe Text
source = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeParameters' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupName:DescribeParameters' :: Text
parameterGroupName = Text
pParameterGroupName_
    }

-- | An optional token returned from a prior request. Use this token for
-- pagination of results from this action. If this parameter is specified,
-- the response includes only results beyond the token, up to the value
-- specified by @MaxResults@.
describeParameters_nextToken :: Lens.Lens' DescribeParameters (Prelude.Maybe Prelude.Text)
describeParameters_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeParameters -> f DescribeParameters
describeParameters_nextToken = (DescribeParameters -> Maybe Text)
-> (DescribeParameters -> Maybe Text -> DescribeParameters)
-> Lens
     DescribeParameters DescribeParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameters' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeParameters' :: DescribeParameters -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeParameters
s@DescribeParameters' {} Maybe Text
a -> DescribeParameters
s {$sel:nextToken:DescribeParameters' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeParameters)

-- | How the parameter is defined. For example, @system@ denotes a
-- system-defined parameter.
describeParameters_source :: Lens.Lens' DescribeParameters (Prelude.Maybe Prelude.Text)
describeParameters_source :: (Maybe Text -> f (Maybe Text))
-> DescribeParameters -> f DescribeParameters
describeParameters_source = (DescribeParameters -> Maybe Text)
-> (DescribeParameters -> Maybe Text -> DescribeParameters)
-> Lens
     DescribeParameters DescribeParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameters' {Maybe Text
source :: Maybe Text
$sel:source:DescribeParameters' :: DescribeParameters -> Maybe Text
source} -> Maybe Text
source) (\s :: DescribeParameters
s@DescribeParameters' {} Maybe Text
a -> DescribeParameters
s {$sel:source:DescribeParameters' :: Maybe Text
source = Maybe Text
a} :: DescribeParameters)

-- | The maximum number of results to include in the response. If more
-- results exist than the specified @MaxResults@ value, a token is included
-- in the response so that the remaining results can be retrieved.
--
-- The value for @MaxResults@ must be between 20 and 100.
describeParameters_maxResults :: Lens.Lens' DescribeParameters (Prelude.Maybe Prelude.Int)
describeParameters_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeParameters -> f DescribeParameters
describeParameters_maxResults = (DescribeParameters -> Maybe Int)
-> (DescribeParameters -> Maybe Int -> DescribeParameters)
-> Lens
     DescribeParameters DescribeParameters (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameters' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeParameters' :: DescribeParameters -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeParameters
s@DescribeParameters' {} Maybe Int
a -> DescribeParameters
s {$sel:maxResults:DescribeParameters' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeParameters)

-- | The name of the parameter group.
describeParameters_parameterGroupName :: Lens.Lens' DescribeParameters Prelude.Text
describeParameters_parameterGroupName :: (Text -> f Text) -> DescribeParameters -> f DescribeParameters
describeParameters_parameterGroupName = (DescribeParameters -> Text)
-> (DescribeParameters -> Text -> DescribeParameters)
-> Lens DescribeParameters DescribeParameters Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParameters' {Text
parameterGroupName :: Text
$sel:parameterGroupName:DescribeParameters' :: DescribeParameters -> Text
parameterGroupName} -> Text
parameterGroupName) (\s :: DescribeParameters
s@DescribeParameters' {} Text
a -> DescribeParameters
s {$sel:parameterGroupName:DescribeParameters' :: Text
parameterGroupName = Text
a} :: DescribeParameters)

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

instance Core.AWSRequest DescribeParameters where
  type
    AWSResponse DescribeParameters =
      DescribeParametersResponse
  request :: DescribeParameters -> Request DescribeParameters
request = Service -> DescribeParameters -> Request DescribeParameters
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeParameters
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeParameters)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeParameters))
-> Logger
-> Service
-> Proxy DescribeParameters
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeParameters)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [Parameter] -> Int -> DescribeParametersResponse
DescribeParametersResponse'
            (Maybe Text
 -> Maybe [Parameter] -> Int -> DescribeParametersResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [Parameter] -> Int -> DescribeParametersResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String (Maybe [Parameter] -> Int -> DescribeParametersResponse)
-> Either String (Maybe [Parameter])
-> Either String (Int -> DescribeParametersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Parameter]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Parameters" Either String (Maybe (Maybe [Parameter]))
-> Maybe [Parameter] -> Either String (Maybe [Parameter])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Parameter]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeParametersResponse)
-> Either String Int -> Either String DescribeParametersResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeParameters

instance Prelude.NFData DescribeParameters

instance Core.ToHeaders DescribeParameters where
  toHeaders :: DescribeParameters -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeParameters -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonDAXV3.DescribeParameters" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DescribeParameters where
  toJSON :: DescribeParameters -> Value
toJSON DescribeParameters' {Maybe Int
Maybe Text
Text
parameterGroupName :: Text
maxResults :: Maybe Int
source :: Maybe Text
nextToken :: Maybe Text
$sel:parameterGroupName:DescribeParameters' :: DescribeParameters -> Text
$sel:maxResults:DescribeParameters' :: DescribeParameters -> Maybe Int
$sel:source:DescribeParameters' :: DescribeParameters -> Maybe Text
$sel:nextToken:DescribeParameters' :: DescribeParameters -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Source" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
source,
            (Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ParameterGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
parameterGroupName)
          ]
      )

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

instance Core.ToQuery DescribeParameters where
  toQuery :: DescribeParameters -> QueryString
toQuery = QueryString -> DescribeParameters -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeParametersResponse' smart constructor.
data DescribeParametersResponse = DescribeParametersResponse'
  { -- | Provides an identifier to allow retrieval of paginated results.
    DescribeParametersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of parameters within a parameter group. Each element in the list
    -- represents one parameter.
    DescribeParametersResponse -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | The response's http status code.
    DescribeParametersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeParametersResponse -> DescribeParametersResponse -> Bool
(DescribeParametersResponse -> DescribeParametersResponse -> Bool)
-> (DescribeParametersResponse
    -> DescribeParametersResponse -> Bool)
-> Eq DescribeParametersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeParametersResponse -> DescribeParametersResponse -> Bool
$c/= :: DescribeParametersResponse -> DescribeParametersResponse -> Bool
== :: DescribeParametersResponse -> DescribeParametersResponse -> Bool
$c== :: DescribeParametersResponse -> DescribeParametersResponse -> Bool
Prelude.Eq, ReadPrec [DescribeParametersResponse]
ReadPrec DescribeParametersResponse
Int -> ReadS DescribeParametersResponse
ReadS [DescribeParametersResponse]
(Int -> ReadS DescribeParametersResponse)
-> ReadS [DescribeParametersResponse]
-> ReadPrec DescribeParametersResponse
-> ReadPrec [DescribeParametersResponse]
-> Read DescribeParametersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeParametersResponse]
$creadListPrec :: ReadPrec [DescribeParametersResponse]
readPrec :: ReadPrec DescribeParametersResponse
$creadPrec :: ReadPrec DescribeParametersResponse
readList :: ReadS [DescribeParametersResponse]
$creadList :: ReadS [DescribeParametersResponse]
readsPrec :: Int -> ReadS DescribeParametersResponse
$creadsPrec :: Int -> ReadS DescribeParametersResponse
Prelude.Read, Int -> DescribeParametersResponse -> ShowS
[DescribeParametersResponse] -> ShowS
DescribeParametersResponse -> String
(Int -> DescribeParametersResponse -> ShowS)
-> (DescribeParametersResponse -> String)
-> ([DescribeParametersResponse] -> ShowS)
-> Show DescribeParametersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeParametersResponse] -> ShowS
$cshowList :: [DescribeParametersResponse] -> ShowS
show :: DescribeParametersResponse -> String
$cshow :: DescribeParametersResponse -> String
showsPrec :: Int -> DescribeParametersResponse -> ShowS
$cshowsPrec :: Int -> DescribeParametersResponse -> ShowS
Prelude.Show, (forall x.
 DescribeParametersResponse -> Rep DescribeParametersResponse x)
-> (forall x.
    Rep DescribeParametersResponse x -> DescribeParametersResponse)
-> Generic DescribeParametersResponse
forall x.
Rep DescribeParametersResponse x -> DescribeParametersResponse
forall x.
DescribeParametersResponse -> Rep DescribeParametersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeParametersResponse x -> DescribeParametersResponse
$cfrom :: forall x.
DescribeParametersResponse -> Rep DescribeParametersResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeParametersResponse' 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:
--
-- 'nextToken', 'describeParametersResponse_nextToken' - Provides an identifier to allow retrieval of paginated results.
--
-- 'parameters', 'describeParametersResponse_parameters' - A list of parameters within a parameter group. Each element in the list
-- represents one parameter.
--
-- 'httpStatus', 'describeParametersResponse_httpStatus' - The response's http status code.
newDescribeParametersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeParametersResponse
newDescribeParametersResponse :: Int -> DescribeParametersResponse
newDescribeParametersResponse Int
pHttpStatus_ =
  DescribeParametersResponse' :: Maybe Text
-> Maybe [Parameter] -> Int -> DescribeParametersResponse
DescribeParametersResponse'
    { $sel:nextToken:DescribeParametersResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:DescribeParametersResponse' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeParametersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | A list of parameters within a parameter group. Each element in the list
-- represents one parameter.
describeParametersResponse_parameters :: Lens.Lens' DescribeParametersResponse (Prelude.Maybe [Parameter])
describeParametersResponse_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> DescribeParametersResponse -> f DescribeParametersResponse
describeParametersResponse_parameters = (DescribeParametersResponse -> Maybe [Parameter])
-> (DescribeParametersResponse
    -> Maybe [Parameter] -> DescribeParametersResponse)
-> Lens' DescribeParametersResponse (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeParametersResponse' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:DescribeParametersResponse' :: DescribeParametersResponse -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: DescribeParametersResponse
s@DescribeParametersResponse' {} Maybe [Parameter]
a -> DescribeParametersResponse
s {$sel:parameters:DescribeParametersResponse' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: DescribeParametersResponse) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> DescribeParametersResponse -> f DescribeParametersResponse)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> DescribeParametersResponse
-> f DescribeParametersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Parameter] [Parameter] [Parameter] [Parameter]
-> Iso
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Parameter] [Parameter] [Parameter] [Parameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeParametersResponse