{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.RelationalDatabase
-- 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)
module Amazonka.Lightsail.Types.RelationalDatabase where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.PendingMaintenanceAction
import Amazonka.Lightsail.Types.PendingModifiedRelationalDatabaseValues
import Amazonka.Lightsail.Types.RelationalDatabaseEndpoint
import Amazonka.Lightsail.Types.RelationalDatabaseHardware
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | Describes a database.
--
-- /See:/ 'newRelationalDatabase' smart constructor.
data RelationalDatabase = RelationalDatabase'
  { -- | The database engine version (for example, @5.7.23@).
    RelationalDatabase -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The bundle ID for the database. A bundle describes the performance
    -- specifications for your database.
    RelationalDatabase -> Maybe Text
relationalDatabaseBundleId :: Prelude.Maybe Prelude.Text,
    -- | The master endpoint for the database.
    RelationalDatabase -> Maybe RelationalDatabaseEndpoint
masterEndpoint :: Prelude.Maybe RelationalDatabaseEndpoint,
    -- | Describes the current state of the database.
    RelationalDatabase -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
    -- | The Lightsail resource type for the database (for example,
    -- @RelationalDatabase@).
    RelationalDatabase -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | A Boolean value indicating whether the database is publicly accessible.
    RelationalDatabase -> Maybe Bool
publiclyAccessible :: Prelude.Maybe Prelude.Bool,
    -- | The master user name of the database.
    RelationalDatabase -> Maybe Text
masterUsername :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the database.
    RelationalDatabase -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the database was created. Formatted in Unix time.
    RelationalDatabase -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The Region name and Availability Zone where the database is located.
    RelationalDatabase -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
    -- | The database software (for example, @MySQL@).
    RelationalDatabase -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | The latest point in time to which the database can be restored.
    -- Formatted in Unix time.
    RelationalDatabase -> Maybe POSIX
latestRestorableTime :: Prelude.Maybe Core.POSIX,
    -- | The weekly time range during which system maintenance can occur on the
    -- database.
    --
    -- In the format @ddd:hh24:mi-ddd:hh24:mi@. For example,
    -- @Tue:17:00-Tue:17:30@.
    RelationalDatabase -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The blueprint ID for the database. A blueprint describes the major
    -- engine version of a database.
    RelationalDatabase -> Maybe Text
relationalDatabaseBlueprintId :: Prelude.Maybe Prelude.Text,
    -- | The certificate associated with the database.
    RelationalDatabase -> Maybe Text
caCertificateIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The unique name of the database resource in Lightsail.
    RelationalDatabase -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A Boolean value indicating whether automated backup retention is enabled
    -- for the database.
    RelationalDatabase -> Maybe Bool
backupRetentionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The daily time range during which automated backups are created for the
    -- database (for example, @16:00-16:30@).
    RelationalDatabase -> Maybe Text
preferredBackupWindow :: Prelude.Maybe Prelude.Text,
    -- | Describes the pending maintenance actions for the database.
    RelationalDatabase -> Maybe [PendingMaintenanceAction]
pendingMaintenanceActions :: Prelude.Maybe [PendingMaintenanceAction],
    -- | The support code for the database. Include this code in your email to
    -- support when you have questions about a database in Lightsail. This code
    -- enables our support team to look up your Lightsail information more
    -- easily.
    RelationalDatabase -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
    -- | Describes the secondary Availability Zone of a high availability
    -- database.
    --
    -- The secondary database is used for failover support of a high
    -- availability database.
    RelationalDatabase -> Maybe Text
secondaryAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | Describes pending database value modifications.
    RelationalDatabase -> Maybe PendingModifiedRelationalDatabaseValues
pendingModifiedValues :: Prelude.Maybe PendingModifiedRelationalDatabaseValues,
    -- | The name of the master database created when the Lightsail database
    -- resource is created.
    RelationalDatabase -> Maybe Text
masterDatabaseName :: Prelude.Maybe Prelude.Text,
    -- | Describes the hardware of the database.
    RelationalDatabase -> Maybe RelationalDatabaseHardware
hardware :: Prelude.Maybe RelationalDatabaseHardware,
    -- | The status of parameter updates for the database.
    RelationalDatabase -> Maybe Text
parameterApplyStatus :: Prelude.Maybe Prelude.Text,
    -- | The tag keys and optional values for the resource. For more information
    -- about tags in Lightsail, see the
    -- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
    RelationalDatabase -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (RelationalDatabase -> RelationalDatabase -> Bool
(RelationalDatabase -> RelationalDatabase -> Bool)
-> (RelationalDatabase -> RelationalDatabase -> Bool)
-> Eq RelationalDatabase
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RelationalDatabase -> RelationalDatabase -> Bool
$c/= :: RelationalDatabase -> RelationalDatabase -> Bool
== :: RelationalDatabase -> RelationalDatabase -> Bool
$c== :: RelationalDatabase -> RelationalDatabase -> Bool
Prelude.Eq, ReadPrec [RelationalDatabase]
ReadPrec RelationalDatabase
Int -> ReadS RelationalDatabase
ReadS [RelationalDatabase]
(Int -> ReadS RelationalDatabase)
-> ReadS [RelationalDatabase]
-> ReadPrec RelationalDatabase
-> ReadPrec [RelationalDatabase]
-> Read RelationalDatabase
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RelationalDatabase]
$creadListPrec :: ReadPrec [RelationalDatabase]
readPrec :: ReadPrec RelationalDatabase
$creadPrec :: ReadPrec RelationalDatabase
readList :: ReadS [RelationalDatabase]
$creadList :: ReadS [RelationalDatabase]
readsPrec :: Int -> ReadS RelationalDatabase
$creadsPrec :: Int -> ReadS RelationalDatabase
Prelude.Read, Int -> RelationalDatabase -> ShowS
[RelationalDatabase] -> ShowS
RelationalDatabase -> String
(Int -> RelationalDatabase -> ShowS)
-> (RelationalDatabase -> String)
-> ([RelationalDatabase] -> ShowS)
-> Show RelationalDatabase
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RelationalDatabase] -> ShowS
$cshowList :: [RelationalDatabase] -> ShowS
show :: RelationalDatabase -> String
$cshow :: RelationalDatabase -> String
showsPrec :: Int -> RelationalDatabase -> ShowS
$cshowsPrec :: Int -> RelationalDatabase -> ShowS
Prelude.Show, (forall x. RelationalDatabase -> Rep RelationalDatabase x)
-> (forall x. Rep RelationalDatabase x -> RelationalDatabase)
-> Generic RelationalDatabase
forall x. Rep RelationalDatabase x -> RelationalDatabase
forall x. RelationalDatabase -> Rep RelationalDatabase x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RelationalDatabase x -> RelationalDatabase
$cfrom :: forall x. RelationalDatabase -> Rep RelationalDatabase x
Prelude.Generic)

