{-# 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.UpdateRelationalDatabase
-- 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 attributes of a database in Amazon
-- Lightsail.
--
-- Updates are applied immediately, or in cases where the updates could
-- result in an outage, are applied during the database\'s predefined
-- maintenance window.
--
-- The @update relational database@ 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.UpdateRelationalDatabase
  ( -- * Creating a Request
    UpdateRelationalDatabase (..),
    newUpdateRelationalDatabase,

    -- * Request Lenses
    updateRelationalDatabase_masterUserPassword,
    updateRelationalDatabase_publiclyAccessible,
    updateRelationalDatabase_enableBackupRetention,
    updateRelationalDatabase_preferredMaintenanceWindow,
    updateRelationalDatabase_caCertificateIdentifier,
    updateRelationalDatabase_preferredBackupWindow,
    updateRelationalDatabase_applyImmediately,
    updateRelationalDatabase_rotateMasterUserPassword,
    updateRelationalDatabase_disableBackupRetention,
    updateRelationalDatabase_relationalDatabaseName,

    -- * Destructuring the Response
    UpdateRelationalDatabaseResponse (..),
    newUpdateRelationalDatabaseResponse,

    -- * Response Lenses
    updateRelationalDatabaseResponse_operations,
    updateRelationalDatabaseResponse_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:/ 'newUpdateRelationalDatabase' smart constructor.
data UpdateRelationalDatabase = UpdateRelationalDatabase'
  { -- | The password for the master user. The password can include any printable
    -- ASCII character except \"\/\", \"\"\", or \"\@\".
    --
    -- My__SQL__
    --
    -- Constraints: Must contain from 8 to 41 characters.
    --
    -- __PostgreSQL__
    --
    -- Constraints: Must contain from 8 to 128 characters.
    UpdateRelationalDatabase -> Maybe (Sensitive Text)
masterUserPassword :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Specifies the accessibility options for your database. A value of @true@
    -- specifies a database that is available to resources outside of your
    -- Lightsail account. A value of @false@ specifies a database that is
    -- available only to your Lightsail resources in the same region as your
    -- database.
    UpdateRelationalDatabase -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | When @true@, enables automated backup retention for your database.
    --
    -- Updates are applied during the next maintenance window because this can
    -- result in an outage.
    UpdateRelationalDatabase -> Maybe Bool
enableBackupRetention :: Prelude.Maybe Prelude.Bool,
    -- | The weekly time range during which system maintenance can occur on your
    -- database.
    --
    -- The default is a 30-minute window selected at random from an 8-hour
    -- block of time for each AWS Region, occurring on a random day of the
    -- week.
    --
    -- Constraints:
    --
    -- -   Must be in the @ddd:hh24:mi-ddd:hh24:mi@ format.
    --
    -- -   Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
    --
    -- -   Must be at least 30 minutes.
    --
    -- -   Specified in Coordinated Universal Time (UTC).
    --
    -- -   Example: @Tue:17:00-Tue:17:30@
    UpdateRelationalDatabase -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | Indicates the certificate that needs to be associated with the database.
    UpdateRelationalDatabase -> Maybe Text
caCertificateIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The daily time range during which automated backups are created for your
    -- database if automated backups are enabled.
    --
    -- Constraints:
    --
    -- -   Must be in the @hh24:mi-hh24:mi@ format.
    --
    --     Example: @16:00-16:30@
    --
    -- -   Specified in Coordinated Universal Time (UTC).
    --
    -- -   Must not conflict with the preferred maintenance window.
    --
    -- -   Must be at least 30 minutes.
    UpdateRelationalDatabase -> Maybe Text
preferredBackupWindow :: Prelude.Maybe Prelude.Text,
    -- | When @true@, applies changes immediately. When @false@, applies changes
    -- during the preferred maintenance window. Some changes may cause an
    -- outage.
    --
    -- Default: @false@
    UpdateRelationalDatabase -> Maybe Bool
applyImmediately :: Prelude.Maybe Prelude.Bool,
    -- | When @true@, the master user password is changed to a new strong
    -- password generated by Lightsail.
    --
    -- Use the @get relational database master user password@ operation to get
    -- the new password.
    UpdateRelationalDatabase -> Maybe Bool
rotateMasterUserPassword :: Prelude.Maybe Prelude.Bool,
    -- | When @true@, disables automated backup retention for your database.
    --
    -- Disabling backup retention deletes all automated database backups.
    -- Before disabling this, you may want to create a snapshot of your
    -- database using the @create relational database snapshot@ operation.
    --
    -- Updates are applied during the next maintenance window because this can
    -- result in an outage.
    UpdateRelationalDatabase -> Maybe Bool
disableBackupRetention :: Prelude.Maybe Prelude.Bool,
    -- | The name of your Lightsail database resource to update.
    UpdateRelationalDatabase -> Text
relationalDatabaseName :: Prelude.Text
  }
  deriving (UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
(UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool)
-> (UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool)
-> Eq UpdateRelationalDatabase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
$c/= :: UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
== :: UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
$c== :: UpdateRelationalDatabase -> UpdateRelationalDatabase -> Bool
Prelude.Eq, Int -> UpdateRelationalDatabase -> ShowS
[UpdateRelationalDatabase] -> ShowS
UpdateRelationalDatabase -> String
(Int -> UpdateRelationalDatabase -> ShowS)
-> (UpdateRelationalDatabase -> String)
-> ([UpdateRelationalDatabase] -> ShowS)
-> Show UpdateRelationalDatabase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRelationalDatabase] -> ShowS
$cshowList :: [UpdateRelationalDatabase] -> ShowS
show :: UpdateRelationalDatabase -> String
$cshow :: UpdateRelationalDatabase -> String
showsPrec :: Int -> UpdateRelationalDatabase -> ShowS
$cshowsPrec :: Int -> UpdateRelationalDatabase -> ShowS
Prelude.Show, (forall x.
 UpdateRelationalDatabase -> Rep UpdateRelationalDatabase x)
-> (forall x.
    Rep UpdateRelationalDatabase x -> UpdateRelationalDatabase)
-> Generic UpdateRelationalDatabase
forall x.
Rep UpdateRelationalDatabase x -> UpdateRelationalDatabase
forall x.
UpdateRelationalDatabase -> Rep UpdateRelationalDatabase x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRelationalDatabase x -> UpdateRelationalDatabase
$cfrom :: forall x.
UpdateRelationalDatabase -> Rep UpdateRelationalDatabase x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRelationalDatabase' 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:
--
-- 'masterUserPassword', 'updateRelationalDatabase_masterUserPassword' - The password for the master user. The password can include any printable
-- ASCII character except \"\/\", \"\"\", or \"\@\".
--
-- My__SQL__
--
-- Constraints: Must contain from 8 to 41 characters.
--
-- __PostgreSQL__
--
-- Constraints: Must contain from 8 to 128 characters.
--
-- 'publiclyAccessible', 'updateRelationalDatabase_publiclyAccessible' - Specifies the accessibility options for your database. A value of @true@
-- specifies a database that is available to resources outside of your
-- Lightsail account. A value of @false@ specifies a database that is
-- available only to your Lightsail resources in the same region as your
-- database.
--
-- 'enableBackupRetention', 'updateRelationalDatabase_enableBackupRetention' - When @true@, enables automated backup retention for your database.
--
-- Updates are applied during the next maintenance window because this can
-- result in an outage.
--
-- 'preferredMaintenanceWindow', 'updateRelationalDatabase_preferredMaintenanceWindow' - The weekly time range during which system maintenance can occur on your
-- database.
--
-- The default is a 30-minute window selected at random from an 8-hour
-- block of time for each AWS Region, occurring on a random day of the
-- week.
--
-- Constraints:
--
-- -   Must be in the @ddd:hh24:mi-ddd:hh24:mi@ format.
--
-- -   Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
--
-- -   Must be at least 30 minutes.
--
-- -   Specified in Coordinated Universal Time (UTC).
--
-- -   Example: @Tue:17:00-Tue:17:30@
--
-- 'caCertificateIdentifier', 'updateRelationalDatabase_caCertificateIdentifier' - Indicates the certificate that needs to be associated with the database.
--
-- 'preferredBackupWindow', 'updateRelationalDatabase_preferredBackupWindow' - The daily time range during which automated backups are created for your
-- database if automated backups are enabled.
--
-- Constraints:
--
-- -   Must be in the @hh24:mi-hh24:mi@ format.
--
--     Example: @16:00-16:30@
--
-- -   Specified in Coordinated Universal Time (UTC).
--
-- -   Must not conflict with the preferred maintenance window.
--
-- -   Must be at least 30 minutes.
--
-- 'applyImmediately', 'updateRelationalDatabase_applyImmediately' - When @true@, applies changes immediately. When @false@, applies changes
-- during the preferred maintenance window. Some changes may cause an
-- outage.
--
-- Default: @false@
--
-- 'rotateMasterUserPassword', 'updateRelationalDatabase_rotateMasterUserPassword' - When @true@, the master user password is changed to a new strong
-- password generated by Lightsail.
--
-- Use the @get relational database master user password@ operation to get
-- the new password.
--
-- 'disableBackupRetention', 'updateRelationalDatabase_disableBackupRetention' - When @true@, disables automated backup retention for your database.
--
-- Disabling backup retention deletes all automated database backups.
-- Before disabling this, you may want to create a snapshot of your
-- database using the @create relational database snapshot@ operation.
--
-- Updates are applied during the next maintenance window because this can
-- result in an outage.
--
-- 'relationalDatabaseName', 'updateRelationalDatabase_relationalDatabaseName' - The name of your Lightsail database resource to update.
newUpdateRelationalDatabase ::
  -- | 'relationalDatabaseName'
  Prelude.Text ->
  UpdateRelationalDatabase
newUpdateRelationalDatabase :: Text -> UpdateRelationalDatabase
newUpdateRelationalDatabase Text
pRelationalDatabaseName_ =
  UpdateRelationalDatabase' :: Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Text
-> UpdateRelationalDatabase
UpdateRelationalDatabase'
    { $sel:masterUserPassword:UpdateRelationalDatabase' :: Maybe (Sensitive Text)
masterUserPassword =
        Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:publiclyAccessible:UpdateRelationalDatabase' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:enableBackupRetention:UpdateRelationalDatabase' :: Maybe Bool
enableBackupRetention = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:UpdateRelationalDatabase' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:caCertificateIdentifier:UpdateRelationalDatabase' :: Maybe Text
caCertificateIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredBackupWindow:UpdateRelationalDatabase' :: Maybe Text
preferredBackupWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applyImmediately:UpdateRelationalDatabase' :: Maybe Bool
applyImmediately = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:rotateMasterUserPassword:UpdateRelationalDatabase' :: Maybe Bool
rotateMasterUserPassword = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:disableBackupRetention:UpdateRelationalDatabase' :: Maybe Bool
disableBackupRetention = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:relationalDatabaseName:UpdateRelationalDatabase' :: Text
relationalDatabaseName = Text
pRelationalDatabaseName_
    }

-- | The password for the master user. The password can include any printable
-- ASCII character except \"\/\", \"\"\", or \"\@\".
--
-- My__SQL__
--
-- Constraints: Must contain from 8 to 41 characters.
--
-- __PostgreSQL__
--
-- Constraints: Must contain from 8 to 128 characters.
updateRelationalDatabase_masterUserPassword :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Text)
updateRelationalDatabase_masterUserPassword :: (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_masterUserPassword = (UpdateRelationalDatabase -> Maybe (Sensitive Text))
-> (UpdateRelationalDatabase
    -> Maybe (Sensitive Text) -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe (Sensitive Text)
masterUserPassword :: Maybe (Sensitive Text)
$sel:masterUserPassword:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe (Sensitive Text)
masterUserPassword} -> Maybe (Sensitive Text)
masterUserPassword) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe (Sensitive Text)
a -> UpdateRelationalDatabase
s {$sel:masterUserPassword:UpdateRelationalDatabase' :: Maybe (Sensitive Text)
masterUserPassword = Maybe (Sensitive Text)
a} :: UpdateRelationalDatabase) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> UpdateRelationalDatabase -> f UpdateRelationalDatabase)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase
-> f UpdateRelationalDatabase
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Specifies the accessibility options for your database. A value of @true@
-- specifies a database that is available to resources outside of your
-- Lightsail account. A value of @false@ specifies a database that is
-- available only to your Lightsail resources in the same region as your
-- database.
updateRelationalDatabase_publiclyAccessible :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_publiclyAccessible = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
    -> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:publiclyAccessible:UpdateRelationalDatabase' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: UpdateRelationalDatabase)

