{-# 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.Lightsail.GetRelationalDatabaseParameters
-- 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 all of the runtime parameters offered by the underlying database
-- software, or engine, for a specific database in Amazon Lightsail.
--
-- In addition to the parameter names and values, this operation returns
-- other information about each parameter. This information includes
-- whether changes require a reboot, whether the parameter is modifiable,
-- the allowed values, and the data types.
--
-- This operation returns paginated results.
module Amazonka.Lightsail.GetRelationalDatabaseParameters
  ( -- * Creating a Request
    GetRelationalDatabaseParameters (..),
    newGetRelationalDatabaseParameters,

    -- * Request Lenses
    getRelationalDatabaseParameters_pageToken,
    getRelationalDatabaseParameters_relationalDatabaseName,

    -- * Destructuring the Response
    GetRelationalDatabaseParametersResponse (..),
    newGetRelationalDatabaseParametersResponse,

    -- * Response Lenses
    getRelationalDatabaseParametersResponse_nextPageToken,
    getRelationalDatabaseParametersResponse_parameters,
    getRelationalDatabaseParametersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetRelationalDatabaseParameters' smart constructor.
data GetRelationalDatabaseParameters = GetRelationalDatabaseParameters'
  { -- | The token to advance to the next page of results from your request.
    --
    -- To get a page token, perform an initial
    -- @GetRelationalDatabaseParameters@ request. If your results are
    -- paginated, the response will return a next page token that you can
    -- specify as the page token in a subsequent request.
    GetRelationalDatabaseParameters -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text,
    -- | The name of your database for which to get parameters.
    GetRelationalDatabaseParameters -> Text
relationalDatabaseName :: Prelude.Text
  }
  deriving (GetRelationalDatabaseParameters
-> GetRelationalDatabaseParameters -> Bool
(GetRelationalDatabaseParameters
 -> GetRelationalDatabaseParameters -> Bool)
-> (GetRelationalDatabaseParameters
    -> GetRelationalDatabaseParameters -> Bool)
-> Eq GetRelationalDatabaseParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRelationalDatabaseParameters
-> GetRelationalDatabaseParameters -> Bool
$c/= :: GetRelationalDatabaseParameters
-> GetRelationalDatabaseParameters -> Bool
== :: GetRelationalDatabaseParameters
-> GetRelationalDatabaseParameters -> Bool
$c== :: GetRelationalDatabaseParameters
-> GetRelationalDatabaseParameters -> Bool
Prelude.Eq, ReadPrec [GetRelationalDatabaseParameters]
ReadPrec GetRelationalDatabaseParameters
Int -> ReadS GetRelationalDatabaseParameters
ReadS [GetRelationalDatabaseParameters]
(Int -> ReadS GetRelationalDatabaseParameters)
-> ReadS [GetRelationalDatabaseParameters]
-> ReadPrec GetRelationalDatabaseParameters
-> ReadPrec [GetRelationalDatabaseParameters]
-> Read GetRelationalDatabaseParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRelationalDatabaseParameters]
$creadListPrec :: ReadPrec [GetRelationalDatabaseParameters]
readPrec :: ReadPrec GetRelationalDatabaseParameters
$creadPrec :: ReadPrec GetRelationalDatabaseParameters
readList :: ReadS [GetRelationalDatabaseParameters]
$creadList :: ReadS [GetRelationalDatabaseParameters]
readsPrec :: Int -> ReadS GetRelationalDatabaseParameters
$creadsPrec :: Int -> ReadS GetRelationalDatabaseParameters
Prelude.Read, Int -> GetRelationalDatabaseParameters -> ShowS
[GetRelationalDatabaseParameters] -> ShowS
GetRelationalDatabaseParameters -> String
(Int -> GetRelationalDatabaseParameters -> ShowS)
-> (GetRelationalDatabaseParameters -> String)
-> ([GetRelationalDatabaseParameters] -> ShowS)
-> Show GetRelationalDatabaseParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRelationalDatabaseParameters] -> ShowS
$cshowList :: [GetRelationalDatabaseParameters] -> ShowS
show :: GetRelationalDatabaseParameters -> String
$cshow :: GetRelationalDatabaseParameters -> String
showsPrec :: Int -> GetRelationalDatabaseParameters -> ShowS
$cshowsPrec :: Int -> GetRelationalDatabaseParameters -> ShowS
Prelude.Show, (forall x.
 GetRelationalDatabaseParameters
 -> Rep GetRelationalDatabaseParameters x)
-> (forall x.
    Rep GetRelationalDatabaseParameters x
    -> GetRelationalDatabaseParameters)
-> Generic GetRelationalDatabaseParameters
forall x.
Rep GetRelationalDatabaseParameters x
-> GetRelationalDatabaseParameters
forall x.
GetRelationalDatabaseParameters
-> Rep GetRelationalDatabaseParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRelationalDatabaseParameters x
-> GetRelationalDatabaseParameters
$cfrom :: forall x.
GetRelationalDatabaseParameters
-> Rep GetRelationalDatabaseParameters x
Prelude.Generic)