-- |
-- Create a value of 'RelationalDatabase' 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:
--
-- 'engineVersion', 'relationalDatabase_engineVersion' - The database engine version (for example, @5.7.23@).
--
-- 'relationalDatabaseBundleId', 'relationalDatabase_relationalDatabaseBundleId' - The bundle ID for the database. A bundle describes the performance
-- specifications for your database.
--
-- 'masterEndpoint', 'relationalDatabase_masterEndpoint' - The master endpoint for the database.
--
-- 'state', 'relationalDatabase_state' - Describes the current state of the database.
--
-- 'resourceType', 'relationalDatabase_resourceType' - The Lightsail resource type for the database (for example,
-- @RelationalDatabase@).
--
-- 'publiclyAccessible', 'relationalDatabase_publiclyAccessible' - A Boolean value indicating whether the database is publicly accessible.
--
-- 'masterUsername', 'relationalDatabase_masterUsername' - The master user name of the database.
--
-- 'arn', 'relationalDatabase_arn' - The Amazon Resource Name (ARN) of the database.
--
-- 'createdAt', 'relationalDatabase_createdAt' - The timestamp when the database was created. Formatted in Unix time.
--
-- 'location', 'relationalDatabase_location' - The Region name and Availability Zone where the database is located.
--
-- 'engine', 'relationalDatabase_engine' - The database software (for example, @MySQL@).
--
-- 'latestRestorableTime', 'relationalDatabase_latestRestorableTime' - The latest point in time to which the database can be restored.
-- Formatted in Unix time.
--
-- 'preferredMaintenanceWindow', 'relationalDatabase_preferredMaintenanceWindow' - The weekly time range during which system maintenance can occur on the
-- database.
--
-- In the format @ddd:hh24:mi-ddd:hh24:mi@. For example,
-- @Tue:17:00-Tue:17:30@.
--
-- 'relationalDatabaseBlueprintId', 'relationalDatabase_relationalDatabaseBlueprintId' - The blueprint ID for the database. A blueprint describes the major
-- engine version of a database.
--
-- 'caCertificateIdentifier', 'relationalDatabase_caCertificateIdentifier' - The certificate associated with the database.
--
-- 'name', 'relationalDatabase_name' - The unique name of the database resource in Lightsail.
--
-- 'backupRetentionEnabled', 'relationalDatabase_backupRetentionEnabled' - A Boolean value indicating whether automated backup retention is enabled
-- for the database.
--
-- 'preferredBackupWindow', 'relationalDatabase_preferredBackupWindow' - The daily time range during which automated backups are created for the
-- database (for example, @16:00-16:30@).
--
-- 'pendingMaintenanceActions', 'relationalDatabase_pendingMaintenanceActions' - Describes the pending maintenance actions for the database.
--
-- 'supportCode', 'relationalDatabase_supportCode' - The support code for the database. Include this code in your email to
-- support when you have questions about a database in Lightsail. This code
-- enables our support team to look up your Lightsail information more
-- easily.
--
-- 'secondaryAvailabilityZone', 'relationalDatabase_secondaryAvailabilityZone' - Describes the secondary Availability Zone of a high availability
-- database.
--
-- The secondary database is used for failover support of a high
-- availability database.
--
-- 'pendingModifiedValues', 'relationalDatabase_pendingModifiedValues' - Describes pending database value modifications.
--
-- 'masterDatabaseName', 'relationalDatabase_masterDatabaseName' - The name of the master database created when the Lightsail database
-- resource is created.
--
-- 'hardware', 'relationalDatabase_hardware' - Describes the hardware of the database.
--
-- 'parameterApplyStatus', 'relationalDatabase_parameterApplyStatus' - The status of parameter updates for the database.
--
-- 'tags', 'relationalDatabase_tags' - The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
newRelationalDatabase ::
  RelationalDatabase
