{-# 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.UpdateRelationalDatabaseParameters
-- 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)
--
-- Allows the update of one or more parameters of a database in Amazon
-- Lightsail.
--
-- Parameter updates don\'t cause outages; therefore, their application is
-- not subject to the preferred maintenance window. However, there are two
-- ways in which parameter updates are applied: @dynamic@ or
-- @pending-reboot@. Parameters marked with a @dynamic@ apply type are
-- applied immediately. Parameters marked with a @pending-reboot@ apply
-- type are applied only after the database is rebooted using the
-- @reboot relational database@ operation.
--
-- The @update relational database parameters@ operation supports tag-based
-- access control via resource tags applied to the resource identified by
-- relationalDatabaseName. For more information, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags Amazon Lightsail Developer Guide>.
module Amazonka.Lightsail.UpdateRelationalDatabaseParameters
  ( -- * Creating a Request
    UpdateRelationalDatabaseParameters (..),
    newUpdateRelationalDatabaseParameters,

    -- * Request Lenses
    updateRelationalDatabaseParameters_relationalDatabaseName,
    updateRelationalDatabaseParameters_parameters,

    -- * Destructuring the Response
    UpdateRelationalDatabaseParametersResponse (..),
    newUpdateRelationalDatabaseParametersResponse,

    -- * Response Lenses
    updateRelationalDatabaseParametersResponse_operations,
    updateRelationalDatabaseParametersResponse_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:/ 'newUpdateRelationalDatabaseParameters' smart constructor.
data UpdateRelationalDatabaseParameters = UpdateRelationalDatabaseParameters'
  { -- | The name of your database for which to update parameters.
    UpdateRelationalDatabaseParameters -> Text
relationalDatabaseName :: Prelude.Text,
    -- | The database parameters to update.
    UpdateRelationalDatabaseParameters -> [RelationalDatabaseParameter]
parameters :: [RelationalDatabaseParameter]
  }
  deriving (UpdateRelationalDatabaseParameters
-> UpdateRelationalDatabaseParameters -> Bool
(UpdateRelationalDatabaseParameters
 -> UpdateRelationalDatabaseParameters -> Bool)
-> (UpdateRelationalDatabaseParameters
    -> UpdateRelationalDatabaseParameters -> Bool)
-> Eq UpdateRelationalDatabaseParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRelationalDatabaseParameters
-> UpdateRelationalDatabaseParameters -> Bool
$c/= :: UpdateRelationalDatabaseParameters
-> UpdateRelationalDatabaseParameters -> Bool
== :: UpdateRelationalDatabaseParameters
-> UpdateRelationalDatabaseParameters -> Bool
$c== :: UpdateRelationalDatabaseParameters
-> UpdateRelationalDatabaseParameters -> Bool
Prelude.Eq, ReadPrec [UpdateRelationalDatabaseParameters]
ReadPrec UpdateRelationalDatabaseParameters
Int -> ReadS UpdateRelationalDatabaseParameters
ReadS [UpdateRelationalDatabaseParameters]
(Int -> ReadS UpdateRelationalDatabaseParameters)
-> ReadS [UpdateRelationalDatabaseParameters]
-> ReadPrec UpdateRelationalDatabaseParameters
-> ReadPrec [UpdateRelationalDatabaseParameters]
-> Read UpdateRelationalDatabaseParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRelationalDatabaseParameters]
$creadListPrec :: ReadPrec [UpdateRelationalDatabaseParameters]
readPrec :: ReadPrec UpdateRelationalDatabaseParameters
$creadPrec :: ReadPrec UpdateRelationalDatabaseParameters
readList :: ReadS [UpdateRelationalDatabaseParameters]
$creadList :: ReadS [UpdateRelationalDatabaseParameters]
readsPrec :: Int -> ReadS UpdateRelationalDatabaseParameters
$creadsPrec :: Int -> ReadS UpdateRelationalDatabaseParameters
Prelude.Read, Int -> UpdateRelationalDatabaseParameters -> ShowS
[UpdateRelationalDatabaseParameters] -> ShowS
UpdateRelationalDatabaseParameters -> String
(Int -> UpdateRelationalDatabaseParameters -> ShowS)
-> (UpdateRelationalDatabaseParameters -> String)
-> ([UpdateRelationalDatabaseParameters] -> ShowS)
-> Show UpdateRelationalDatabaseParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRelationalDatabaseParameters] -> ShowS
$cshowList :: [UpdateRelationalDatabaseParameters] -> ShowS
show :: UpdateRelationalDatabaseParameters -> String
$cshow :: UpdateRelationalDatabaseParameters -> String
showsPrec :: Int -> UpdateRelationalDatabaseParameters -> ShowS
$cshowsPrec :: Int -> UpdateRelationalDatabaseParameters -> ShowS
Prelude.Show, (forall x.
 UpdateRelationalDatabaseParameters
 -> Rep UpdateRelationalDatabaseParameters x)