-- |
-- Create a value of 'GetRelationalDatabaseParameters' 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:
--
-- 'pageToken', 'getRelationalDatabaseParameters_pageToken' - The token to advance to the next page of results from your request.
--
-- To get a page token, perform an initial
-- @GetRelationalDatabaseParameters@ request. If your results are
-- paginated, the response will return a next page token that you can
-- specify as the page token in a subsequent request.
--
-- 'relationalDatabaseName', 'getRelationalDatabaseParameters_relationalDatabaseName' - The name of your database for which to get parameters.
newGetRelationalDatabaseParameters ::
  -- | 'relationalDatabaseName'
  Prelude.Text ->
  GetRelationalDatabaseParameters
newGetRelationalDatabaseParameters :: Text -> GetRelationalDatabaseParameters
newGetRelationalDatabaseParameters
  Text
pRelationalDatabaseName_ =
    GetRelationalDatabaseParameters' :: Maybe Text -> Text -> GetRelationalDatabaseParameters
GetRelationalDatabaseParameters'
      { $sel:pageToken:GetRelationalDatabaseParameters' :: Maybe Text
pageToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:relationalDatabaseName:GetRelationalDatabaseParameters' :: Text
relationalDatabaseName =
          Text
pRelationalDatabaseName_
      }

-- | The token to advance to the next page of results from your request.
--
-- To get a page token, perform an initial
-- @GetRelationalDatabaseParameters@ request. If your results are
-- paginated, the response will return a next page token that you can
-- specify as the page token in a subsequent request.
getRelationalDatabaseParameters_pageToken :: Lens.Lens' GetRelationalDatabaseParameters (Prelude.Maybe Prelude.Text)
getRelationalDatabaseParameters_pageToken :: (Maybe Text -> f (Maybe Text))
-> GetRelationalDatabaseParameters
-> f GetRelationalDatabaseParameters
getRelationalDatabaseParameters_pageToken = (GetRelationalDatabaseParameters -> Maybe Text)
-> (GetRelationalDatabaseParameters
    -> Maybe Text -> GetRelationalDatabaseParameters)
-> Lens
     GetRelationalDatabaseParameters
     GetRelationalDatabaseParameters
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRelationalDatabaseParameters' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetRelationalDatabaseParameters' :: GetRelationalDatabaseParameters -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: GetRelationalDatabaseParameters
s@GetRelationalDatabaseParameters' {} Maybe Text
a -> GetRelationalDatabaseParameters
s {$sel:pageToken:GetRelationalDatabaseParameters' :: Maybe Text
pageToken = Maybe Text
a} :: GetRelationalDatabaseParameters)

-- | The name of your database for which to get parameters.
getRelationalDatabaseParameters_relationalDatabaseName :: Lens.Lens' GetRelationalDatabaseParameters Prelude.Text
getRelationalDatabaseParameters_relationalDatabaseName :: (Text -> f Text)
-> GetRelationalDatabaseParameters
-> f GetRelationalDatabaseParameters
getRelationalDatabaseParameters_relationalDatabaseName = (GetRelationalDatabaseParameters -> Text)
-> (GetRelationalDatabaseParameters
    -> Text -> GetRelationalDatabaseParameters)
-> Lens
     GetRelationalDatabaseParameters
     GetRelationalDatabaseParameters
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRelationalDatabaseParameters' {Text
relationalDatabaseName :: Text
$sel:relationalDatabaseName:GetRelationalDatabaseParameters' :: GetRelationalDatabaseParameters -> Text
relationalDatabaseName} -> Text
relationalDatabaseName) (\s :: GetRelationalDatabaseParameters
s@GetRelationalDatabaseParameters' {} Text
a -> GetRelationalDatabaseParameters
s {$sel:relationalDatabaseName:GetRelationalDatabaseParameters' :: Text
relationalDatabaseName = Text
a} :: GetRelationalDatabaseParameters)

