{-# 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.DocumentDB.Types.DBEngineVersion
-- 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.DocumentDB.Types.DBEngineVersion where

import qualified Amazonka.Core as Core
import Amazonka.DocumentDB.Types.UpgradeTarget
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Detailed information about an engine version.
--
-- /See:/ 'newDBEngineVersion' smart constructor.
data DBEngineVersion = DBEngineVersion'
  { -- | The version number of the database engine.
    DBEngineVersion -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The description of the database engine version.
    DBEngineVersion -> Maybe Text
dbEngineVersionDescription :: Prelude.Maybe Prelude.Text,
    -- | The name of the database engine.
    DBEngineVersion -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | The name of the parameter group family for the database engine.
    DBEngineVersion -> Maybe Text
dbParameterGroupFamily :: Prelude.Maybe Prelude.Text,
    -- | The description of the database engine.
    DBEngineVersion -> Maybe Text
dbEngineDescription :: Prelude.Maybe Prelude.Text,
    -- | A list of engine versions that this database engine version can be
    -- upgraded to.
    DBEngineVersion -> Maybe [UpgradeTarget]
validUpgradeTarget :: Prelude.Maybe [UpgradeTarget],
    -- | A value that indicates whether the engine version supports exporting the
    -- log types specified by @ExportableLogTypes@ to CloudWatch Logs.
    DBEngineVersion -> Maybe Bool
supportsLogExportsToCloudwatchLogs :: Prelude.Maybe Prelude.Bool,
    -- | The types of logs that the database engine has available for export to
    -- Amazon CloudWatch Logs.
    DBEngineVersion -> Maybe [Text]
exportableLogTypes :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DBEngineVersion -> DBEngineVersion -> Bool
(DBEngineVersion -> DBEngineVersion -> Bool)
-> (DBEngineVersion -> DBEngineVersion -> Bool)
-> Eq DBEngineVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBEngineVersion -> DBEngineVersion -> Bool
$c/= :: DBEngineVersion -> DBEngineVersion -> Bool
== :: DBEngineVersion -> DBEngineVersion -> Bool
$c== :: DBEngineVersion -> DBEngineVersion -> Bool
Prelude.Eq, ReadPrec [DBEngineVersion]
ReadPrec DBEngineVersion
Int -> ReadS DBEngineVersion
ReadS [DBEngineVersion]
(Int -> ReadS DBEngineVersion)
-> ReadS [DBEngineVersion]
-> ReadPrec DBEngineVersion
-> ReadPrec [DBEngineVersion]
-> Read DBEngineVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBEngineVersion]
$creadListPrec :: ReadPrec [DBEngineVersion]
readPrec :: ReadPrec DBEngineVersion
$creadPrec :: ReadPrec DBEngineVersion
readList :: ReadS [DBEngineVersion]
$creadList :: ReadS [DBEngineVersion]
readsPrec :: Int -> ReadS DBEngineVersion
$creadsPrec :: Int -> ReadS DBEngineVersion
Prelude.Read, Int -> DBEngineVersion -> ShowS
[DBEngineVersion] -> ShowS
DBEngineVersion -> String
(Int -> DBEngineVersion -> ShowS)
-> (DBEngineVersion -> String)
-> ([DBEngineVersion] -> ShowS)
-> Show DBEngineVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBEngineVersion] -> ShowS
$cshowList :: [DBEngineVersion] -> ShowS
show :: DBEngineVersion -> String
$cshow :: DBEngineVersion -> String
showsPrec :: Int -> DBEngineVersion -> ShowS
$cshowsPrec :: Int -> DBEngineVersion -> ShowS
Prelude.Show, (forall x. DBEngineVersion -> Rep DBEngineVersion x)
-> (forall x. Rep DBEngineVersion x -> DBEngineVersion)
-> Generic DBEngineVersion
forall x. Rep DBEngineVersion x -> DBEngineVersion
forall x. DBEngineVersion -> Rep DBEngineVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBEngineVersion x -> DBEngineVersion
$cfrom :: forall x. DBEngineVersion -> Rep DBEngineVersion x
Prelude.Generic)