-- | When @true@, enables automated backup retention for your database.
--
-- Updates are applied during the next maintenance window because this can
-- result in an outage.
updateRelationalDatabase_enableBackupRetention :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_enableBackupRetention :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_enableBackupRetention = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
    -> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
enableBackupRetention :: Maybe Bool
$sel:enableBackupRetention:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
enableBackupRetention} -> Maybe Bool
enableBackupRetention) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:enableBackupRetention:UpdateRelationalDatabase' :: Maybe Bool
enableBackupRetention = Maybe Bool
a} :: UpdateRelationalDatabase)

-- | The weekly time range during which system maintenance can occur on your
-- database.
--
-- The default is a 30-minute window selected at random from an 8-hour
-- block of time for each AWS Region, occurring on a random day of the
-- week.
--
-- Constraints:
--
-- -   Must be in the @ddd:hh24:mi-ddd:hh24:mi@ format.
--
-- -   Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.
--
-- -   Must be at least 30 minutes.
--
-- -   Specified in Coordinated Universal Time (UTC).
--
-- -   Example: @Tue:17:00-Tue:17:30@
updateRelationalDatabase_preferredMaintenanceWindow :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Text)
updateRelationalDatabase_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_preferredMaintenanceWindow = (UpdateRelationalDatabase -> Maybe Text)
-> (UpdateRelationalDatabase
    -> Maybe Text -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Text
a -> UpdateRelationalDatabase
s {$sel:preferredMaintenanceWindow:UpdateRelationalDatabase' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: UpdateRelationalDatabase)

-- | Indicates the certificate that needs to be associated with the database.
updateRelationalDatabase_caCertificateIdentifier :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Text)
updateRelationalDatabase_caCertificateIdentifier :: (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_caCertificateIdentifier = (UpdateRelationalDatabase -> Maybe Text)
-> (UpdateRelationalDatabase
    -> Maybe Text -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Text
caCertificateIdentifier :: Maybe Text
$sel:caCertificateIdentifier:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
caCertificateIdentifier} -> Maybe Text
caCertificateIdentifier) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Text
a -> UpdateRelationalDatabase
s {$sel:caCertificateIdentifier:UpdateRelationalDatabase' :: Maybe Text
caCertificateIdentifier = Maybe Text
a} :: UpdateRelationalDatabase)