newRelationalDatabase :: RelationalDatabase
newRelationalDatabase =
  RelationalDatabase' :: Maybe Text
-> Maybe Text
-> Maybe RelationalDatabaseEndpoint
-> Maybe Text
-> Maybe ResourceType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [PendingMaintenanceAction]
-> Maybe Text
-> Maybe Text
-> Maybe PendingModifiedRelationalDatabaseValues
-> Maybe Text
-> Maybe RelationalDatabaseHardware
-> Maybe Text
-> Maybe [Tag]
-> RelationalDatabase
RelationalDatabase'
    { $sel:engineVersion:RelationalDatabase' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:relationalDatabaseBundleId:RelationalDatabase' :: Maybe Text
relationalDatabaseBundleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:masterEndpoint:RelationalDatabase' :: Maybe RelationalDatabaseEndpoint
masterEndpoint = Maybe RelationalDatabaseEndpoint
forall a. Maybe a
Prelude.Nothing,
      $sel:state:RelationalDatabase' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:RelationalDatabase' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:publiclyAccessible:RelationalDatabase' :: Maybe Bool
publiclyAccessible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:masterUsername:RelationalDatabase' :: Maybe Text
masterUsername = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:RelationalDatabase' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:RelationalDatabase' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:location:RelationalDatabase' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:RelationalDatabase' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestRestorableTime:RelationalDatabase' :: Maybe POSIX
latestRestorableTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:RelationalDatabase' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:relationalDatabaseBlueprintId:RelationalDatabase' :: Maybe Text
relationalDatabaseBlueprintId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:caCertificateIdentifier:RelationalDatabase' :: Maybe Text
caCertificateIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:RelationalDatabase' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupRetentionEnabled:RelationalDatabase' :: Maybe Bool
backupRetentionEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredBackupWindow:RelationalDatabase' :: Maybe Text
preferredBackupWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingMaintenanceActions:RelationalDatabase' :: Maybe [PendingMaintenanceAction]
pendingMaintenanceActions = Maybe [PendingMaintenanceAction]
forall a. Maybe a
Prelude.Nothing,
      $sel:supportCode:RelationalDatabase' :: Maybe Text
supportCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:secondaryAvailabilityZone:RelationalDatabase' :: Maybe Text
secondaryAvailabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingModifiedValues:RelationalDatabase' :: Maybe PendingModifiedRelationalDatabaseValues
pendingModifiedValues = Maybe PendingModifiedRelationalDatabaseValues
forall a. Maybe a
Prelude.Nothing,
      $sel:masterDatabaseName:RelationalDatabase' :: Maybe Text
masterDatabaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hardware:RelationalDatabase' :: Maybe RelationalDatabaseHardware
hardware = Maybe RelationalDatabaseHardware
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterApplyStatus:RelationalDatabase' :: Maybe Text
parameterApplyStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RelationalDatabase' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

-- | The database engine version (for example, @5.7.23@).
relationalDatabase_engineVersion :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_engineVersion :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_engineVersion = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:RelationalDatabase' :: RelationalDatabase -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:engineVersion:RelationalDatabase' :: Maybe Text
engineVersion = Maybe Text
a} :: RelationalDatabase)