-- |
-- Create a value of 'DBEngineVersion' 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', 'dbEngineVersion_engineVersion' - The version number of the database engine.
--
-- 'dbEngineVersionDescription', 'dbEngineVersion_dbEngineVersionDescription' - The description of the database engine version.
--
-- 'engine', 'dbEngineVersion_engine' - The name of the database engine.
--
-- 'dbParameterGroupFamily', 'dbEngineVersion_dbParameterGroupFamily' - The name of the parameter group family for the database engine.
--
-- 'dbEngineDescription', 'dbEngineVersion_dbEngineDescription' - The description of the database engine.
--
-- 'validUpgradeTarget', 'dbEngineVersion_validUpgradeTarget' - A list of engine versions that this database engine version can be
-- upgraded to.
--
-- 'supportsLogExportsToCloudwatchLogs', 'dbEngineVersion_supportsLogExportsToCloudwatchLogs' - A value that indicates whether the engine version supports exporting the
-- log types specified by @ExportableLogTypes@ to CloudWatch Logs.
--
-- 'exportableLogTypes', 'dbEngineVersion_exportableLogTypes' - The types of logs that the database engine has available for export to
-- Amazon CloudWatch Logs.
newDBEngineVersion ::
  DBEngineVersion
newDBEngineVersion :: DBEngineVersion
newDBEngineVersion =
  DBEngineVersion' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [UpgradeTarget]
-> Maybe Bool
-> Maybe [Text]
-> DBEngineVersion
DBEngineVersion'
    { $sel:engineVersion:DBEngineVersion' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbEngineVersionDescription:DBEngineVersion' :: Maybe Text
dbEngineVersionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:DBEngineVersion' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbParameterGroupFamily:DBEngineVersion' :: Maybe Text
dbParameterGroupFamily = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbEngineDescription:DBEngineVersion' :: Maybe Text
dbEngineDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:validUpgradeTarget:DBEngineVersion' :: Maybe [UpgradeTarget]
validUpgradeTarget = Maybe [UpgradeTarget]
forall a. Maybe a
Prelude.Nothing,
      $sel:supportsLogExportsToCloudwatchLogs:DBEngineVersion' :: Maybe Bool
supportsLogExportsToCloudwatchLogs = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:exportableLogTypes:DBEngineVersion' :: Maybe [Text]
exportableLogTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The description of the database engine version.
dbEngineVersion_dbEngineVersionDescription :: Lens.Lens' DBEngineVersion (Prelude.Maybe Prelude.Text)
dbEngineVersion_dbEngineVersionDescription :: (Maybe Text -> f (Maybe Text))
-> DBEngineVersion -> f DBEngineVersion
dbEngineVersion_dbEngineVersionDescription = (DBEngineVersion -> Maybe Text)
-> (DBEngineVersion -> Maybe Text -> DBEngineVersion)
-> Lens DBEngineVersion DBEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBEngineVersion' {Maybe Text
dbEngineVersionDescription :: Maybe Text
$sel:dbEngineVersionDescription:DBEngineVersion' :: DBEngineVersion -> Maybe Text
dbEngineVersionDescription} -> Maybe Text
dbEngineVersionDescription) (\s :: DBEngineVersion
s@DBEngineVersion' {} Maybe Text
a -> DBEngineVersion
s {$sel:dbEngineVersionDescription:DBEngineVersion' :: Maybe Text
dbEngineVersionDescription = Maybe Text
a} :: DBEngineVersion)

-- | The name of the database engine.
dbEngineVersion_engine :: Lens.Lens' DBEngineVersion (Prelude.Maybe Prelude.Text)
dbEngineVersion_engine :: (Maybe Text -> f (Maybe Text))
-> DBEngineVersion -> f DBEngineVersion
dbEngineVersion_engine = (DBEngineVersion -> Maybe Text)
-> (DBEngineVersion -> Maybe Text -> DBEngineVersion)
-> Lens DBEngineVersion DBEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBEngineVersion' {Maybe Text
engine :: Maybe Text
$sel:engine:DBEngineVersion' :: DBEngineVersion -> Maybe Text
engine} -> Maybe Text
engine) (\s :: DBEngineVersion
s@DBEngineVersion' {} Maybe Text
a -> DBEngineVersion
s {$sel:engine:DBEngineVersion' :: Maybe Text
engine = Maybe Text
a} :: DBEngineVersion)

-- | The name of the parameter group family for the database engine.
dbEngineVersion_dbParameterGroupFamily :: Lens.Lens' DBEngineVersion (Prelude.Maybe Prelude.Text)
dbEngineVersion_dbParameterGroupFamily :: (Maybe Text -> f (Maybe Text))
-> DBEngineVersion -> f DBEngineVersion
dbEngineVersion_dbParameterGroupFamily = (DBEngineVersion -> Maybe Text)
-> (DBEngineVersion -> Maybe Text -> DBEngineVersion)
-> Lens DBEngineVersion DBEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBEngineVersion' {Maybe Text
dbParameterGroupFamily :: Maybe Text
$sel:dbParameterGroupFamily:DBEngineVersion' :: DBEngineVersion -> Maybe Text
dbParameterGroupFamily} -> Maybe Text
dbParameterGroupFamily) (\s :: DBEngineVersion
s@DBEngineVersion' {} Maybe Text
a -> DBEngineVersion
s {$sel:dbParameterGroupFamily:DBEngineVersion' :: Maybe Text
dbParameterGroupFamily = Maybe Text
a} :: DBEngineVersion)

