{-# 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.Option
-- 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.Option where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.DBSecurityGroupMembership
import Amazonka.RDS.Types.OptionSetting
import Amazonka.RDS.Types.VpcSecurityGroupMembership

-- | Option details.
--
-- /See:/ 'newOption' smart constructor.
data Option = Option'
  { -- | The name of the option.
    Option -> Maybe Text
optionName :: Prelude.Maybe Prelude.Text,
    -- | Indicate if this option is permanent.
    Option -> Maybe Bool
permanent :: Prelude.Maybe Prelude.Bool,
    -- | Indicate if this option is persistent.
    Option -> Maybe Bool
persistent :: Prelude.Maybe Prelude.Bool,
    -- | The description of the option.
    Option -> Maybe Text
optionDescription :: Prelude.Maybe Prelude.Text,
    -- | The option settings for this option.
    Option -> Maybe [OptionSetting]
optionSettings :: Prelude.Maybe [OptionSetting],
    -- | If the option requires access to a port, then this VPC security group
    -- allows access to the port.
    Option -> Maybe [VpcSecurityGroupMembership]
vpcSecurityGroupMemberships :: Prelude.Maybe [VpcSecurityGroupMembership],
    -- | If the option requires access to a port, then this DB security group
    -- allows access to the port.
    Option -> Maybe [DBSecurityGroupMembership]
dbSecurityGroupMemberships :: Prelude.Maybe [DBSecurityGroupMembership],
    -- | The version of the option.
    Option -> Maybe Text
optionVersion :: Prelude.Maybe Prelude.Text,
    -- | If required, the port configured for this option to use.
    Option -> Maybe Int
port :: Prelude.Maybe Prelude.Int
  }
  deriving (Option -> Option -> Bool
(Option -> Option -> Bool)
-> (Option -> Option -> Bool) -> Eq Option
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Option -> Option -> Bool
$c/= :: Option -> Option -> Bool
== :: Option -> Option -> Bool
$c== :: Option -> Option -> Bool
Prelude.Eq, ReadPrec [Option]
ReadPrec Option
Int -> ReadS Option
ReadS [Option]
(Int -> ReadS Option)
-> ReadS [Option]
-> ReadPrec Option
-> ReadPrec [Option]
-> Read Option
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Option]
$creadListPrec :: ReadPrec [Option]
readPrec :: ReadPrec Option
$creadPrec :: ReadPrec Option
readList :: ReadS [Option]
$creadList :: ReadS [Option]
readsPrec :: Int -> ReadS Option
$creadsPrec :: Int -> ReadS Option
Prelude.Read, Int -> Option -> ShowS
[Option] -> ShowS
Option -> String
(Int -> Option -> ShowS)
-> (Option -> String) -> ([Option] -> ShowS) -> Show Option
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Option] -> ShowS
$cshowList :: [Option] -> ShowS
show :: Option -> String
$cshow :: Option -> String
showsPrec :: Int -> Option -> ShowS
$cshowsPrec :: Int -> Option -> ShowS
Prelude.Show, (forall x. Option -> Rep Option x)
-> (forall x. Rep Option x -> Option) -> Generic Option
forall x. Rep Option x -> Option
forall x. Option -> Rep Option x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Option x -> Option
$cfrom :: forall x. Option -> Rep Option x
Prelude.Generic)

-- |
-- Create a value of 'Option' 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:
--
-- 'optionName', 'option_optionName' - The name of the option.
--
-- 'permanent', 'option_permanent' - Indicate if this option is permanent.
--
-- 'persistent', 'option_persistent' - Indicate if this option is persistent.
--
-- 'optionDescription', 'option_optionDescription' - The description of the option.
--
-- 'optionSettings', 'option_optionSettings' - The option settings for this option.
--
-- 'vpcSecurityGroupMemberships', 'option_vpcSecurityGroupMemberships' - If the option requires access to a port, then this VPC security group
-- allows access to the port.
--
-- 'dbSecurityGroupMemberships', 'option_dbSecurityGroupMemberships' - If the option requires access to a port, then this DB security group
-- allows access to the port.
--
-- 'optionVersion', 'option_optionVersion' - The version of the option.
--
-- 'port', 'option_port' - If required, the port configured for this option to use.
newOption ::
  Option