-- | The bundle ID for the database. A bundle describes the performance
-- specifications for your database.
relationalDatabase_relationalDatabaseBundleId :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_relationalDatabaseBundleId :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_relationalDatabaseBundleId = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
relationalDatabaseBundleId :: Maybe Text
$sel:relationalDatabaseBundleId:RelationalDatabase' :: RelationalDatabase -> Maybe Text
relationalDatabaseBundleId} -> Maybe Text
relationalDatabaseBundleId) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:relationalDatabaseBundleId:RelationalDatabase' :: Maybe Text
relationalDatabaseBundleId = Maybe Text
a} :: RelationalDatabase)

-- | The master endpoint for the database.
relationalDatabase_masterEndpoint :: Lens.Lens' RelationalDatabase (Prelude.Maybe RelationalDatabaseEndpoint)
relationalDatabase_masterEndpoint :: (Maybe RelationalDatabaseEndpoint
 -> f (Maybe RelationalDatabaseEndpoint))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_masterEndpoint = (RelationalDatabase -> Maybe RelationalDatabaseEndpoint)
-> (RelationalDatabase
    -> Maybe RelationalDatabaseEndpoint -> RelationalDatabase)
-> Lens
     RelationalDatabase
     RelationalDatabase
     (Maybe RelationalDatabaseEndpoint)
     (Maybe RelationalDatabaseEndpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe RelationalDatabaseEndpoint
masterEndpoint :: Maybe RelationalDatabaseEndpoint
$sel:masterEndpoint:RelationalDatabase' :: RelationalDatabase -> Maybe RelationalDatabaseEndpoint
masterEndpoint} -> Maybe RelationalDatabaseEndpoint
masterEndpoint) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe RelationalDatabaseEndpoint
a -> RelationalDatabase
s {$sel:masterEndpoint:RelationalDatabase' :: Maybe RelationalDatabaseEndpoint
masterEndpoint = Maybe RelationalDatabaseEndpoint
a} :: RelationalDatabase)

-- | Describes the current state of the database.
relationalDatabase_state :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_state :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_state = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
state :: Maybe Text
$sel:state:RelationalDatabase' :: RelationalDatabase -> Maybe Text
state} -> Maybe Text
state) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:state:RelationalDatabase' :: Maybe Text
state = Maybe Text
a} :: RelationalDatabase)

-- | The Lightsail resource type for the database (for example,
-- @RelationalDatabase@).
relationalDatabase_resourceType :: Lens.Lens' RelationalDatabase (Prelude.Maybe ResourceType)
relationalDatabase_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_resourceType = (RelationalDatabase -> Maybe ResourceType)
-> (RelationalDatabase -> Maybe ResourceType -> RelationalDatabase)
-> Lens
     RelationalDatabase
     RelationalDatabase
     (Maybe ResourceType)
     (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:RelationalDatabase' :: RelationalDatabase -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe ResourceType
a -> RelationalDatabase
s {$sel:resourceType:RelationalDatabase' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: RelationalDatabase)

-- | A Boolean value indicating whether the database is publicly accessible.
relationalDatabase_publiclyAccessible :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Bool)
relationalDatabase_publiclyAccessible :: (Maybe Bool -> f (Maybe Bool))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_publiclyAccessible = (RelationalDatabase -> Maybe Bool)
-> (RelationalDatabase -> Maybe Bool -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Bool
publiclyAccessible :: Maybe Bool
$sel:publiclyAccessible:RelationalDatabase' :: RelationalDatabase -> Maybe Bool
publiclyAccessible} -> Maybe Bool
publiclyAccessible) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Bool
a -> RelationalDatabase
s {$sel:publiclyAccessible:RelationalDatabase' :: Maybe Bool
publiclyAccessible = Maybe Bool
a} :: RelationalDatabase)

-- | The master user name of the database.
relationalDatabase_masterUsername :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_masterUsername :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_masterUsername = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
masterUsername :: Maybe Text
$sel:masterUsername:RelationalDatabase' :: RelationalDatabase -> Maybe Text
masterUsername} -> Maybe Text
masterUsername) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:masterUsername:RelationalDatabase' :: Maybe Text
masterUsername = Maybe Text
a} :: RelationalDatabase)

-- | The Amazon Resource Name (ARN) of the database.
relationalDatabase_arn :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_arn :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_arn = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
arn :: Maybe Text
$sel:arn:RelationalDatabase' :: RelationalDatabase -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:arn:RelationalDatabase' :: Maybe Text
arn = Maybe Text
a} :: RelationalDatabase)