-- | The daily time range during which automated backups are created for your
-- database if automated backups are enabled.
--
-- Constraints:
--
-- -   Must be in the @hh24:mi-hh24:mi@ format.
--
--     Example: @16:00-16:30@
--
-- -   Specified in Coordinated Universal Time (UTC).
--
-- -   Must not conflict with the preferred maintenance window.
--
-- -   Must be at least 30 minutes.
updateRelationalDatabase_preferredBackupWindow :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Text)
updateRelationalDatabase_preferredBackupWindow :: (Maybe Text -> f (Maybe Text))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_preferredBackupWindow = (UpdateRelationalDatabase -> Maybe Text)
-> (UpdateRelationalDatabase
    -> Maybe Text -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Text
preferredBackupWindow :: Maybe Text
$sel:preferredBackupWindow:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
preferredBackupWindow} -> Maybe Text
preferredBackupWindow) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Text
a -> UpdateRelationalDatabase
s {$sel:preferredBackupWindow:UpdateRelationalDatabase' :: Maybe Text
preferredBackupWindow = Maybe Text
a} :: UpdateRelationalDatabase)

-- | When @true@, applies changes immediately. When @false@, applies changes
-- during the preferred maintenance window. Some changes may cause an
-- outage.
--
-- Default: @false@
updateRelationalDatabase_applyImmediately :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_applyImmediately :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_applyImmediately = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
    -> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