newOption :: Option
newOption =
  Option' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [OptionSetting]
-> Maybe [VpcSecurityGroupMembership]
-> Maybe [DBSecurityGroupMembership]
-> Maybe Text
-> Maybe Int
-> Option
Option'
    { $sel:optionName:Option' :: Maybe Text
optionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:permanent:Option' :: Maybe Bool
permanent = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:persistent:Option' :: Maybe Bool
persistent = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:optionDescription:Option' :: Maybe Text
optionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:optionSettings:Option' :: Maybe [OptionSetting]
optionSettings = Maybe [OptionSetting]
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcSecurityGroupMemberships:Option' :: Maybe [VpcSecurityGroupMembership]
vpcSecurityGroupMemberships = Maybe [VpcSecurityGroupMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:dbSecurityGroupMemberships:Option' :: Maybe [DBSecurityGroupMembership]
dbSecurityGroupMemberships = Maybe [DBSecurityGroupMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:optionVersion:Option' :: Maybe Text
optionVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:port:Option' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the option.
option_optionName :: Lens.Lens' Option (Prelude.Maybe Prelude.Text)
option_optionName :: (Maybe Text -> f (Maybe Text)) -> Option -> f Option
option_optionName = (Option -> Maybe Text)
-> (Option -> Maybe Text -> Option)
-> Lens Option Option (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe Text
optionName :: Maybe Text
$sel:optionName:Option' :: Option -> Maybe Text
optionName} -> Maybe Text
optionName) (\s :: Option
s@Option' {} Maybe Text
a -> Option
s {$sel:optionName:Option' :: Maybe Text
optionName = Maybe Text
a} :: Option)

-- | Indicate if this option is permanent.
option_permanent :: Lens.Lens' Option (Prelude.Maybe Prelude.Bool)
option_permanent :: (Maybe Bool -> f (Maybe Bool)) -> Option -> f Option
option_permanent = (Option -> Maybe Bool)
-> (Option -> Maybe Bool -> Option)
-> Lens Option Option (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe Bool
permanent :: Maybe Bool
$sel:permanent:Option' :: Option -> Maybe Bool
permanent} -> Maybe Bool
permanent) (\s :: Option
s@Option' {} Maybe Bool
a -> Option
s {$sel:permanent:Option' :: Maybe Bool
permanent = Maybe Bool
a} :: Option)

-- | Indicate if this option is persistent.
option_persistent :: Lens.Lens' Option (Prelude.Maybe Prelude.Bool)
option_persistent :: (Maybe Bool -> f (Maybe Bool)) -> Option -> f Option
option_persistent = (Option -> Maybe Bool)
-> (Option -> Maybe Bool -> Option)
-> Lens Option Option (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe Bool
persistent :: Maybe Bool
$sel:persistent:Option' :: Option -> Maybe Bool
persistent} -> Maybe Bool
persistent) (\s :: Option
s@Option' {} Maybe Bool
a -> Option
s {$sel:persistent:Option' :: Maybe Bool
persistent = Maybe Bool
a} :: Option)

-- | The description of the option.
option_optionDescription :: Lens.Lens' Option (Prelude.Maybe Prelude.Text)
option_optionDescription :: (Maybe Text -> f (Maybe Text)) -> Option -> f Option
option_optionDescription = (Option -> Maybe Text)
-> (Option -> Maybe Text -> Option)
-> Lens Option Option (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe Text
optionDescription :: Maybe Text
$sel:optionDescription:Option' :: Option -> Maybe Text
optionDescription} -> Maybe Text
optionDescription) (\s :: Option
s@Option' {} Maybe Text
a -> Option
s {$sel:optionDescription:Option' :: Maybe Text
optionDescription = Maybe Text
a} :: Option)