-- | The description of the database engine.
dbEngineVersion_dbEngineDescription :: Lens.Lens' DBEngineVersion (Prelude.Maybe Prelude.Text)
dbEngineVersion_dbEngineDescription :: (Maybe Text -> f (Maybe Text))
-> DBEngineVersion -> f DBEngineVersion
dbEngineVersion_dbEngineDescription = (DBEngineVersion -> Maybe Text)
-> (DBEngineVersion -> Maybe Text -> DBEngineVersion)
-> Lens DBEngineVersion DBEngineVersion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBEngineVersion' {Maybe Text
dbEngineDescription :: Maybe Text
$sel:dbEngineDescription:DBEngineVersion' :: DBEngineVersion -> Maybe Text
dbEngineDescription} -> Maybe Text
dbEngineDescription) (\s :: DBEngineVersion
s@DBEngineVersion' {} Maybe Text
a -> DBEngineVersion
s {$sel:dbEngineDescription:DBEngineVersion' :: Maybe Text
dbEngineDescription = Maybe Text
a} :: DBEngineVersion)

-- | A list of engine versions that this database engine version can be
-- upgraded to.
dbEngineVersion_validUpgradeTarget :: Lens.Lens' DBEngineVersion (Prelude.Maybe [UpgradeTarget])
dbEngineVersion_validUpgradeTarget :: (Maybe [UpgradeTarget] -> f (Maybe [UpgradeTarget]))
-> DBEngineVersion -> f DBEngineVersion
dbEngineVersion_validUpgradeTarget = (DBEngineVersion -> Maybe [UpgradeTarget])
-> (DBEngineVersion -> Maybe [UpgradeTarget] -> DBEngineVersion)
-> Lens
     DBEngineVersion
     DBEngineVersion
     (Maybe [UpgradeTarget])
     (Maybe [UpgradeTarget])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBEngineVersion' {Maybe [UpgradeTarget]
validUpgradeTarget :: Maybe [UpgradeTarget]
$sel:validUpgradeTarget:DBEngineVersion' :: DBEngineVersion -> Maybe [UpgradeTarget]
validUpgradeTarget} -> Maybe [UpgradeTarget]
validUpgradeTarget) (\s :: DBEngineVersion
s@DBEngineVersion' {} Maybe [UpgradeTarget]
a -> DBEngineVersion
s {$sel:validUpgradeTarget:DBEngineVersion' :: Maybe [UpgradeTarget]
validUpgradeTarget = Maybe [UpgradeTarget]
a} :: DBEngineVersion) ((Maybe [UpgradeTarget] -> f (Maybe [UpgradeTarget]))
 -> DBEngineVersion -> f DBEngineVersion)
-> ((Maybe [UpgradeTarget] -> f (Maybe [UpgradeTarget]))
    -> Maybe [UpgradeTarget] -> f (Maybe [UpgradeTarget]))
-> (Maybe [UpgradeTarget] -> f (Maybe [UpgradeTarget]))
-> DBEngineVersion
-> f DBEngineVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [UpgradeTarget] [UpgradeTarget] [UpgradeTarget] [UpgradeTarget]
-> Iso
     (Maybe [UpgradeTarget])
     (Maybe [UpgradeTarget])
     (Maybe [UpgradeTarget])
     (Maybe [UpgradeTarget])
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
  [UpgradeTarget] [UpgradeTarget] [UpgradeTarget] [UpgradeTarget]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A value that indicates whether the engine version supports exporting the
-- log types specified by @ExportableLogTypes@ to CloudWatch Logs.
dbEngineVersion_supportsLogExportsToCloudwatchLogs :: Lens.Lens' DBEngineVersion (Prelude.Maybe Prelude.Bool)
dbEngineVersion_supportsLogExportsToCloudwatchLogs :: (Maybe Bool -> f (Maybe Bool))
-> DBEngineVersion -> f DBEngineVersion
dbEngineVersion_supportsLogExportsToCloudwatchLogs = (DBEngineVersion -> Maybe Bool)
-> (DBEngineVersion -> Maybe Bool -> DBEngineVersion)
-> Lens DBEngineVersion DBEngineVersion (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBEngineVersion' {Maybe Bool
supportsLogExportsToCloudwatchLogs :: Maybe Bool
$sel:supportsLogExportsToCloudwatchLogs:DBEngineVersion' :: DBEngineVersion -> Maybe Bool
supportsLogExportsToCloudwatchLogs} -> Maybe Bool
supportsLogExportsToCloudwatchLogs) (\s :: DBEngineVersion
s@DBEngineVersion' {} Maybe Bool
a -> DBEngineVersion
s {$sel:supportsLogExportsToCloudwatchLogs:DBEngineVersion' :: Maybe Bool
supportsLogExportsToCloudwatchLogs = Maybe Bool
a} :: DBEngineVersion)