applyImmediately :: Maybe Bool
$sel:applyImmediately:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
applyImmediately} -> Maybe Bool
applyImmediately) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:applyImmediately:UpdateRelationalDatabase' :: Maybe Bool
applyImmediately = Maybe Bool
a} :: UpdateRelationalDatabase)

-- | When @true@, the master user password is changed to a new strong
-- password generated by Lightsail.
--
-- Use the @get relational database master user password@ operation to get
-- the new password.
updateRelationalDatabase_rotateMasterUserPassword :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_rotateMasterUserPassword :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_rotateMasterUserPassword = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
    -> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
rotateMasterUserPassword :: Maybe Bool
$sel:rotateMasterUserPassword:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
rotateMasterUserPassword} -> Maybe Bool
rotateMasterUserPassword) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:rotateMasterUserPassword:UpdateRelationalDatabase' :: Maybe Bool
rotateMasterUserPassword = Maybe Bool
a} :: UpdateRelationalDatabase)

-- | When @true@, disables automated backup retention for your database.
--
-- Disabling backup retention deletes all automated database backups.
-- Before disabling this, you may want to create a snapshot of your
-- database using the @create relational database snapshot@ operation.
--
-- Updates are applied during the next maintenance window because this can
-- result in an outage.
updateRelationalDatabase_disableBackupRetention :: Lens.Lens' UpdateRelationalDatabase (Prelude.Maybe Prelude.Bool)
updateRelationalDatabase_disableBackupRetention :: (Maybe Bool -> f (Maybe Bool))
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_disableBackupRetention = (UpdateRelationalDatabase -> Maybe Bool)
-> (UpdateRelationalDatabase
    -> Maybe Bool -> UpdateRelationalDatabase)