-- | The option settings for this option.
option_optionSettings :: Lens.Lens' Option (Prelude.Maybe [OptionSetting])
option_optionSettings :: (Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
-> Option -> f Option
option_optionSettings = (Option -> Maybe [OptionSetting])
-> (Option -> Maybe [OptionSetting] -> Option)
-> Lens
     Option Option (Maybe [OptionSetting]) (Maybe [OptionSetting])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe [OptionSetting]
optionSettings :: Maybe [OptionSetting]
$sel:optionSettings:Option' :: Option -> Maybe [OptionSetting]
optionSettings} -> Maybe [OptionSetting]
optionSettings) (\s :: Option
s@Option' {} Maybe [OptionSetting]
a -> Option
s {$sel:optionSettings:Option' :: Maybe [OptionSetting]
optionSettings = Maybe [OptionSetting]
a} :: Option) ((Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
 -> Option -> f Option)
-> ((Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
    -> Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
-> (Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
-> Option
-> f Option
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OptionSetting] [OptionSetting] [OptionSetting] [OptionSetting]
-> Iso
     (Maybe [OptionSetting])
     (Maybe [OptionSetting])
     (Maybe [OptionSetting])
     (Maybe [OptionSetting])
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
  [OptionSetting] [OptionSetting] [OptionSetting] [OptionSetting]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the option requires access to a port, then this VPC security group
-- allows access to the port.
option_vpcSecurityGroupMemberships :: Lens.Lens' Option (Prelude.Maybe [VpcSecurityGroupMembership])
option_vpcSecurityGroupMemberships :: (Maybe [VpcSecurityGroupMembership]
 -> f (Maybe [VpcSecurityGroupMembership]))
-> Option -> f Option
option_vpcSecurityGroupMemberships = (Option -> Maybe [VpcSecurityGroupMembership])
-> (Option -> Maybe [VpcSecurityGroupMembership] -> Option)
-> Lens
     Option
     Option
     (Maybe [VpcSecurityGroupMembership])
     (Maybe [VpcSecurityGroupMembership])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe [VpcSecurityGroupMembership]
vpcSecurityGroupMemberships :: Maybe [VpcSecurityGroupMembership]
$sel:vpcSecurityGroupMemberships:Option' :: Option -> Maybe [VpcSecurityGroupMembership]
vpcSecurityGroupMemberships} -> Maybe [VpcSecurityGroupMembership]
vpcSecurityGroupMemberships) (\s :: Option
s@Option' {} Maybe [VpcSecurityGroupMembership]
a -> Option
s {$sel:vpcSecurityGroupMemberships:Option' :: Maybe [VpcSecurityGroupMembership]
vpcSecurityGroupMemberships = Maybe [VpcSecurityGroupMembership]
a} :: Option) ((Maybe [VpcSecurityGroupMembership]
  -> f (Maybe [VpcSecurityGroupMembership]))
 -> Option -> f Option)
-> ((Maybe [VpcSecurityGroupMembership]
     -> f (Maybe [VpcSecurityGroupMembership]))
    -> Maybe [VpcSecurityGroupMembership]
    -> f (Maybe [VpcSecurityGroupMembership]))
-> (Maybe [VpcSecurityGroupMembership]
    -> f (Maybe [VpcSecurityGroupMembership]))
-> Option
-> f Option
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
-> Iso
     (Maybe [VpcSecurityGroupMembership])
     (Maybe [VpcSecurityGroupMembership])
     (Maybe [VpcSecurityGroupMembership])
     (Maybe [VpcSecurityGroupMembership])
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
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
  [VpcSecurityGroupMembership]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the option requires access to a port, then this DB security group
-- allows access to the port.
option_dbSecurityGroupMemberships :: Lens.Lens' Option (Prelude.Maybe [DBSecurityGroupMembership])
option_dbSecurityGroupMemberships :: (Maybe [DBSecurityGroupMembership]
 -> f (Maybe [DBSecurityGroupMembership]))
-> Option -> f Option
option_dbSecurityGroupMemberships = (Option -> Maybe [DBSecurityGroupMembership])
-> (Option -> Maybe [DBSecurityGroupMembership] -> Option)
-> Lens
     Option
     Option
     (Maybe [DBSecurityGroupMembership])
     (Maybe [DBSecurityGroupMembership])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe [DBSecurityGroupMembership]
dbSecurityGroupMemberships :: Maybe [DBSecurityGroupMembership]
$sel:dbSecurityGroupMemberships:Option' :: Option -> Maybe [DBSecurityGroupMembership]
dbSecurityGroupMemberships} -> Maybe [DBSecurityGroupMembership]
dbSecurityGroupMemberships) (\s :: Option
s@Option' {} Maybe [DBSecurityGroupMembership]
a -> Option
s {$sel:dbSecurityGroupMemberships:Option' :: Maybe [DBSecurityGroupMembership]
dbSecurityGroupMemberships = Maybe [DBSecurityGroupMembership]
a} :: Option) ((Maybe [DBSecurityGroupMembership]
  -> f (Maybe [DBSecurityGroupMembership]))
 -> Option -> f Option)