-- | The timestamp when the database was created. Formatted in Unix time.
relationalDatabase_createdAt :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.UTCTime)
relationalDatabase_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_createdAt = (RelationalDatabase -> Maybe POSIX)
-> (RelationalDatabase -> Maybe POSIX -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:RelationalDatabase' :: RelationalDatabase -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe POSIX
a -> RelationalDatabase
s {$sel:createdAt:RelationalDatabase' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: RelationalDatabase) ((Maybe POSIX -> f (Maybe POSIX))
 -> RelationalDatabase -> f RelationalDatabase)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RelationalDatabase
-> f RelationalDatabase
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Region name and Availability Zone where the database is located.
relationalDatabase_location :: Lens.Lens' RelationalDatabase (Prelude.Maybe ResourceLocation)
relationalDatabase_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_location = (RelationalDatabase -> Maybe ResourceLocation)
-> (RelationalDatabase
    -> Maybe ResourceLocation -> RelationalDatabase)
-> Lens
     RelationalDatabase
     RelationalDatabase
     (Maybe ResourceLocation)
     (Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:RelationalDatabase' :: RelationalDatabase -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe ResourceLocation
a -> RelationalDatabase
s {$sel:location:RelationalDatabase' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: RelationalDatabase)

-- | The database software (for example, @MySQL@).
relationalDatabase_engine :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_engine :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_engine = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
engine :: Maybe Text
$sel:engine:RelationalDatabase' :: RelationalDatabase -> Maybe Text
engine} -> Maybe Text
engine) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:engine:RelationalDatabase' :: Maybe Text
engine = Maybe Text
a} :: RelationalDatabase)

-- | The latest point in time to which the database can be restored.
-- Formatted in Unix time.
relationalDatabase_latestRestorableTime :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.UTCTime)
relationalDatabase_latestRestorableTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_latestRestorableTime = (RelationalDatabase -> Maybe POSIX)
-> (RelationalDatabase -> Maybe POSIX -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe POSIX
latestRestorableTime :: Maybe POSIX
$sel:latestRestorableTime:RelationalDatabase' :: RelationalDatabase -> Maybe POSIX
latestRestorableTime} -> Maybe POSIX
latestRestorableTime) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe POSIX
a -> RelationalDatabase
s {$sel:latestRestorableTime:RelationalDatabase' :: Maybe POSIX
latestRestorableTime = Maybe POSIX
a} :: RelationalDatabase) ((Maybe POSIX -> f (Maybe POSIX))
 -> RelationalDatabase -> f RelationalDatabase)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RelationalDatabase
-> f RelationalDatabase
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The weekly time range during which system maintenance can occur on the
-- database.
--
-- In the format @ddd:hh24:mi-ddd:hh24:mi@. For example,
-- @Tue:17:00-Tue:17:30@.
relationalDatabase_preferredMaintenanceWindow :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_preferredMaintenanceWindow = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:RelationalDatabase' :: RelationalDatabase -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:preferredMaintenanceWindow:RelationalDatabase' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: RelationalDatabase)

-- | The blueprint ID for the database. A blueprint describes the major
-- engine version of a database.
relationalDatabase_relationalDatabaseBlueprintId :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_relationalDatabaseBlueprintId :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_relationalDatabaseBlueprintId = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
relationalDatabaseBlueprintId :: Maybe Text
$sel:relationalDatabaseBlueprintId:RelationalDatabase' :: RelationalDatabase -> Maybe Text
relationalDatabaseBlueprintId} -> Maybe Text
relationalDatabaseBlueprintId) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:relationalDatabaseBlueprintId:RelationalDatabase' :: Maybe Text
relationalDatabaseBlueprintId = Maybe Text
a} :: RelationalDatabase)

-- | The certificate associated with the database.
relationalDatabase_caCertificateIdentifier :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_caCertificateIdentifier :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_caCertificateIdentifier = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
caCertificateIdentifier :: Maybe Text
$sel:caCertificateIdentifier:RelationalDatabase' :: RelationalDatabase -> Maybe Text
caCertificateIdentifier} -> Maybe Text
caCertificateIdentifier) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:caCertificateIdentifier:RelationalDatabase' :: Maybe Text
caCertificateIdentifier = Maybe Text
a} :: RelationalDatabase)

-- | The unique name of the database resource in Lightsail.
relationalDatabase_name :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_name :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_name = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
name :: Maybe Text
$sel:name:RelationalDatabase' :: RelationalDatabase -> Maybe Text
name} -> Maybe Text
name) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:name:RelationalDatabase' :: Maybe Text
name = Maybe Text
a} :: RelationalDatabase)