-> Lens
     UpdateRelationalDatabase
     UpdateRelationalDatabase
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Maybe Bool
disableBackupRetention :: Maybe Bool
$sel:disableBackupRetention:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
disableBackupRetention} -> Maybe Bool
disableBackupRetention) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Maybe Bool
a -> UpdateRelationalDatabase
s {$sel:disableBackupRetention:UpdateRelationalDatabase' :: Maybe Bool
disableBackupRetention = Maybe Bool
a} :: UpdateRelationalDatabase)

-- | The name of your Lightsail database resource to update.
updateRelationalDatabase_relationalDatabaseName :: Lens.Lens' UpdateRelationalDatabase Prelude.Text
updateRelationalDatabase_relationalDatabaseName :: (Text -> f Text)
-> UpdateRelationalDatabase -> f UpdateRelationalDatabase
updateRelationalDatabase_relationalDatabaseName = (UpdateRelationalDatabase -> Text)
-> (UpdateRelationalDatabase -> Text -> UpdateRelationalDatabase)
-> Lens UpdateRelationalDatabase UpdateRelationalDatabase Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabase' {Text
relationalDatabaseName :: Text
$sel:relationalDatabaseName:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Text
relationalDatabaseName} -> Text
relationalDatabaseName) (\s :: UpdateRelationalDatabase
s@UpdateRelationalDatabase' {} Text
a -> UpdateRelationalDatabase
s {$sel:relationalDatabaseName:UpdateRelationalDatabase' :: Text
relationalDatabaseName = Text
a} :: UpdateRelationalDatabase)

instance Core.AWSRequest UpdateRelationalDatabase where
  type
    AWSResponse UpdateRelationalDatabase =
      UpdateRelationalDatabaseResponse
  request :: UpdateRelationalDatabase -> Request UpdateRelationalDatabase
request = Service
-> UpdateRelationalDatabase -> Request UpdateRelationalDatabase
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateRelationalDatabase
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateRelationalDatabase)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateRelationalDatabase))
-> Logger
-> Service
-> Proxy UpdateRelationalDatabase
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateRelationalDatabase)))
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 -> UpdateRelationalDatabaseResponse
UpdateRelationalDatabaseResponse'
            (Maybe [Operation] -> Int -> UpdateRelationalDatabaseResponse)
-> Either String (Maybe [Operation])
-> Either String (Int -> UpdateRelationalDatabaseResponse)
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 -> UpdateRelationalDatabaseResponse)
-> Either String Int
-> Either String UpdateRelationalDatabaseResponse
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 UpdateRelationalDatabase

instance Prelude.NFData UpdateRelationalDatabase

instance Core.ToHeaders UpdateRelationalDatabase where
  toHeaders :: UpdateRelationalDatabase -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateRelationalDatabase -> 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.UpdateRelationalDatabase" ::
                          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 UpdateRelationalDatabase where
  toJSON :: UpdateRelationalDatabase -> Value
