{-# 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.RDS.Types.ClusterPendingModifiedValues
-- 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.RDS.Types.ClusterPendingModifiedValues where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.PendingCloudwatchLogsExports

-- | This data type is used as a response element in the @ModifyDBCluster@
-- operation and contains changes that will be applied during the next
-- maintenance window.
--
-- /See:/ 'newClusterPendingModifiedValues' smart constructor.
data ClusterPendingModifiedValues = ClusterPendingModifiedValues'
  { -- | The database engine version.
    ClusterPendingModifiedValues -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The DBClusterIdentifier value for the DB cluster.
    ClusterPendingModifiedValues -> Maybe Text
dbClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The master credentials for the DB cluster.
    ClusterPendingModifiedValues -> Maybe Text
masterUserPassword :: Prelude.Maybe Prelude.Text,
    -- | A value that indicates whether mapping of Amazon Web Services Identity
    -- and Access Management (IAM) accounts to database accounts is enabled.
    ClusterPendingModifiedValues -> Maybe Bool
iAMDatabaseAuthenticationEnabled :: Prelude.Maybe Prelude.Bool,
    ClusterPendingModifiedValues -> Maybe PendingCloudwatchLogsExports
pendingCloudwatchLogsExports :: Prelude.Maybe PendingCloudwatchLogsExports
  }
  deriving (ClusterPendingModifiedValues
-> ClusterPendingModifiedValues -> Bool
(ClusterPendingModifiedValues
 -> ClusterPendingModifiedValues -> Bool)
-> (ClusterPendingModifiedValues
    -> ClusterPendingModifiedValues -> Bool)
-> Eq ClusterPendingModifiedValues
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterPendingModifiedValues
-> ClusterPendingModifiedValues -> Bool
$c/= :: ClusterPendingModifiedValues
-> ClusterPendingModifiedValues -> Bool
== :: ClusterPendingModifiedValues
-> ClusterPendingModifiedValues -> Bool
$c== :: ClusterPendingModifiedValues
-> ClusterPendingModifiedValues -> Bool
Prelude.Eq, ReadPrec [ClusterPendingModifiedValues]
ReadPrec ClusterPendingModifiedValues
Int -> ReadS ClusterPendingModifiedValues
ReadS [ClusterPendingModifiedValues]
(Int -> ReadS ClusterPendingModifiedValues)
-> ReadS [ClusterPendingModifiedValues]
-> ReadPrec ClusterPendingModifiedValues
-> ReadPrec [ClusterPendingModifiedValues]
-> Read ClusterPendingModifiedValues
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterPendingModifiedValues]
$creadListPrec :: ReadPrec [ClusterPendingModifiedValues]
readPrec :: ReadPrec ClusterPendingModifiedValues
$creadPrec :: ReadPrec ClusterPendingModifiedValues
readList :: ReadS [ClusterPendingModifiedValues]
$creadList :: ReadS [ClusterPendingModifiedValues]
readsPrec :: Int -> ReadS ClusterPendingModifiedValues
$creadsPrec :: Int -> ReadS ClusterPendingModifiedValues
Prelude.Read, Int -> ClusterPendingModifiedValues -> ShowS
[ClusterPendingModifiedValues] -> ShowS
ClusterPendingModifiedValues -> String
(Int -> ClusterPendingModifiedValues -> ShowS)
-> (ClusterPendingModifiedValues -> String)
-> ([ClusterPendingModifiedValues] -> ShowS)
-> Show ClusterPendingModifiedValues
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterPendingModifiedValues] -> ShowS
$cshowList :: [ClusterPendingModifiedValues] -> ShowS
show :: ClusterPendingModifiedValues -> String
$cshow :: ClusterPendingModifiedValues -> String
showsPrec :: Int -> ClusterPendingModifiedValues -> ShowS
$cshowsPrec :: Int -> ClusterPendingModifiedValues -> ShowS
Prelude.Show, (forall x.
 ClusterPendingModifiedValues -> Rep ClusterPendingModifiedValues x)
-> (forall x.
    Rep ClusterPendingModifiedValues x -> ClusterPendingModifiedValues)
-> Generic ClusterPendingModifiedValues
forall x.
Rep ClusterPendingModifiedValues x -> ClusterPendingModifiedValues
forall x.
ClusterPendingModifiedValues -> Rep ClusterPendingModifiedValues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ClusterPendingModifiedValues x -> ClusterPendingModifiedValues
$cfrom :: forall x.
ClusterPendingModifiedValues -> Rep ClusterPendingModifiedValues x
Prelude.Generic)

-- |
-- Create a value of 'ClusterPendingModifiedValues' 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', 'clusterPendingModifiedValues_engineVersion' - The database engine version.
--
-- 'dbClusterIdentifier', 'clusterPendingModifiedValues_dbClusterIdentifier' - The DBClusterIdentifier value for the DB cluster.
--
-- 'masterUserPassword', 'clusterPendingModifiedValues_masterUserPassword' - The master credentials for the DB cluster.
--
-- 'iAMDatabaseAuthenticationEnabled', 'clusterPendingModifiedValues_iAMDatabaseAuthenticationEnabled' - A value that indicates whether mapping of Amazon Web Services Identity
-- and Access Management (IAM) accounts to database accounts is enabled.
--
-- 'pendingCloudwatchLogsExports', 'clusterPendingModifiedValues_pendingCloudwatchLogsExports' - Undocumented member.
newClusterPendingModifiedValues ::
  ClusterPendingModifiedValues