-> ((Maybe [DBSecurityGroupMembership]
     -> f (Maybe [DBSecurityGroupMembership]))
    -> Maybe [DBSecurityGroupMembership]
    -> f (Maybe [DBSecurityGroupMembership]))
-> (Maybe [DBSecurityGroupMembership]
    -> f (Maybe [DBSecurityGroupMembership]))
-> Option
-> f Option
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DBSecurityGroupMembership]
  [DBSecurityGroupMembership]
  [DBSecurityGroupMembership]
  [DBSecurityGroupMembership]
-> Iso
     (Maybe [DBSecurityGroupMembership])
     (Maybe [DBSecurityGroupMembership])
     (Maybe [DBSecurityGroupMembership])
     (Maybe [DBSecurityGroupMembership])
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
  [DBSecurityGroupMembership]
  [DBSecurityGroupMembership]
  [DBSecurityGroupMembership]
  [DBSecurityGroupMembership]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version of the option.
option_optionVersion :: Lens.Lens' Option (Prelude.Maybe Prelude.Text)
option_optionVersion :: (Maybe Text -> f (Maybe Text)) -> Option -> f Option
option_optionVersion = (Option -> Maybe Text)
-> (Option -> Maybe Text -> Option)
-> Lens Option Option (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe Text
optionVersion :: Maybe Text
$sel:optionVersion:Option' :: Option -> Maybe Text
optionVersion} -> Maybe Text
optionVersion) (\s :: Option
s@Option' {} Maybe Text
a -> Option
s {$sel:optionVersion:Option' :: Maybe Text
optionVersion = Maybe Text
a} :: Option)

-- | If required, the port configured for this option to use.
option_port :: Lens.Lens' Option (Prelude.Maybe Prelude.Int)
option_port :: (Maybe Int -> f (Maybe Int)) -> Option -> f Option
option_port = (Option -> Maybe Int)
-> (Option -> Maybe Int -> Option)
-> Lens Option Option (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Option' {Maybe Int
port :: Maybe Int
$sel:port:Option' :: Option -> Maybe Int
port} -> Maybe Int
port) (\s :: Option
s@Option' {} Maybe Int
a -> Option
s {$sel:port:Option' :: Maybe Int
port = Maybe Int
a} :: Option)

instance Core.FromXML Option where
  parseXML :: [Node] -> Either String Option
parseXML [Node]
x =
    Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe [OptionSetting]