instance
  Core.AWSPager
    GetRelationalDatabaseParameters
  where
  page :: GetRelationalDatabaseParameters
-> AWSResponse GetRelationalDatabaseParameters
-> Maybe GetRelationalDatabaseParameters
page GetRelationalDatabaseParameters
rq AWSResponse GetRelationalDatabaseParameters
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetRelationalDatabaseParameters
GetRelationalDatabaseParametersResponse
rs
            GetRelationalDatabaseParametersResponse
-> Getting
     (First Text) GetRelationalDatabaseParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetRelationalDatabaseParametersResponse
-> Const (First Text) GetRelationalDatabaseParametersResponse
Lens' GetRelationalDatabaseParametersResponse (Maybe Text)
getRelationalDatabaseParametersResponse_nextPageToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetRelationalDatabaseParametersResponse
 -> Const (First Text) GetRelationalDatabaseParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) GetRelationalDatabaseParametersResponse 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 GetRelationalDatabaseParameters
forall a. Maybe a
Prelude.Nothing
    | Maybe [RelationalDatabaseParameter] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetRelationalDatabaseParameters
GetRelationalDatabaseParametersResponse
rs
            GetRelationalDatabaseParametersResponse
-> Getting
     (First [RelationalDatabaseParameter])
     GetRelationalDatabaseParametersResponse
     [RelationalDatabaseParameter]
-> Maybe [RelationalDatabaseParameter]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [RelationalDatabaseParameter]
 -> Const
      (First [RelationalDatabaseParameter])
      (Maybe [RelationalDatabaseParameter]))
-> GetRelationalDatabaseParametersResponse
-> Const
     (First [RelationalDatabaseParameter])
     GetRelationalDatabaseParametersResponse
Lens'
  GetRelationalDatabaseParametersResponse
  (Maybe [RelationalDatabaseParameter])
getRelationalDatabaseParametersResponse_parameters
              ((Maybe [RelationalDatabaseParameter]
  -> Const
       (First [RelationalDatabaseParameter])
       (Maybe [RelationalDatabaseParameter]))
 -> GetRelationalDatabaseParametersResponse
 -> Const
      (First [RelationalDatabaseParameter])
      GetRelationalDatabaseParametersResponse)
-> (([RelationalDatabaseParameter]
     -> Const
          (First [RelationalDatabaseParameter])
          [RelationalDatabaseParameter])
    -> Maybe [RelationalDatabaseParameter]
    -> Const
         (First [RelationalDatabaseParameter])
         (Maybe [RelationalDatabaseParameter]))
-> Getting
     (First [RelationalDatabaseParameter])
     GetRelationalDatabaseParametersResponse
     [RelationalDatabaseParameter]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RelationalDatabaseParameter]
 -> Const
      (First [RelationalDatabaseParameter])
      [RelationalDatabaseParameter])
-> Maybe [RelationalDatabaseParameter]
-> Const
     (First [RelationalDatabaseParameter])
     (Maybe [RelationalDatabaseParameter])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetRelationalDatabaseParameters
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      GetRelationalDatabaseParameters
-> Maybe GetRelationalDatabaseParameters
forall a. a -> Maybe a
Prelude.Just (GetRelationalDatabaseParameters
 -> Maybe GetRelationalDatabaseParameters)
-> GetRelationalDatabaseParameters
-> Maybe GetRelationalDatabaseParameters
forall a b. (a -> b) -> a -> b
Prelude.$
        GetRelationalDatabaseParameters
rq
          GetRelationalDatabaseParameters
-> (GetRelationalDatabaseParameters
    -> GetRelationalDatabaseParameters)
-> GetRelationalDatabaseParameters
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetRelationalDatabaseParameters
-> Identity GetRelationalDatabaseParameters
Lens
  GetRelationalDatabaseParameters
  GetRelationalDatabaseParameters
  (Maybe Text)
  (Maybe Text)
getRelationalDatabaseParameters_pageToken
          ((Maybe Text -> Identity (Maybe Text))
 -> GetRelationalDatabaseParameters
 -> Identity GetRelationalDatabaseParameters)
-> Maybe Text
-> GetRelationalDatabaseParameters
-> GetRelationalDatabaseParameters
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetRelationalDatabaseParameters
GetRelationalDatabaseParametersResponse
rs
          GetRelationalDatabaseParametersResponse
-> Getting
     (First Text) GetRelationalDatabaseParametersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetRelationalDatabaseParametersResponse
-> Const (First Text) GetRelationalDatabaseParametersResponse
Lens' GetRelationalDatabaseParametersResponse (Maybe Text)
getRelationalDatabaseParametersResponse_nextPageToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetRelationalDatabaseParametersResponse
 -> Const (First Text) GetRelationalDatabaseParametersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) GetRelationalDatabaseParametersResponse 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
    GetRelationalDatabaseParameters
  where
  type
    AWSResponse GetRelationalDatabaseParameters =
      GetRelationalDatabaseParametersResponse
  request :: GetRelationalDatabaseParameters
-> Request GetRelationalDatabaseParameters
request = Service
-> GetRelationalDatabaseParameters
-> Request GetRelationalDatabaseParameters
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetRelationalDatabaseParameters
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetRelationalDatabaseParameters)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetRelationalDatabaseParameters))
-> Logger
-> Service
-> Proxy GetRelationalDatabaseParameters
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetRelationalDatabaseParameters)))
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 [RelationalDatabaseParameter]
-> Int
-> GetRelationalDatabaseParametersResponse
GetRelationalDatabaseParametersResponse'
            (Maybe Text
 -> Maybe [RelationalDatabaseParameter]
 -> Int
 -> GetRelationalDatabaseParametersResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [RelationalDatabaseParameter]
      -> Int -> GetRelationalDatabaseParametersResponse)
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
"nextPageToken")
            Either
  String
  (Maybe [RelationalDatabaseParameter]
   -> Int -> GetRelationalDatabaseParametersResponse)
-> Either String (Maybe [RelationalDatabaseParameter])
-> Either String (Int -> GetRelationalDatabaseParametersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [RelationalDatabaseParameter]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"parameters" Either String (Maybe (Maybe [RelationalDatabaseParameter]))
-> Maybe [RelationalDatabaseParameter]
-> Either String (Maybe [RelationalDatabaseParameter])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RelationalDatabaseParameter]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetRelationalDatabaseParametersResponse)
-> Either String Int
-> Either String GetRelationalDatabaseParametersResponse
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
    GetRelationalDatabaseParameters

instance
  Prelude.NFData
    GetRelationalDatabaseParameters

instance
  Core.ToHeaders
    GetRelationalDatabaseParameters
  where
  toHeaders :: GetRelationalDatabaseParameters -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> GetRelationalDatabaseParameters -> 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
"Lightsail_20161128.GetRelationalDatabaseParameters" ::
                          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 GetRelationalDatabaseParameters where
  toJSON :: GetRelationalDatabaseParameters -> Value
toJSON GetRelationalDatabaseParameters' {Maybe Text
Text
relationalDatabaseName :: Text
pageToken :: Maybe Text
$sel:relationalDatabaseName:GetRelationalDatabaseParameters' :: GetRelationalDatabaseParameters -> Text
$sel:pageToken:GetRelationalDatabaseParameters' :: GetRelationalDatabaseParameters -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"pageToken" 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
pageToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"relationalDatabaseName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
relationalDatabaseName
              )
          ]
      )

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

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