-> (forall x.
    Rep UpdateRelationalDatabaseParameters x
    -> UpdateRelationalDatabaseParameters)
-> Generic UpdateRelationalDatabaseParameters
forall x.
Rep UpdateRelationalDatabaseParameters x
-> UpdateRelationalDatabaseParameters
forall x.
UpdateRelationalDatabaseParameters
-> Rep UpdateRelationalDatabaseParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRelationalDatabaseParameters x
-> UpdateRelationalDatabaseParameters
$cfrom :: forall x.
UpdateRelationalDatabaseParameters
-> Rep UpdateRelationalDatabaseParameters x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRelationalDatabaseParameters' 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:
--
-- 'relationalDatabaseName', 'updateRelationalDatabaseParameters_relationalDatabaseName' - The name of your database for which to update parameters.
--
-- 'parameters', 'updateRelationalDatabaseParameters_parameters' - The database parameters to update.
newUpdateRelationalDatabaseParameters ::
  -- | 'relationalDatabaseName'
  Prelude.Text ->
  UpdateRelationalDatabaseParameters
newUpdateRelationalDatabaseParameters :: Text -> UpdateRelationalDatabaseParameters
newUpdateRelationalDatabaseParameters
  Text
pRelationalDatabaseName_ =
    UpdateRelationalDatabaseParameters' :: Text
-> [RelationalDatabaseParameter]
-> UpdateRelationalDatabaseParameters
UpdateRelationalDatabaseParameters'
      { $sel:relationalDatabaseName:UpdateRelationalDatabaseParameters' :: Text
relationalDatabaseName =
          Text
pRelationalDatabaseName_,
        $sel:parameters:UpdateRelationalDatabaseParameters' :: [RelationalDatabaseParameter]
parameters = [RelationalDatabaseParameter]
forall a. Monoid a => a
Prelude.mempty
      }

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

-- | The database parameters to update.
updateRelationalDatabaseParameters_parameters :: Lens.Lens' UpdateRelationalDatabaseParameters [RelationalDatabaseParameter]
updateRelationalDatabaseParameters_parameters :: ([RelationalDatabaseParameter] -> f [RelationalDatabaseParameter])
-> UpdateRelationalDatabaseParameters
-> f UpdateRelationalDatabaseParameters
updateRelationalDatabaseParameters_parameters = (UpdateRelationalDatabaseParameters
 -> [RelationalDatabaseParameter])
-> (UpdateRelationalDatabaseParameters
    -> [RelationalDatabaseParameter]
    -> UpdateRelationalDatabaseParameters)
-> Lens
     UpdateRelationalDatabaseParameters
     UpdateRelationalDatabaseParameters
     [RelationalDatabaseParameter]
     [RelationalDatabaseParameter]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabaseParameters' {[RelationalDatabaseParameter]
parameters :: [RelationalDatabaseParameter]
$sel:parameters:UpdateRelationalDatabaseParameters' :: UpdateRelationalDatabaseParameters -> [RelationalDatabaseParameter]
parameters} -> [RelationalDatabaseParameter]
parameters) (\s :: UpdateRelationalDatabaseParameters
s@UpdateRelationalDatabaseParameters' {} [RelationalDatabaseParameter]
a -> UpdateRelationalDatabaseParameters
s {$sel:parameters:UpdateRelationalDatabaseParameters' :: [RelationalDatabaseParameter]
parameters = [RelationalDatabaseParameter]
a} :: UpdateRelationalDatabaseParameters) (([RelationalDatabaseParameter] -> f [RelationalDatabaseParameter])
 -> UpdateRelationalDatabaseParameters
 -> f UpdateRelationalDatabaseParameters)
-> (([RelationalDatabaseParameter]
     -> f [RelationalDatabaseParameter])
    -> [RelationalDatabaseParameter]
    -> f [RelationalDatabaseParameter])
-> ([RelationalDatabaseParameter]
    -> f [RelationalDatabaseParameter])