-> Maybe [VpcSecurityGroupMembership]
-> Maybe [DBSecurityGroupMembership]
-> Maybe Text
-> Maybe Int
-> Option
Option'
      (Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe [OptionSetting]
 -> Maybe [VpcSecurityGroupMembership]
 -> Maybe [DBSecurityGroupMembership]
 -> Maybe Text
 -> Maybe Int
 -> Option)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [OptionSetting]
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe [DBSecurityGroupMembership]
      -> Maybe Text
      -> Maybe Int
      -> Option)
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
"OptionName")
      Either
  String
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [OptionSetting]
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe [DBSecurityGroupMembership]
   -> Maybe Text
   -> Maybe Int
   -> Option)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe [OptionSetting]
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe [DBSecurityGroupMembership]
      -> Maybe Text
      -> Maybe Int
      -> Option)
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
"Permanent")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe [OptionSetting]
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe [DBSecurityGroupMembership]
   -> Maybe Text
   -> Maybe Int
   -> Option)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe [OptionSetting]
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe [DBSecurityGroupMembership]
      -> Maybe Text
      -> Maybe Int
      -> Option)
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
"Persistent")
      Either
  String
  (Maybe Text
   -> Maybe [OptionSetting]
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe [DBSecurityGroupMembership]
   -> Maybe Text
   -> Maybe Int
   -> Option)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [OptionSetting]
      -> Maybe [VpcSecurityGroupMembership]
      -> Maybe [DBSecurityGroupMembership]
      -> Maybe Text
      -> Maybe Int
      -> Option)
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
"OptionDescription")
      Either
  String
  (Maybe [OptionSetting]
   -> Maybe [VpcSecurityGroupMembership]
   -> Maybe [DBSecurityGroupMembership]
   -> Maybe Text
   -> Maybe Int
   -> Option)
-> Either String (Maybe [OptionSetting])
-> Either
     String
     (Maybe [VpcSecurityGroupMembership]
      -> Maybe [DBSecurityGroupMembership]
      -> Maybe Text
      -> Maybe Int
      -> Option)
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
"OptionSettings" 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 [OptionSetting]))
-> Either String (Maybe [OptionSetting])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [OptionSetting])
-> [Node] -> Either String (Maybe [OptionSetting])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [OptionSetting]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"OptionSetting")
                  )
      Either
  String
  (Maybe [VpcSecurityGroupMembership]
   -> Maybe [DBSecurityGroupMembership]
   -> Maybe Text
   -> Maybe Int
   -> Option)
-> Either String (Maybe [VpcSecurityGroupMembership])
-> Either
     String
     (Maybe [DBSecurityGroupMembership]
      -> Maybe Text -> Maybe Int -> Option)
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
"VpcSecurityGroupMemberships"
                      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 [VpcSecurityGroupMembership]))
-> Either String (Maybe [VpcSecurityGroupMembership])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [VpcSecurityGroupMembership])
-> [Node] -> Either String (Maybe [VpcSecurityGroupMembership])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                        (Text -> [Node] -> Either String [VpcSecurityGroupMembership]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"VpcSecurityGroupMembership")
                  )
      Either
  String
  (Maybe [DBSecurityGroupMembership]
   -> Maybe Text -> Maybe Int -> Option)
-> Either String (Maybe [DBSecurityGroupMembership])
-> Either String (Maybe Text -> Maybe Int -> Option)
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
"DBSecurityGroupMemberships"
                      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 [DBSecurityGroupMembership]))
-> Either String (Maybe [DBSecurityGroupMembership])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [DBSecurityGroupMembership])
-> [Node] -> Either String (Maybe [DBSecurityGroupMembership])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [DBSecurityGroupMembership]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"DBSecurityGroup")
                  )
      Either String (Maybe Text -> Maybe Int -> Option)
-> Either String (Maybe Text)
-> Either String (Maybe Int -> Option)
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
"OptionVersion")
      Either String (Maybe Int -> Option)
-> Either String (Maybe Int) -> Either String Option
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Port")

instance Prelude.Hashable Option

instance Prelude.NFData Option