-- | /See:/ 'newGetRelationalDatabaseParametersResponse' smart constructor.
data GetRelationalDatabaseParametersResponse = GetRelationalDatabaseParametersResponse'
  { -- | The token to advance to the next page of results from your request.
    --
    -- A next page token is not returned if there are no more results to
    -- display.
    --
    -- To get the next page of results, perform another
    -- @GetRelationalDatabaseParameters@ request and specify the next page
    -- token using the @pageToken@ parameter.
    GetRelationalDatabaseParametersResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | An object describing the result of your get relational database
    -- parameters request.
    GetRelationalDatabaseParametersResponse
-> Maybe [RelationalDatabaseParameter]
parameters :: Prelude.Maybe [RelationalDatabaseParameter],
    -- | The response's http status code.
    GetRelationalDatabaseParametersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetRelationalDatabaseParametersResponse
-> GetRelationalDatabaseParametersResponse -> Bool
(GetRelationalDatabaseParametersResponse
 -> GetRelationalDatabaseParametersResponse -> Bool)
-> (GetRelationalDatabaseParametersResponse
    -> GetRelationalDatabaseParametersResponse -> Bool)
-> Eq GetRelationalDatabaseParametersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRelationalDatabaseParametersResponse
-> GetRelationalDatabaseParametersResponse -> Bool
$c/= :: GetRelationalDatabaseParametersResponse
-> GetRelationalDatabaseParametersResponse -> Bool
== :: GetRelationalDatabaseParametersResponse
-> GetRelationalDatabaseParametersResponse -> Bool
$c== :: GetRelationalDatabaseParametersResponse
-> GetRelationalDatabaseParametersResponse -> Bool
Prelude.Eq, ReadPrec [GetRelationalDatabaseParametersResponse]
ReadPrec GetRelationalDatabaseParametersResponse
Int -> ReadS GetRelationalDatabaseParametersResponse
ReadS [GetRelationalDatabaseParametersResponse]
(Int -> ReadS GetRelationalDatabaseParametersResponse)
-> ReadS [GetRelationalDatabaseParametersResponse]
-> ReadPrec GetRelationalDatabaseParametersResponse
-> ReadPrec [GetRelationalDatabaseParametersResponse]
-> Read GetRelationalDatabaseParametersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRelationalDatabaseParametersResponse]
$creadListPrec :: ReadPrec [GetRelationalDatabaseParametersResponse]
readPrec :: ReadPrec GetRelationalDatabaseParametersResponse
$creadPrec :: ReadPrec GetRelationalDatabaseParametersResponse
readList :: ReadS [GetRelationalDatabaseParametersResponse]
$creadList :: ReadS [GetRelationalDatabaseParametersResponse]
readsPrec :: Int -> ReadS GetRelationalDatabaseParametersResponse
$creadsPrec :: Int -> ReadS GetRelationalDatabaseParametersResponse
Prelude.Read, Int -> GetRelationalDatabaseParametersResponse -> ShowS
[GetRelationalDatabaseParametersResponse] -> ShowS
GetRelationalDatabaseParametersResponse -> String
(Int -> GetRelationalDatabaseParametersResponse -> ShowS)
-> (GetRelationalDatabaseParametersResponse -> String)
-> ([GetRelationalDatabaseParametersResponse] -> ShowS)
-> Show GetRelationalDatabaseParametersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRelationalDatabaseParametersResponse] -> ShowS
$cshowList :: [GetRelationalDatabaseParametersResponse] -> ShowS
show :: GetRelationalDatabaseParametersResponse -> String
$cshow :: GetRelationalDatabaseParametersResponse -> String
showsPrec :: Int -> GetRelationalDatabaseParametersResponse -> ShowS
$cshowsPrec :: Int -> GetRelationalDatabaseParametersResponse -> ShowS
Prelude.Show, (forall x.
 GetRelationalDatabaseParametersResponse
 -> Rep GetRelationalDatabaseParametersResponse x)
-> (forall x.
    Rep GetRelationalDatabaseParametersResponse x
    -> GetRelationalDatabaseParametersResponse)
-> Generic GetRelationalDatabaseParametersResponse
forall x.
Rep GetRelationalDatabaseParametersResponse x
-> GetRelationalDatabaseParametersResponse
forall x.
GetRelationalDatabaseParametersResponse
-> Rep GetRelationalDatabaseParametersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRelationalDatabaseParametersResponse x
-> GetRelationalDatabaseParametersResponse
$cfrom :: forall x.
GetRelationalDatabaseParametersResponse
-> Rep GetRelationalDatabaseParametersResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetRelationalDatabaseParametersResponse' 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:
--
-- 'nextPageToken', 'getRelationalDatabaseParametersResponse_nextPageToken' - The token to advance to the next page of results from your request.
--
-- A next page token is not returned if there are no more results to
-- display.
--
-- To get the next page of results, perform another
-- @GetRelationalDatabaseParameters@ request and specify the next page
-- token using the @pageToken@ parameter.
--
-- 'parameters', 'getRelationalDatabaseParametersResponse_parameters' - An object describing the result of your get relational database
-- parameters request.
--
-- 'httpStatus', 'getRelationalDatabaseParametersResponse_httpStatus' - The response's http status code.
newGetRelationalDatabaseParametersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetRelationalDatabaseParametersResponse
newGetRelationalDatabaseParametersResponse :: Int -> GetRelationalDatabaseParametersResponse
newGetRelationalDatabaseParametersResponse
  Int
pHttpStatus_ =
    GetRelationalDatabaseParametersResponse' :: Maybe Text