-> UpdateRelationalDatabaseParameters
-> f UpdateRelationalDatabaseParameters
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([RelationalDatabaseParameter] -> f [RelationalDatabaseParameter])
-> [RelationalDatabaseParameter] -> f [RelationalDatabaseParameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    UpdateRelationalDatabaseParameters
  where
  type
    AWSResponse UpdateRelationalDatabaseParameters =
      UpdateRelationalDatabaseParametersResponse
  request :: UpdateRelationalDatabaseParameters
-> Request UpdateRelationalDatabaseParameters
request = Service
-> UpdateRelationalDatabaseParameters
-> Request UpdateRelationalDatabaseParameters
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateRelationalDatabaseParameters
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateRelationalDatabaseParameters)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateRelationalDatabaseParameters))
-> Logger
-> Service
-> Proxy UpdateRelationalDatabaseParameters
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateRelationalDatabaseParameters)))
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 [Operation]
-> Int -> UpdateRelationalDatabaseParametersResponse
UpdateRelationalDatabaseParametersResponse'
            (Maybe [Operation]
 -> Int -> UpdateRelationalDatabaseParametersResponse)
-> Either String (Maybe [Operation])
-> Either
     String (Int -> UpdateRelationalDatabaseParametersResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Operation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"operations" Either String (Maybe (Maybe [Operation]))
-> Maybe [Operation] -> Either String (Maybe [Operation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Operation]
forall a. Monoid a => a
Prelude.mempty)
              Either String (Int -> UpdateRelationalDatabaseParametersResponse)
-> Either String Int
-> Either String UpdateRelationalDatabaseParametersResponse
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
    UpdateRelationalDatabaseParameters

instance
  Prelude.NFData
    UpdateRelationalDatabaseParameters

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

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

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

-- | /See:/ 'newUpdateRelationalDatabaseParametersResponse' smart constructor.
data UpdateRelationalDatabaseParametersResponse = UpdateRelationalDatabaseParametersResponse'
  { -- | An array of objects that describe the result of the action, such as the
    -- status of the request, the timestamp of the request, and the resources
    -- affected by the request.
    UpdateRelationalDatabaseParametersResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
    -- | The response's http status code.
    UpdateRelationalDatabaseParametersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateRelationalDatabaseParametersResponse
-> UpdateRelationalDatabaseParametersResponse -> Bool
(UpdateRelationalDatabaseParametersResponse
 -> UpdateRelationalDatabaseParametersResponse -> Bool)
-> (UpdateRelationalDatabaseParametersResponse
    -> UpdateRelationalDatabaseParametersResponse -> Bool)
-> Eq UpdateRelationalDatabaseParametersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRelationalDatabaseParametersResponse
-> UpdateRelationalDatabaseParametersResponse -> Bool
$c/= :: UpdateRelationalDatabaseParametersResponse
-> UpdateRelationalDatabaseParametersResponse -> Bool
== :: UpdateRelationalDatabaseParametersResponse
-> UpdateRelationalDatabaseParametersResponse -> Bool
$c== :: UpdateRelationalDatabaseParametersResponse
-> UpdateRelationalDatabaseParametersResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRelationalDatabaseParametersResponse]
ReadPrec UpdateRelationalDatabaseParametersResponse
Int -> ReadS UpdateRelationalDatabaseParametersResponse
ReadS [UpdateRelationalDatabaseParametersResponse]
(Int -> ReadS UpdateRelationalDatabaseParametersResponse)
-> ReadS [UpdateRelationalDatabaseParametersResponse]
-> ReadPrec UpdateRelationalDatabaseParametersResponse
-> ReadPrec [UpdateRelationalDatabaseParametersResponse]
-> Read UpdateRelationalDatabaseParametersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRelationalDatabaseParametersResponse]
$creadListPrec :: ReadPrec [UpdateRelationalDatabaseParametersResponse]
readPrec :: ReadPrec UpdateRelationalDatabaseParametersResponse
$creadPrec :: ReadPrec UpdateRelationalDatabaseParametersResponse
readList :: ReadS [UpdateRelationalDatabaseParametersResponse]
$creadList :: ReadS [UpdateRelationalDatabaseParametersResponse]
readsPrec :: Int -> ReadS UpdateRelationalDatabaseParametersResponse
$creadsPrec :: Int -> ReadS UpdateRelationalDatabaseParametersResponse
Prelude.Read, Int -> UpdateRelationalDatabaseParametersResponse -> ShowS
[UpdateRelationalDatabaseParametersResponse] -> ShowS
UpdateRelationalDatabaseParametersResponse -> String
(Int -> UpdateRelationalDatabaseParametersResponse -> ShowS)
-> (UpdateRelationalDatabaseParametersResponse -> String)
-> ([UpdateRelationalDatabaseParametersResponse] -> ShowS)
-> Show UpdateRelationalDatabaseParametersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRelationalDatabaseParametersResponse] -> ShowS
$cshowList :: [UpdateRelationalDatabaseParametersResponse] -> ShowS
show :: UpdateRelationalDatabaseParametersResponse -> String
$cshow :: UpdateRelationalDatabaseParametersResponse -> String
showsPrec :: Int -> UpdateRelationalDatabaseParametersResponse -> ShowS
$cshowsPrec :: Int -> UpdateRelationalDatabaseParametersResponse -> ShowS
Prelude.Show, (forall x.
 UpdateRelationalDatabaseParametersResponse
 -> Rep UpdateRelationalDatabaseParametersResponse x)