newClusterPendingModifiedValues :: ClusterPendingModifiedValues
newClusterPendingModifiedValues =
  ClusterPendingModifiedValues' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe PendingCloudwatchLogsExports
-> ClusterPendingModifiedValues
ClusterPendingModifiedValues'
    { $sel:engineVersion:ClusterPendingModifiedValues' :: Maybe Text
engineVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterIdentifier:ClusterPendingModifiedValues' :: Maybe Text
dbClusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:masterUserPassword:ClusterPendingModifiedValues' :: Maybe Text
masterUserPassword = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iAMDatabaseAuthenticationEnabled:ClusterPendingModifiedValues' :: Maybe Bool
iAMDatabaseAuthenticationEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingCloudwatchLogsExports:ClusterPendingModifiedValues' :: Maybe PendingCloudwatchLogsExports
pendingCloudwatchLogsExports =
        Maybe PendingCloudwatchLogsExports
forall a. Maybe a
Prelude.Nothing
    }

-- | The database engine version.
clusterPendingModifiedValues_engineVersion :: Lens.Lens' ClusterPendingModifiedValues (Prelude.Maybe Prelude.Text)
clusterPendingModifiedValues_engineVersion :: (Maybe Text -> f (Maybe Text))
-> ClusterPendingModifiedValues -> f ClusterPendingModifiedValues
clusterPendingModifiedValues_engineVersion = (ClusterPendingModifiedValues -> Maybe Text)
-> (ClusterPendingModifiedValues
    -> Maybe Text -> ClusterPendingModifiedValues)
-> Lens
     ClusterPendingModifiedValues
     ClusterPendingModifiedValues
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterPendingModifiedValues' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:ClusterPendingModifiedValues' :: ClusterPendingModifiedValues -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: ClusterPendingModifiedValues
s@ClusterPendingModifiedValues' {} Maybe Text
a -> ClusterPendingModifiedValues
s {$sel:engineVersion:ClusterPendingModifiedValues' :: Maybe Text
engineVersion = Maybe Text
a} :: ClusterPendingModifiedValues)

-- | The DBClusterIdentifier value for the DB cluster.
clusterPendingModifiedValues_dbClusterIdentifier :: Lens.Lens' ClusterPendingModifiedValues (Prelude.Maybe Prelude.Text)
clusterPendingModifiedValues_dbClusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> ClusterPendingModifiedValues -> f ClusterPendingModifiedValues
clusterPendingModifiedValues_dbClusterIdentifier = (ClusterPendingModifiedValues -> Maybe Text)
-> (ClusterPendingModifiedValues
    -> Maybe Text -> ClusterPendingModifiedValues)
-> Lens
     ClusterPendingModifiedValues
     ClusterPendingModifiedValues
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterPendingModifiedValues' {Maybe Text
dbClusterIdentifier :: Maybe Text
$sel:dbClusterIdentifier:ClusterPendingModifiedValues' :: ClusterPendingModifiedValues -> Maybe Text
dbClusterIdentifier} -> Maybe Text
dbClusterIdentifier) (\s :: ClusterPendingModifiedValues
s@ClusterPendingModifiedValues' {} Maybe Text
a -> ClusterPendingModifiedValues
s {$sel:dbClusterIdentifier:ClusterPendingModifiedValues' :: Maybe Text
dbClusterIdentifier = Maybe Text
a} :: ClusterPendingModifiedValues)

-- | The master credentials for the DB cluster.
clusterPendingModifiedValues_masterUserPassword :: Lens.Lens' ClusterPendingModifiedValues (Prelude.Maybe Prelude.Text)
clusterPendingModifiedValues_masterUserPassword :: (Maybe Text -> f (Maybe Text))
-> ClusterPendingModifiedValues -> f ClusterPendingModifiedValues
clusterPendingModifiedValues_masterUserPassword = (ClusterPendingModifiedValues -> Maybe Text)
-> (ClusterPendingModifiedValues
    -> Maybe Text -> ClusterPendingModifiedValues)
-> Lens
     ClusterPendingModifiedValues
     ClusterPendingModifiedValues
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterPendingModifiedValues' {Maybe Text
masterUserPassword :: Maybe Text
$sel:masterUserPassword:ClusterPendingModifiedValues' :: ClusterPendingModifiedValues -> Maybe Text
masterUserPassword} -> Maybe Text
masterUserPassword) (\s :: ClusterPendingModifiedValues
s@ClusterPendingModifiedValues' {} Maybe Text
a -> ClusterPendingModifiedValues
s {$sel:masterUserPassword:ClusterPendingModifiedValues' :: Maybe Text
masterUserPassword = Maybe Text
a} :: ClusterPendingModifiedValues)