-> Maybe [RelationalDatabaseParameter]
-> Int
-> GetRelationalDatabaseParametersResponse
GetRelationalDatabaseParametersResponse'
      { $sel:nextPageToken:GetRelationalDatabaseParametersResponse' :: Maybe Text
nextPageToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:parameters:GetRelationalDatabaseParametersResponse' :: Maybe [RelationalDatabaseParameter]
parameters = Maybe [RelationalDatabaseParameter]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetRelationalDatabaseParametersResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The token to advance to the next page of results from your request.
--
-- A next page token is not returned if there are no more results to
-- display.
--
-- To get the next page of results, perform another
-- @GetRelationalDatabaseParameters@ request and specify the next page
-- token using the @pageToken@ parameter.
getRelationalDatabaseParametersResponse_nextPageToken :: Lens.Lens' GetRelationalDatabaseParametersResponse (Prelude.Maybe Prelude.Text)
getRelationalDatabaseParametersResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetRelationalDatabaseParametersResponse
-> f GetRelationalDatabaseParametersResponse
getRelationalDatabaseParametersResponse_nextPageToken = (GetRelationalDatabaseParametersResponse -> Maybe Text)
-> (GetRelationalDatabaseParametersResponse
    -> Maybe Text -> GetRelationalDatabaseParametersResponse)
-> Lens' GetRelationalDatabaseParametersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRelationalDatabaseParametersResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetRelationalDatabaseParametersResponse' :: GetRelationalDatabaseParametersResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetRelationalDatabaseParametersResponse
s@GetRelationalDatabaseParametersResponse' {} Maybe Text
a -> GetRelationalDatabaseParametersResponse
s {$sel:nextPageToken:GetRelationalDatabaseParametersResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetRelationalDatabaseParametersResponse)

-- | An object describing the result of your get relational database
-- parameters request.
getRelationalDatabaseParametersResponse_parameters :: Lens.Lens' GetRelationalDatabaseParametersResponse (Prelude.Maybe [RelationalDatabaseParameter])
getRelationalDatabaseParametersResponse_parameters :: (Maybe [RelationalDatabaseParameter]
 -> f (Maybe [RelationalDatabaseParameter]))
-> GetRelationalDatabaseParametersResponse
-> f GetRelationalDatabaseParametersResponse
getRelationalDatabaseParametersResponse_parameters = (GetRelationalDatabaseParametersResponse
 -> Maybe [RelationalDatabaseParameter])
-> (GetRelationalDatabaseParametersResponse
    -> Maybe [RelationalDatabaseParameter]
    -> GetRelationalDatabaseParametersResponse)
-> Lens'
     GetRelationalDatabaseParametersResponse
     (Maybe [RelationalDatabaseParameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRelationalDatabaseParametersResponse' {Maybe [RelationalDatabaseParameter]
parameters :: Maybe [RelationalDatabaseParameter]
$sel:parameters:GetRelationalDatabaseParametersResponse' :: GetRelationalDatabaseParametersResponse
-> Maybe [RelationalDatabaseParameter]
parameters} -> Maybe [RelationalDatabaseParameter]
parameters) (\s :: GetRelationalDatabaseParametersResponse
s@GetRelationalDatabaseParametersResponse' {} Maybe [RelationalDatabaseParameter]
a -> GetRelationalDatabaseParametersResponse
s {$sel:parameters:GetRelationalDatabaseParametersResponse' :: Maybe [RelationalDatabaseParameter]
parameters = Maybe [RelationalDatabaseParameter]
a} :: GetRelationalDatabaseParametersResponse) ((Maybe [RelationalDatabaseParameter]
  -> f (Maybe [RelationalDatabaseParameter]))
 -> GetRelationalDatabaseParametersResponse
 -> f GetRelationalDatabaseParametersResponse)
-> ((Maybe [RelationalDatabaseParameter]
     -> f (Maybe [RelationalDatabaseParameter]))
    -> Maybe [RelationalDatabaseParameter]
    -> f (Maybe [RelationalDatabaseParameter]))
-> (Maybe [RelationalDatabaseParameter]
    -> f (Maybe [RelationalDatabaseParameter]))
-> GetRelationalDatabaseParametersResponse
-> f GetRelationalDatabaseParametersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RelationalDatabaseParameter]
  [RelationalDatabaseParameter]
  [RelationalDatabaseParameter]
  [RelationalDatabaseParameter]
-> Iso
     (Maybe [RelationalDatabaseParameter])
     (Maybe [RelationalDatabaseParameter])
     (Maybe [RelationalDatabaseParameter])
     (Maybe [RelationalDatabaseParameter])
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
  [RelationalDatabaseParameter]
  [RelationalDatabaseParameter]
  [RelationalDatabaseParameter]
  [RelationalDatabaseParameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    GetRelationalDatabaseParametersResponse