-> (forall x.
    Rep UpdateRelationalDatabaseParametersResponse x
    -> UpdateRelationalDatabaseParametersResponse)
-> Generic UpdateRelationalDatabaseParametersResponse
forall x.
Rep UpdateRelationalDatabaseParametersResponse x
-> UpdateRelationalDatabaseParametersResponse
forall x.
UpdateRelationalDatabaseParametersResponse
-> Rep UpdateRelationalDatabaseParametersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRelationalDatabaseParametersResponse x
-> UpdateRelationalDatabaseParametersResponse
$cfrom :: forall x.
UpdateRelationalDatabaseParametersResponse
-> Rep UpdateRelationalDatabaseParametersResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRelationalDatabaseParametersResponse' 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:
--
-- 'operations', 'updateRelationalDatabaseParametersResponse_operations' - An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
--
-- 'httpStatus', 'updateRelationalDatabaseParametersResponse_httpStatus' - The response's http status code.
newUpdateRelationalDatabaseParametersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateRelationalDatabaseParametersResponse
newUpdateRelationalDatabaseParametersResponse :: Int -> UpdateRelationalDatabaseParametersResponse
newUpdateRelationalDatabaseParametersResponse
  Int
pHttpStatus_ =
    UpdateRelationalDatabaseParametersResponse' :: Maybe [Operation]
-> Int -> UpdateRelationalDatabaseParametersResponse
UpdateRelationalDatabaseParametersResponse'
      { $sel:operations:UpdateRelationalDatabaseParametersResponse' :: Maybe [Operation]
operations =
          Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateRelationalDatabaseParametersResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
updateRelationalDatabaseParametersResponse_operations :: Lens.Lens' UpdateRelationalDatabaseParametersResponse (Prelude.Maybe [Operation])
updateRelationalDatabaseParametersResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateRelationalDatabaseParametersResponse
-> f UpdateRelationalDatabaseParametersResponse
updateRelationalDatabaseParametersResponse_operations = (UpdateRelationalDatabaseParametersResponse -> Maybe [Operation])
-> (UpdateRelationalDatabaseParametersResponse
    -> Maybe [Operation] -> UpdateRelationalDatabaseParametersResponse)
-> Lens
     UpdateRelationalDatabaseParametersResponse
     UpdateRelationalDatabaseParametersResponse
     (Maybe [Operation])
     (Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabaseParametersResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:UpdateRelationalDatabaseParametersResponse' :: UpdateRelationalDatabaseParametersResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: UpdateRelationalDatabaseParametersResponse
s@UpdateRelationalDatabaseParametersResponse' {} Maybe [Operation]
a -> UpdateRelationalDatabaseParametersResponse
s {$sel:operations:UpdateRelationalDatabaseParametersResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: UpdateRelationalDatabaseParametersResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
 -> UpdateRelationalDatabaseParametersResponse
 -> f UpdateRelationalDatabaseParametersResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
    -> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateRelationalDatabaseParametersResponse
-> f UpdateRelationalDatabaseParametersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Operation] [Operation] [Operation] [Operation]
-> Iso
     (Maybe [Operation])
     (Maybe [Operation])
     (Maybe [Operation])
     (Maybe [Operation])
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 [Operation] [Operation] [Operation] [Operation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    UpdateRelationalDatabaseParametersResponse