toJSON UpdateRelationalDatabase' {Maybe Bool
Maybe Text
Maybe (Sensitive Text)
Text
relationalDatabaseName :: Text
disableBackupRetention :: Maybe Bool
rotateMasterUserPassword :: Maybe Bool
applyImmediately :: Maybe Bool
preferredBackupWindow :: Maybe Text
caCertificateIdentifier :: Maybe Text
preferredMaintenanceWindow :: Maybe Text
enableBackupRetention :: Maybe Bool
publiclyAccessible :: Maybe Bool
masterUserPassword :: Maybe (Sensitive Text)
$sel:relationalDatabaseName:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Text
$sel:disableBackupRetention:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:rotateMasterUserPassword:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:applyImmediately:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:preferredBackupWindow:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
$sel:caCertificateIdentifier:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
$sel:preferredMaintenanceWindow:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Text
$sel:enableBackupRetention:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:publiclyAccessible:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe Bool
$sel:masterUserPassword:UpdateRelationalDatabase' :: UpdateRelationalDatabase -> Maybe (Sensitive Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"masterUserPassword" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
masterUserPassword,
            (Text
"publiclyAccessible" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
publiclyAccessible,
            (Text
"enableBackupRetention" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableBackupRetention,
            (Text
"preferredMaintenanceWindow" 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
preferredMaintenanceWindow,
            (Text
"caCertificateIdentifier" 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
caCertificateIdentifier,
            (Text
"preferredBackupWindow" 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
preferredBackupWindow,
            (Text
"applyImmediately" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
applyImmediately,
            (Text
"rotateMasterUserPassword" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
rotateMasterUserPassword,
            (Text
"disableBackupRetention" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableBackupRetention,
            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 UpdateRelationalDatabase where
  toPath :: UpdateRelationalDatabase -> ByteString
toPath = ByteString -> UpdateRelationalDatabase -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newUpdateRelationalDatabaseResponse' smart constructor.
data UpdateRelationalDatabaseResponse = UpdateRelationalDatabaseResponse'
  { -- | 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.
    UpdateRelationalDatabaseResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
    -- | The response's http status code.
    UpdateRelationalDatabaseResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
(UpdateRelationalDatabaseResponse
 -> UpdateRelationalDatabaseResponse -> Bool)
-> (UpdateRelationalDatabaseResponse
    -> UpdateRelationalDatabaseResponse -> Bool)
-> Eq UpdateRelationalDatabaseResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
$c/= :: UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
== :: UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
$c== :: UpdateRelationalDatabaseResponse
-> UpdateRelationalDatabaseResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRelationalDatabaseResponse]
ReadPrec UpdateRelationalDatabaseResponse
Int -> ReadS UpdateRelationalDatabaseResponse
ReadS [UpdateRelationalDatabaseResponse]
(Int -> ReadS UpdateRelationalDatabaseResponse)
-> ReadS [UpdateRelationalDatabaseResponse]
-> ReadPrec UpdateRelationalDatabaseResponse
-> ReadPrec [UpdateRelationalDatabaseResponse]
-> Read UpdateRelationalDatabaseResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRelationalDatabaseResponse]
$creadListPrec :: ReadPrec [UpdateRelationalDatabaseResponse]
readPrec :: ReadPrec UpdateRelationalDatabaseResponse
$creadPrec :: ReadPrec UpdateRelationalDatabaseResponse
readList :: ReadS [UpdateRelationalDatabaseResponse]
$creadList :: ReadS [UpdateRelationalDatabaseResponse]
readsPrec :: Int -> ReadS UpdateRelationalDatabaseResponse
$creadsPrec :: Int -> ReadS UpdateRelationalDatabaseResponse
Prelude.Read, Int -> UpdateRelationalDatabaseResponse -> ShowS
[UpdateRelationalDatabaseResponse] -> ShowS
UpdateRelationalDatabaseResponse -> String
(Int -> UpdateRelationalDatabaseResponse -> ShowS)
-> (UpdateRelationalDatabaseResponse -> String)
-> ([UpdateRelationalDatabaseResponse] -> ShowS)
-> Show UpdateRelationalDatabaseResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRelationalDatabaseResponse] -> ShowS
$cshowList :: [UpdateRelationalDatabaseResponse] -> ShowS
show :: UpdateRelationalDatabaseResponse -> String
$cshow :: UpdateRelationalDatabaseResponse -> String
showsPrec :: Int -> UpdateRelationalDatabaseResponse -> ShowS
$cshowsPrec :: Int -> UpdateRelationalDatabaseResponse -> ShowS
Prelude.Show, (forall x.
 UpdateRelationalDatabaseResponse
 -> Rep UpdateRelationalDatabaseResponse x)
-> (forall x.
    Rep UpdateRelationalDatabaseResponse x
    -> UpdateRelationalDatabaseResponse)
-> Generic UpdateRelationalDatabaseResponse
forall x.
Rep UpdateRelationalDatabaseResponse x
-> UpdateRelationalDatabaseResponse
forall x.
UpdateRelationalDatabaseResponse
-> Rep UpdateRelationalDatabaseResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRelationalDatabaseResponse x
-> UpdateRelationalDatabaseResponse
$cfrom :: forall x.
UpdateRelationalDatabaseResponse
-> Rep UpdateRelationalDatabaseResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRelationalDatabaseResponse' 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', 'updateRelationalDatabaseResponse_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', 'updateRelationalDatabaseResponse_httpStatus' - The response's http status code.
newUpdateRelationalDatabaseResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateRelationalDatabaseResponse
newUpdateRelationalDatabaseResponse :: Int -> UpdateRelationalDatabaseResponse
newUpdateRelationalDatabaseResponse Int
pHttpStatus_ =
  UpdateRelationalDatabaseResponse' :: Maybe [Operation] -> Int -> UpdateRelationalDatabaseResponse
UpdateRelationalDatabaseResponse'
    { $sel:operations:UpdateRelationalDatabaseResponse' :: Maybe [Operation]
operations =
        Maybe [Operation]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateRelationalDatabaseResponse' :: 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.
updateRelationalDatabaseResponse_operations :: Lens.Lens' UpdateRelationalDatabaseResponse (Prelude.Maybe [Operation])
updateRelationalDatabaseResponse_operations :: (Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateRelationalDatabaseResponse
-> f UpdateRelationalDatabaseResponse
updateRelationalDatabaseResponse_operations = (UpdateRelationalDatabaseResponse -> Maybe [Operation])
-> (UpdateRelationalDatabaseResponse
    -> Maybe [Operation] -> UpdateRelationalDatabaseResponse)
-> Lens
     UpdateRelationalDatabaseResponse
     UpdateRelationalDatabaseResponse
     (Maybe [Operation])
     (Maybe [Operation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabaseResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:UpdateRelationalDatabaseResponse' :: UpdateRelationalDatabaseResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: UpdateRelationalDatabaseResponse
s@UpdateRelationalDatabaseResponse' {} Maybe [Operation]
a -> UpdateRelationalDatabaseResponse
s {$sel:operations:UpdateRelationalDatabaseResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: UpdateRelationalDatabaseResponse) ((Maybe [Operation] -> f (Maybe [Operation]))
 -> UpdateRelationalDatabaseResponse
 -> f UpdateRelationalDatabaseResponse)
-> ((Maybe [Operation] -> f (Maybe [Operation]))
    -> Maybe [Operation] -> f (Maybe [Operation]))
-> (Maybe [Operation] -> f (Maybe [Operation]))
-> UpdateRelationalDatabaseResponse
-> f UpdateRelationalDatabaseResponse
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.
updateRelationalDatabaseResponse_httpStatus :: Lens.Lens' UpdateRelationalDatabaseResponse Prelude.Int
updateRelationalDatabaseResponse_httpStatus :: (Int -> f Int)
-> UpdateRelationalDatabaseResponse
-> f UpdateRelationalDatabaseResponse
updateRelationalDatabaseResponse_httpStatus = (UpdateRelationalDatabaseResponse -> Int)
-> (UpdateRelationalDatabaseResponse
    -> Int -> UpdateRelationalDatabaseResponse)
-> Lens
     UpdateRelationalDatabaseResponse
     UpdateRelationalDatabaseResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRelationalDatabaseResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateRelationalDatabaseResponse' :: UpdateRelationalDatabaseResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateRelationalDatabaseResponse
s@UpdateRelationalDatabaseResponse' {} Int
a -> UpdateRelationalDatabaseResponse
s {$sel:httpStatus:UpdateRelationalDatabaseResponse' :: Int
httpStatus = Int
a} :: UpdateRelationalDatabaseResponse)

instance
  Prelude.NFData
    UpdateRelationalDatabaseResponse