{-# 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 #-}
module Amazonka.RDS.Types.OptionGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.Option
data OptionGroup = OptionGroup'
{
OptionGroup -> Maybe Text
optionGroupDescription :: Prelude.Maybe Prelude.Text,
OptionGroup -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
OptionGroup -> Maybe Bool
allowsVpcAndNonVpcInstanceMemberships :: Prelude.Maybe Prelude.Bool,
OptionGroup -> Maybe Text
engineName :: Prelude.Maybe Prelude.Text,
OptionGroup -> Maybe Text
optionGroupArn :: Prelude.Maybe Prelude.Text,
OptionGroup -> Maybe Text
majorEngineVersion :: Prelude.Maybe Prelude.Text,
OptionGroup -> Maybe [Option]
options :: Prelude.Maybe [Option],
OptionGroup -> Maybe Text
optionGroupName :: Prelude.Maybe Prelude.Text
}
deriving (OptionGroup -> OptionGroup -> Bool
(OptionGroup -> OptionGroup -> Bool)
-> (OptionGroup -> OptionGroup -> Bool) -> Eq OptionGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OptionGroup -> OptionGroup -> Bool
$c/= :: OptionGroup -> OptionGroup -> Bool
== :: OptionGroup -> OptionGroup -> Bool
$c== :: OptionGroup -> OptionGroup -> Bool
Prelude.Eq, ReadPrec [OptionGroup]
ReadPrec OptionGroup
Int -> ReadS OptionGroup
ReadS [OptionGroup]
(Int -> ReadS OptionGroup)
-> ReadS [OptionGroup]
-> ReadPrec OptionGroup
-> ReadPrec [OptionGroup]
-> Read OptionGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OptionGroup]
$creadListPrec :: ReadPrec [OptionGroup]
readPrec :: ReadPrec OptionGroup
$creadPrec :: ReadPrec OptionGroup
readList :: ReadS [OptionGroup]
$creadList :: ReadS [OptionGroup]
readsPrec :: Int -> ReadS OptionGroup
$creadsPrec :: Int -> ReadS OptionGroup
Prelude.Read, Int -> OptionGroup -> ShowS
[OptionGroup] -> ShowS
OptionGroup -> String
(Int -> OptionGroup -> ShowS)
-> (OptionGroup -> String)
-> ([OptionGroup] -> ShowS)
-> Show OptionGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OptionGroup] -> ShowS
$cshowList :: [OptionGroup] -> ShowS
show :: OptionGroup -> String
$cshow :: OptionGroup -> String
showsPrec :: Int -> OptionGroup -> ShowS
$cshowsPrec :: Int -> OptionGroup -> ShowS
Prelude.Show, (forall x. OptionGroup -> Rep OptionGroup x)
-> (forall x. Rep OptionGroup x -> OptionGroup)
-> Generic OptionGroup
forall x. Rep OptionGroup x -> OptionGroup
forall x. OptionGroup -> Rep OptionGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OptionGroup x -> OptionGroup
$cfrom :: forall x. OptionGroup -> Rep OptionGroup x
Prelude.Generic)
newOptionGroup ::
OptionGroup
newOptionGroup :: OptionGroup
newOptionGroup =
OptionGroup' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup
OptionGroup'
{ $sel:optionGroupDescription:OptionGroup' :: Maybe Text
optionGroupDescription =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:OptionGroup' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allowsVpcAndNonVpcInstanceMemberships:OptionGroup' :: Maybe Bool
allowsVpcAndNonVpcInstanceMemberships =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:engineName:OptionGroup' :: Maybe Text
engineName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:optionGroupArn:OptionGroup' :: Maybe Text
optionGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:majorEngineVersion:OptionGroup' :: Maybe Text
majorEngineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:options:OptionGroup' :: Maybe [Option]
options = Maybe [Option]
forall a. Maybe a
Prelude.Nothing,
$sel:optionGroupName:OptionGroup' :: Maybe Text
optionGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
optionGroup_optionGroupDescription :: Lens.Lens' OptionGroup (Prelude.Maybe Prelude.Text)
optionGroup_optionGroupDescription :: (Maybe Text -> f (Maybe Text)) -> OptionGroup -> f OptionGroup
optionGroup_optionGroupDescription = (OptionGroup -> Maybe Text)
-> (OptionGroup -> Maybe Text -> OptionGroup)
-> Lens OptionGroup OptionGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroup' {Maybe Text
optionGroupDescription :: Maybe Text
$sel:optionGroupDescription:OptionGroup' :: OptionGroup -> Maybe Text
optionGroupDescription} -> Maybe Text
optionGroupDescription) (\s :: OptionGroup
s@OptionGroup' {} Maybe Text
a -> OptionGroup
s {$sel:optionGroupDescription:OptionGroup' :: Maybe Text
optionGroupDescription = Maybe Text
a} :: OptionGroup)
optionGroup_vpcId :: Lens.Lens' OptionGroup (Prelude.Maybe Prelude.Text)
optionGroup_vpcId :: (Maybe Text -> f (Maybe Text)) -> OptionGroup -> f OptionGroup
optionGroup_vpcId = (OptionGroup -> Maybe Text)
-> (OptionGroup -> Maybe Text -> OptionGroup)
-> Lens OptionGroup OptionGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroup' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:OptionGroup' :: OptionGroup -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: OptionGroup
s@OptionGroup' {} Maybe Text
a -> OptionGroup
s {$sel:vpcId:OptionGroup' :: Maybe Text
vpcId = Maybe Text
a} :: OptionGroup)
optionGroup_allowsVpcAndNonVpcInstanceMemberships :: Lens.Lens' OptionGroup (Prelude.Maybe Prelude.Bool)
optionGroup_allowsVpcAndNonVpcInstanceMemberships :: (Maybe Bool -> f (Maybe Bool)) -> OptionGroup -> f OptionGroup
optionGroup_allowsVpcAndNonVpcInstanceMemberships = (OptionGroup -> Maybe Bool)
-> (OptionGroup -> Maybe Bool -> OptionGroup)
-> Lens OptionGroup OptionGroup (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroup' {Maybe Bool
allowsVpcAndNonVpcInstanceMemberships :: Maybe Bool
$sel:allowsVpcAndNonVpcInstanceMemberships:OptionGroup' :: OptionGroup -> Maybe Bool
allowsVpcAndNonVpcInstanceMemberships} -> Maybe Bool
allowsVpcAndNonVpcInstanceMemberships) (\s :: OptionGroup
s@OptionGroup' {} Maybe Bool
a -> OptionGroup
s {$sel:allowsVpcAndNonVpcInstanceMemberships:OptionGroup' :: Maybe Bool
allowsVpcAndNonVpcInstanceMemberships = Maybe Bool
a} :: OptionGroup)
optionGroup_engineName :: Lens.Lens' OptionGroup (Prelude.Maybe Prelude.Text)
optionGroup_engineName :: (Maybe Text -> f (Maybe Text)) -> OptionGroup -> f OptionGroup
optionGroup_engineName = (OptionGroup -> Maybe Text)
-> (OptionGroup -> Maybe Text -> OptionGroup)
-> Lens OptionGroup OptionGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroup' {Maybe Text
engineName :: Maybe Text
$sel:engineName:OptionGroup' :: OptionGroup -> Maybe Text
engineName} -> Maybe Text
engineName) (\s :: OptionGroup
s@OptionGroup' {} Maybe Text
a -> OptionGroup
s {$sel:engineName:OptionGroup' :: Maybe Text
engineName = Maybe Text
a} :: OptionGroup)
optionGroup_optionGroupArn :: Lens.Lens' OptionGroup (Prelude.Maybe Prelude.Text)
optionGroup_optionGroupArn :: (Maybe Text -> f (Maybe Text)) -> OptionGroup -> f OptionGroup
optionGroup_optionGroupArn = (OptionGroup -> Maybe Text)
-> (OptionGroup -> Maybe Text -> OptionGroup)
-> Lens OptionGroup OptionGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroup' {Maybe Text
optionGroupArn :: Maybe Text
$sel:optionGroupArn:OptionGroup' :: OptionGroup -> Maybe Text
optionGroupArn} -> Maybe Text
optionGroupArn) (\s :: OptionGroup
s@OptionGroup' {} Maybe Text
a -> OptionGroup
s {$sel:optionGroupArn:OptionGroup' :: Maybe Text
optionGroupArn = Maybe Text
a} :: OptionGroup)
optionGroup_majorEngineVersion :: Lens.Lens' OptionGroup (Prelude.Maybe Prelude.Text)
optionGroup_majorEngineVersion :: (Maybe Text -> f (Maybe Text)) -> OptionGroup -> f OptionGroup
optionGroup_majorEngineVersion = (OptionGroup -> Maybe Text)
-> (OptionGroup -> Maybe Text -> OptionGroup)
-> Lens OptionGroup OptionGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroup' {Maybe Text
majorEngineVersion :: Maybe Text
$sel:majorEngineVersion:OptionGroup' :: OptionGroup -> Maybe Text
majorEngineVersion} -> Maybe Text
majorEngineVersion) (\s :: OptionGroup
s@OptionGroup' {} Maybe Text
a -> OptionGroup
s {$sel:majorEngineVersion:OptionGroup' :: Maybe Text
majorEngineVersion = Maybe Text
a} :: OptionGroup)
optionGroup_options :: Lens.Lens' OptionGroup (Prelude.Maybe [Option])
optionGroup_options :: (Maybe [Option] -> f (Maybe [Option]))
-> OptionGroup -> f OptionGroup
optionGroup_options = (OptionGroup -> Maybe [Option])
-> (OptionGroup -> Maybe [Option] -> OptionGroup)
-> Lens OptionGroup OptionGroup (Maybe [Option]) (Maybe [Option])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroup' {Maybe [Option]
options :: Maybe [Option]
$sel:options:OptionGroup' :: OptionGroup -> Maybe [Option]
options} -> Maybe [Option]
options) (\s :: OptionGroup
s@OptionGroup' {} Maybe [Option]
a -> OptionGroup
s {$sel:options:OptionGroup' :: Maybe [Option]
options = Maybe [Option]
a} :: OptionGroup) ((Maybe [Option] -> f (Maybe [Option]))
-> OptionGroup -> f OptionGroup)
-> ((Maybe [Option] -> f (Maybe [Option]))
-> Maybe [Option] -> f (Maybe [Option]))
-> (Maybe [Option] -> f (Maybe [Option]))
-> OptionGroup
-> f OptionGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Option] [Option] [Option] [Option]
-> Iso
(Maybe [Option]) (Maybe [Option]) (Maybe [Option]) (Maybe [Option])
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 [Option] [Option] [Option] [Option]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
optionGroup_optionGroupName :: Lens.Lens' OptionGroup (Prelude.Maybe Prelude.Text)
optionGroup_optionGroupName :: (Maybe Text -> f (Maybe Text)) -> OptionGroup -> f OptionGroup
optionGroup_optionGroupName = (OptionGroup -> Maybe Text)
-> (OptionGroup -> Maybe Text -> OptionGroup)
-> Lens OptionGroup OptionGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionGroup' {Maybe Text
optionGroupName :: Maybe Text
$sel:optionGroupName:OptionGroup' :: OptionGroup -> Maybe Text
optionGroupName} -> Maybe Text
optionGroupName) (\s :: OptionGroup
s@OptionGroup' {} Maybe Text
a -> OptionGroup
s {$sel:optionGroupName:OptionGroup' :: Maybe Text
optionGroupName = Maybe Text
a} :: OptionGroup)
instance Core.FromXML OptionGroup where
parseXML :: [Node] -> Either String OptionGroup
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup
OptionGroup'
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup)
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
"OptionGroupDescription")
Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup)
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
"VpcId")
Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup)
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
"AllowsVpcAndNonVpcInstanceMemberships")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Option]
-> Maybe Text
-> OptionGroup)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe [Option] -> Maybe Text -> OptionGroup)
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
"EngineName")
Either
String
(Maybe Text
-> Maybe Text -> Maybe [Option] -> Maybe Text -> OptionGroup)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe [Option] -> Maybe Text -> OptionGroup)
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
"OptionGroupArn")
Either
String (Maybe Text -> Maybe [Option] -> Maybe Text -> OptionGroup)
-> Either String (Maybe Text)
-> Either String (Maybe [Option] -> Maybe Text -> OptionGroup)
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
"MajorEngineVersion")
Either String (Maybe [Option] -> Maybe Text -> OptionGroup)
-> Either String (Maybe [Option])
-> Either String (Maybe Text -> OptionGroup)
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
"Options" 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 [Option]))
-> Either String (Maybe [Option])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Option])
-> [Node] -> Either String (Maybe [Option])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Option]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Option")
)
Either String (Maybe Text -> OptionGroup)
-> Either String (Maybe Text) -> Either String OptionGroup
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
"OptionGroupName")
instance Prelude.Hashable OptionGroup
instance Prelude.NFData OptionGroup