-- | A Boolean value indicating whether automated backup retention is enabled
-- for the database.
relationalDatabase_backupRetentionEnabled :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Bool)
relationalDatabase_backupRetentionEnabled :: (Maybe Bool -> f (Maybe Bool))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_backupRetentionEnabled = (RelationalDatabase -> Maybe Bool)
-> (RelationalDatabase -> Maybe Bool -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Bool
backupRetentionEnabled :: Maybe Bool
$sel:backupRetentionEnabled:RelationalDatabase' :: RelationalDatabase -> Maybe Bool
backupRetentionEnabled} -> Maybe Bool
backupRetentionEnabled) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Bool
a -> RelationalDatabase
s {$sel:backupRetentionEnabled:RelationalDatabase' :: Maybe Bool
backupRetentionEnabled = Maybe Bool
a} :: RelationalDatabase)

-- | The daily time range during which automated backups are created for the
-- database (for example, @16:00-16:30@).
relationalDatabase_preferredBackupWindow :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_preferredBackupWindow :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_preferredBackupWindow = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
preferredBackupWindow :: Maybe Text
$sel:preferredBackupWindow:RelationalDatabase' :: RelationalDatabase -> Maybe Text
preferredBackupWindow} -> Maybe Text
preferredBackupWindow) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:preferredBackupWindow:RelationalDatabase' :: Maybe Text
preferredBackupWindow = Maybe Text
a} :: RelationalDatabase)

-- | Describes the pending maintenance actions for the database.
relationalDatabase_pendingMaintenanceActions :: Lens.Lens' RelationalDatabase (Prelude.Maybe [PendingMaintenanceAction])
relationalDatabase_pendingMaintenanceActions :: (Maybe [PendingMaintenanceAction]
 -> f (Maybe [PendingMaintenanceAction]))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_pendingMaintenanceActions = (RelationalDatabase -> Maybe [PendingMaintenanceAction])
-> (RelationalDatabase
    -> Maybe [PendingMaintenanceAction] -> RelationalDatabase)
-> Lens
     RelationalDatabase
     RelationalDatabase
     (Maybe [PendingMaintenanceAction])
     (Maybe [PendingMaintenanceAction])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe [PendingMaintenanceAction]
pendingMaintenanceActions :: Maybe [PendingMaintenanceAction]
$sel:pendingMaintenanceActions:RelationalDatabase' :: RelationalDatabase -> Maybe [PendingMaintenanceAction]
pendingMaintenanceActions} -> Maybe [PendingMaintenanceAction]
pendingMaintenanceActions) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe [PendingMaintenanceAction]
a -> RelationalDatabase
s {$sel:pendingMaintenanceActions:RelationalDatabase' :: Maybe [PendingMaintenanceAction]
pendingMaintenanceActions = Maybe [PendingMaintenanceAction]
a} :: RelationalDatabase) ((Maybe [PendingMaintenanceAction]
  -> f (Maybe [PendingMaintenanceAction]))
 -> RelationalDatabase -> f RelationalDatabase)
-> ((Maybe [PendingMaintenanceAction]
     -> f (Maybe [PendingMaintenanceAction]))
    -> Maybe [PendingMaintenanceAction]
    -> f (Maybe [PendingMaintenanceAction]))
-> (Maybe [PendingMaintenanceAction]
    -> f (Maybe [PendingMaintenanceAction]))
-> RelationalDatabase
-> f RelationalDatabase
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PendingMaintenanceAction]
  [PendingMaintenanceAction]
  [PendingMaintenanceAction]
  [PendingMaintenanceAction]
-> Iso
     (Maybe [PendingMaintenanceAction])
     (Maybe [PendingMaintenanceAction])
     (Maybe [PendingMaintenanceAction])
     (Maybe [PendingMaintenanceAction])
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
  [PendingMaintenanceAction]
  [PendingMaintenanceAction]
  [PendingMaintenanceAction]
  [PendingMaintenanceAction]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The support code for the database. Include this code in your email to
-- support when you have questions about a database in Lightsail. This code
-- enables our support team to look up your Lightsail information more
-- easily.
relationalDatabase_supportCode :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_supportCode :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_supportCode = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
supportCode :: Maybe Text
$sel:supportCode:RelationalDatabase' :: RelationalDatabase -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:supportCode:RelationalDatabase' :: Maybe Text
supportCode = Maybe Text
a} :: RelationalDatabase)

-- | Describes the secondary Availability Zone of a high availability
-- database.
--
-- The secondary database is used for failover support of a high
-- availability database.
relationalDatabase_secondaryAvailabilityZone :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_secondaryAvailabilityZone :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_secondaryAvailabilityZone = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
secondaryAvailabilityZone :: Maybe Text
$sel:secondaryAvailabilityZone:RelationalDatabase' :: RelationalDatabase -> Maybe Text
secondaryAvailabilityZone} -> Maybe Text
secondaryAvailabilityZone) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:secondaryAvailabilityZone:RelationalDatabase' :: Maybe Text
secondaryAvailabilityZone = Maybe Text
a} :: RelationalDatabase)