-- | The types of logs that the database engine has available for export to
-- Amazon CloudWatch Logs.
dbEngineVersion_exportableLogTypes :: Lens.Lens' DBEngineVersion (Prelude.Maybe [Prelude.Text])
dbEngineVersion_exportableLogTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> DBEngineVersion -> f DBEngineVersion
dbEngineVersion_exportableLogTypes = (DBEngineVersion -> Maybe [Text])
-> (DBEngineVersion -> Maybe [Text] -> DBEngineVersion)
-> Lens
     DBEngineVersion DBEngineVersion (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBEngineVersion' {Maybe [Text]
exportableLogTypes :: Maybe [Text]
$sel:exportableLogTypes:DBEngineVersion' :: DBEngineVersion -> Maybe [Text]
exportableLogTypes} -> Maybe [Text]
exportableLogTypes) (\s :: DBEngineVersion
s@DBEngineVersion' {} Maybe [Text]
a -> DBEngineVersion
s {$sel:exportableLogTypes:DBEngineVersion' :: Maybe [Text]
exportableLogTypes = Maybe [Text]
a} :: DBEngineVersion) ((Maybe [Text] -> f (Maybe [Text]))
 -> DBEngineVersion -> f DBEngineVersion)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DBEngineVersion
-> f DBEngineVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromXML DBEngineVersion where
  parseXML :: [Node] -> Either String DBEngineVersion
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [UpgradeTarget]
-> Maybe Bool
-> Maybe [Text]
-> DBEngineVersion
DBEngineVersion'
      (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [UpgradeTarget]
 -> Maybe Bool
 -> Maybe [Text]
 -> DBEngineVersion)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [UpgradeTarget]
      -> Maybe Bool
      -> Maybe [Text]
      -> DBEngineVersion)
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 Text
   -> Maybe Text
   -> Maybe [UpgradeTarget]
   -> Maybe Bool
   -> Maybe [Text]
   -> DBEngineVersion)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [UpgradeTarget]
      -> Maybe Bool
      -> Maybe [Text]
      -> DBEngineVersion)
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
"DBEngineVersionDescription")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [UpgradeTarget]
   -> Maybe Bool
   -> Maybe [Text]
   -> DBEngineVersion)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [UpgradeTarget]
      -> Maybe Bool
      -> Maybe [Text]
      -> DBEngineVersion)
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
"Engine")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [UpgradeTarget]
   -> Maybe Bool
   -> Maybe [Text]
   -> DBEngineVersion)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [UpgradeTarget]
      -> Maybe Bool
      -> Maybe [Text]
      -> DBEngineVersion)
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
"DBParameterGroupFamily")
      Either
  String
  (Maybe Text
   -> Maybe [UpgradeTarget]
   -> Maybe Bool
   -> Maybe [Text]
   -> DBEngineVersion)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [UpgradeTarget]
      -> Maybe Bool -> Maybe [Text] -> DBEngineVersion)
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
"DBEngineDescription")
      Either
  String
  (Maybe [UpgradeTarget]
   -> Maybe Bool -> Maybe [Text] -> DBEngineVersion)
-> Either String (Maybe [UpgradeTarget])
-> Either String (Maybe Bool -> Maybe [Text] -> DBEngineVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ValidUpgradeTarget"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [UpgradeTarget]))
-> Either String (Maybe [UpgradeTarget])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [UpgradeTarget])
-> [Node] -> Either String (Maybe [UpgradeTarget])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [UpgradeTarget]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"UpgradeTarget")
                  )
      Either String (Maybe Bool -> Maybe [Text] -> DBEngineVersion)
-> Either String (Maybe Bool)
-> Either String (Maybe [Text] -> DBEngineVersion)
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
"SupportsLogExportsToCloudwatchLogs")
      Either String (Maybe [Text] -> DBEngineVersion)
-> Either String (Maybe [Text]) -> Either String DBEngineVersion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ExportableLogTypes"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )

instance Prelude.Hashable DBEngineVersion

instance Prelude.NFData DBEngineVersion