-- | A value that indicates whether mapping of Amazon Web Services Identity
-- and Access Management (IAM) accounts to database accounts is enabled.
clusterPendingModifiedValues_iAMDatabaseAuthenticationEnabled :: Lens.Lens' ClusterPendingModifiedValues (Prelude.Maybe Prelude.Bool)
clusterPendingModifiedValues_iAMDatabaseAuthenticationEnabled :: (Maybe Bool -> f (Maybe Bool))
-> ClusterPendingModifiedValues -> f ClusterPendingModifiedValues
clusterPendingModifiedValues_iAMDatabaseAuthenticationEnabled = (ClusterPendingModifiedValues -> Maybe Bool)
-> (ClusterPendingModifiedValues
    -> Maybe Bool -> ClusterPendingModifiedValues)
-> Lens
     ClusterPendingModifiedValues
     ClusterPendingModifiedValues
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterPendingModifiedValues' {Maybe Bool
iAMDatabaseAuthenticationEnabled :: Maybe Bool
$sel:iAMDatabaseAuthenticationEnabled:ClusterPendingModifiedValues' :: ClusterPendingModifiedValues -> Maybe Bool
iAMDatabaseAuthenticationEnabled} -> Maybe Bool
iAMDatabaseAuthenticationEnabled) (\s :: ClusterPendingModifiedValues
s@ClusterPendingModifiedValues' {} Maybe Bool
a -> ClusterPendingModifiedValues
s {$sel:iAMDatabaseAuthenticationEnabled:ClusterPendingModifiedValues' :: Maybe Bool
iAMDatabaseAuthenticationEnabled = Maybe Bool
a} :: ClusterPendingModifiedValues)

-- | Undocumented member.
clusterPendingModifiedValues_pendingCloudwatchLogsExports :: Lens.Lens' ClusterPendingModifiedValues (Prelude.Maybe PendingCloudwatchLogsExports)
clusterPendingModifiedValues_pendingCloudwatchLogsExports :: (Maybe PendingCloudwatchLogsExports
 -> f (Maybe PendingCloudwatchLogsExports))
-> ClusterPendingModifiedValues -> f ClusterPendingModifiedValues
clusterPendingModifiedValues_pendingCloudwatchLogsExports = (ClusterPendingModifiedValues
 -> Maybe PendingCloudwatchLogsExports)
-> (ClusterPendingModifiedValues
    -> Maybe PendingCloudwatchLogsExports
    -> ClusterPendingModifiedValues)
-> Lens
     ClusterPendingModifiedValues
     ClusterPendingModifiedValues
     (Maybe PendingCloudwatchLogsExports)
     (Maybe PendingCloudwatchLogsExports)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterPendingModifiedValues' {Maybe PendingCloudwatchLogsExports
pendingCloudwatchLogsExports :: Maybe PendingCloudwatchLogsExports
$sel:pendingCloudwatchLogsExports:ClusterPendingModifiedValues' :: ClusterPendingModifiedValues -> Maybe PendingCloudwatchLogsExports
pendingCloudwatchLogsExports} -> Maybe PendingCloudwatchLogsExports
pendingCloudwatchLogsExports) (\s :: ClusterPendingModifiedValues
s@ClusterPendingModifiedValues' {} Maybe PendingCloudwatchLogsExports
a -> ClusterPendingModifiedValues
s {$sel:pendingCloudwatchLogsExports:ClusterPendingModifiedValues' :: Maybe PendingCloudwatchLogsExports
pendingCloudwatchLogsExports = Maybe PendingCloudwatchLogsExports
a} :: ClusterPendingModifiedValues)

instance Core.FromXML ClusterPendingModifiedValues where
  parseXML :: [Node] -> Either String ClusterPendingModifiedValues
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe PendingCloudwatchLogsExports
-> ClusterPendingModifiedValues
ClusterPendingModifiedValues'
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe PendingCloudwatchLogsExports
 -> ClusterPendingModifiedValues)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe PendingCloudwatchLogsExports
      -> ClusterPendingModifiedValues)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EngineVersion")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe PendingCloudwatchLogsExports
   -> ClusterPendingModifiedValues)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe PendingCloudwatchLogsExports
      -> ClusterPendingModifiedValues)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DBClusterIdentifier")
      Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe PendingCloudwatchLogsExports
   -> ClusterPendingModifiedValues)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe PendingCloudwatchLogsExports
      -> ClusterPendingModifiedValues)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MasterUserPassword")
      Either
  String
  (Maybe Bool
   -> Maybe PendingCloudwatchLogsExports
   -> ClusterPendingModifiedValues)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe PendingCloudwatchLogsExports
      -> ClusterPendingModifiedValues)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IAMDatabaseAuthenticationEnabled")
      Either
  String
  (Maybe PendingCloudwatchLogsExports
   -> ClusterPendingModifiedValues)
-> Either String (Maybe PendingCloudwatchLogsExports)
-> Either String ClusterPendingModifiedValues
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node]
-> Text -> Either String (Maybe PendingCloudwatchLogsExports)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PendingCloudwatchLogsExports")

instance
  Prelude.Hashable
    ClusterPendingModifiedValues

instance Prelude.NFData ClusterPendingModifiedValues