-- | Describes pending database value modifications.
relationalDatabase_pendingModifiedValues :: Lens.Lens' RelationalDatabase (Prelude.Maybe PendingModifiedRelationalDatabaseValues)
relationalDatabase_pendingModifiedValues :: (Maybe PendingModifiedRelationalDatabaseValues
 -> f (Maybe PendingModifiedRelationalDatabaseValues))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_pendingModifiedValues = (RelationalDatabase
 -> Maybe PendingModifiedRelationalDatabaseValues)
-> (RelationalDatabase
    -> Maybe PendingModifiedRelationalDatabaseValues
    -> RelationalDatabase)
-> Lens
     RelationalDatabase
     RelationalDatabase
     (Maybe PendingModifiedRelationalDatabaseValues)
     (Maybe PendingModifiedRelationalDatabaseValues)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe PendingModifiedRelationalDatabaseValues
pendingModifiedValues :: Maybe PendingModifiedRelationalDatabaseValues
$sel:pendingModifiedValues:RelationalDatabase' :: RelationalDatabase -> Maybe PendingModifiedRelationalDatabaseValues
pendingModifiedValues} -> Maybe PendingModifiedRelationalDatabaseValues
pendingModifiedValues) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe PendingModifiedRelationalDatabaseValues
a -> RelationalDatabase
s {$sel:pendingModifiedValues:RelationalDatabase' :: Maybe PendingModifiedRelationalDatabaseValues
pendingModifiedValues = Maybe PendingModifiedRelationalDatabaseValues
a} :: RelationalDatabase)

-- | The name of the master database created when the Lightsail database
-- resource is created.
relationalDatabase_masterDatabaseName :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_masterDatabaseName :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_masterDatabaseName = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
masterDatabaseName :: Maybe Text
$sel:masterDatabaseName:RelationalDatabase' :: RelationalDatabase -> Maybe Text
masterDatabaseName} -> Maybe Text
masterDatabaseName) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:masterDatabaseName:RelationalDatabase' :: Maybe Text
masterDatabaseName = Maybe Text
a} :: RelationalDatabase)

-- | Describes the hardware of the database.
relationalDatabase_hardware :: Lens.Lens' RelationalDatabase (Prelude.Maybe RelationalDatabaseHardware)
relationalDatabase_hardware :: (Maybe RelationalDatabaseHardware
 -> f (Maybe RelationalDatabaseHardware))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_hardware = (RelationalDatabase -> Maybe RelationalDatabaseHardware)
-> (RelationalDatabase
    -> Maybe RelationalDatabaseHardware -> RelationalDatabase)
-> Lens
     RelationalDatabase
     RelationalDatabase
     (Maybe RelationalDatabaseHardware)
     (Maybe RelationalDatabaseHardware)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe RelationalDatabaseHardware
hardware :: Maybe RelationalDatabaseHardware
$sel:hardware:RelationalDatabase' :: RelationalDatabase -> Maybe RelationalDatabaseHardware
hardware} -> Maybe RelationalDatabaseHardware
hardware) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe RelationalDatabaseHardware
a -> RelationalDatabase
s {$sel:hardware:RelationalDatabase' :: Maybe RelationalDatabaseHardware
hardware = Maybe RelationalDatabaseHardware
a} :: RelationalDatabase)

-- | The status of parameter updates for the database.
relationalDatabase_parameterApplyStatus :: Lens.Lens' RelationalDatabase (Prelude.Maybe Prelude.Text)
relationalDatabase_parameterApplyStatus :: (Maybe Text -> f (Maybe Text))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_parameterApplyStatus = (RelationalDatabase -> Maybe Text)
-> (RelationalDatabase -> Maybe Text -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe Text
parameterApplyStatus :: Maybe Text
$sel:parameterApplyStatus:RelationalDatabase' :: RelationalDatabase -> Maybe Text
parameterApplyStatus} -> Maybe Text
parameterApplyStatus) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe Text
a -> RelationalDatabase
s {$sel:parameterApplyStatus:RelationalDatabase' :: Maybe Text
parameterApplyStatus = Maybe Text
a} :: RelationalDatabase)

-- | The tag keys and optional values for the resource. For more information
-- about tags in Lightsail, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-tags Amazon Lightsail Developer Guide>.
relationalDatabase_tags :: Lens.Lens' RelationalDatabase (Prelude.Maybe [Tag])
relationalDatabase_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> RelationalDatabase -> f RelationalDatabase
relationalDatabase_tags = (RelationalDatabase -> Maybe [Tag])
-> (RelationalDatabase -> Maybe [Tag] -> RelationalDatabase)
-> Lens
     RelationalDatabase RelationalDatabase (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RelationalDatabase' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RelationalDatabase' :: RelationalDatabase -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RelationalDatabase
s@RelationalDatabase' {} Maybe [Tag]
a -> RelationalDatabase
s {$sel:tags:RelationalDatabase' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RelationalDatabase) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> RelationalDatabase -> f RelationalDatabase)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> RelationalDatabase
-> f RelationalDatabase
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON RelationalDatabase where
  parseJSON :: Value -> Parser RelationalDatabase
parseJSON =
    String
-> (Object -> Parser RelationalDatabase)
-> Value
-> Parser RelationalDatabase
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RelationalDatabase"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe RelationalDatabaseEndpoint
-> Maybe Text
-> Maybe ResourceType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [PendingMaintenanceAction]
-> Maybe Text
-> Maybe Text
-> Maybe PendingModifiedRelationalDatabaseValues
-> Maybe Text
-> Maybe RelationalDatabaseHardware
-> Maybe Text
-> Maybe [Tag]
-> RelationalDatabase
RelationalDatabase'
            (Maybe Text
 -> Maybe Text
 -> Maybe RelationalDatabaseEndpoint
 -> Maybe Text
 -> Maybe ResourceType
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ResourceLocation
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe [PendingMaintenanceAction]
 -> Maybe Text
 -> Maybe Text
 -> Maybe PendingModifiedRelationalDatabaseValues
 -> Maybe Text
 -> Maybe RelationalDatabaseHardware
 -> Maybe Text
 -> Maybe [Tag]
 -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe RelationalDatabaseEndpoint
      -> Maybe Text
      -> Maybe ResourceType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"engineVersion")
            Parser
  (Maybe Text
   -> Maybe RelationalDatabaseEndpoint
   -> Maybe Text
   -> Maybe ResourceType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe RelationalDatabaseEndpoint
      -> Maybe Text
      -> Maybe ResourceType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"relationalDatabaseBundleId")
            Parser
  (Maybe RelationalDatabaseEndpoint
   -> Maybe Text
   -> Maybe ResourceType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe RelationalDatabaseEndpoint)
-> Parser
     (Maybe Text
      -> Maybe ResourceType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RelationalDatabaseEndpoint)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"masterEndpoint")
            Parser
  (Maybe Text
   -> Maybe ResourceType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe ResourceType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe ResourceType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe ResourceType)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"publiclyAccessible")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"masterUsername")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ResourceLocation
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe ResourceLocation
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe ResourceLocation)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"engine")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"latestRestorableTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"preferredMaintenanceWindow")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"relationalDatabaseBlueprintId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"caCertificateIdentifier")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"backupRetentionEnabled")
            Parser
  (Maybe Text
   -> Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe [PendingMaintenanceAction]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"preferredBackupWindow")
            Parser
  (Maybe [PendingMaintenanceAction]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe [PendingMaintenanceAction])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PendingMaintenanceAction]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pendingMaintenanceActions"
                            Parser (Maybe (Maybe [PendingMaintenanceAction]))
-> Maybe [PendingMaintenanceAction]
-> Parser (Maybe [PendingMaintenanceAction])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PendingMaintenanceAction]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supportCode")
            Parser
  (Maybe Text
   -> Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe PendingModifiedRelationalDatabaseValues
      -> Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"secondaryAvailabilityZone")
            Parser
  (Maybe PendingModifiedRelationalDatabaseValues
   -> Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe PendingModifiedRelationalDatabaseValues)
-> Parser
     (Maybe Text
      -> Maybe RelationalDatabaseHardware
      -> Maybe Text
      -> Maybe [Tag]
      -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe PendingModifiedRelationalDatabaseValues)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pendingModifiedValues")
            Parser
  (Maybe Text
   -> Maybe RelationalDatabaseHardware
   -> Maybe Text
   -> Maybe [Tag]
   -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser
     (Maybe RelationalDatabaseHardware
      -> Maybe Text -> Maybe [Tag] -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"masterDatabaseName")
            Parser
  (Maybe RelationalDatabaseHardware
   -> Maybe Text -> Maybe [Tag] -> RelationalDatabase)
-> Parser (Maybe RelationalDatabaseHardware)
-> Parser (Maybe Text -> Maybe [Tag] -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RelationalDatabaseHardware)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hardware")
            Parser (Maybe Text -> Maybe [Tag] -> RelationalDatabase)
-> Parser (Maybe Text)
-> Parser (Maybe [Tag] -> RelationalDatabase)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"parameterApplyStatus")
            Parser (Maybe [Tag] -> RelationalDatabase)
-> Parser (Maybe [Tag]) -> Parser RelationalDatabase
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable RelationalDatabase

instance Prelude.NFData RelationalDatabase