{-# 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.OptionConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.OptionSetting
data OptionConfiguration = OptionConfiguration'
{
OptionConfiguration -> Maybe [OptionSetting]
optionSettings :: Prelude.Maybe [OptionSetting],
OptionConfiguration -> Maybe [Text]
vpcSecurityGroupMemberships :: Prelude.Maybe [Prelude.Text],
OptionConfiguration -> Maybe [Text]
dbSecurityGroupMemberships :: Prelude.Maybe [Prelude.Text],
OptionConfiguration -> Maybe Text
optionVersion :: Prelude.Maybe Prelude.Text,
OptionConfiguration -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
OptionConfiguration -> Text
optionName :: Prelude.Text
}
deriving (OptionConfiguration -> OptionConfiguration -> Bool
(OptionConfiguration -> OptionConfiguration -> Bool)
-> (OptionConfiguration -> OptionConfiguration -> Bool)
-> Eq OptionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OptionConfiguration -> OptionConfiguration -> Bool
$c/= :: OptionConfiguration -> OptionConfiguration -> Bool
== :: OptionConfiguration -> OptionConfiguration -> Bool
$c== :: OptionConfiguration -> OptionConfiguration -> Bool
Prelude.Eq, ReadPrec [OptionConfiguration]
ReadPrec OptionConfiguration
Int -> ReadS OptionConfiguration
ReadS [OptionConfiguration]
(Int -> ReadS OptionConfiguration)
-> ReadS [OptionConfiguration]
-> ReadPrec OptionConfiguration
-> ReadPrec [OptionConfiguration]
-> Read OptionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OptionConfiguration]
$creadListPrec :: ReadPrec [OptionConfiguration]
readPrec :: ReadPrec OptionConfiguration
$creadPrec :: ReadPrec OptionConfiguration
readList :: ReadS [OptionConfiguration]
$creadList :: ReadS [OptionConfiguration]
readsPrec :: Int -> ReadS OptionConfiguration
$creadsPrec :: Int -> ReadS OptionConfiguration
Prelude.Read, Int -> OptionConfiguration -> ShowS
[OptionConfiguration] -> ShowS
OptionConfiguration -> String
(Int -> OptionConfiguration -> ShowS)
-> (OptionConfiguration -> String)
-> ([OptionConfiguration] -> ShowS)
-> Show OptionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OptionConfiguration] -> ShowS
$cshowList :: [OptionConfiguration] -> ShowS
show :: OptionConfiguration -> String
$cshow :: OptionConfiguration -> String
showsPrec :: Int -> OptionConfiguration -> ShowS
$cshowsPrec :: Int -> OptionConfiguration -> ShowS
Prelude.Show, (forall x. OptionConfiguration -> Rep OptionConfiguration x)
-> (forall x. Rep OptionConfiguration x -> OptionConfiguration)
-> Generic OptionConfiguration
forall x. Rep OptionConfiguration x -> OptionConfiguration
forall x. OptionConfiguration -> Rep OptionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OptionConfiguration x -> OptionConfiguration
$cfrom :: forall x. OptionConfiguration -> Rep OptionConfiguration x
Prelude.Generic)
newOptionConfiguration ::
Prelude.Text ->
OptionConfiguration
newOptionConfiguration :: Text -> OptionConfiguration
newOptionConfiguration Text
pOptionName_ =
OptionConfiguration' :: Maybe [OptionSetting]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> Text
-> OptionConfiguration
OptionConfiguration'
{ $sel:optionSettings:OptionConfiguration' :: Maybe [OptionSetting]
optionSettings =
Maybe [OptionSetting]
forall a. Maybe a
Prelude.Nothing,
$sel:vpcSecurityGroupMemberships:OptionConfiguration' :: Maybe [Text]
vpcSecurityGroupMemberships = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:dbSecurityGroupMemberships:OptionConfiguration' :: Maybe [Text]
dbSecurityGroupMemberships = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:optionVersion:OptionConfiguration' :: Maybe Text
optionVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:port:OptionConfiguration' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:optionName:OptionConfiguration' :: Text
optionName = Text
pOptionName_
}
optionConfiguration_optionSettings :: Lens.Lens' OptionConfiguration (Prelude.Maybe [OptionSetting])
optionConfiguration_optionSettings :: (Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
-> OptionConfiguration -> f OptionConfiguration
optionConfiguration_optionSettings = (OptionConfiguration -> Maybe [OptionSetting])
-> (OptionConfiguration
-> Maybe [OptionSetting] -> OptionConfiguration)
-> Lens
OptionConfiguration
OptionConfiguration
(Maybe [OptionSetting])
(Maybe [OptionSetting])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionConfiguration' {Maybe [OptionSetting]
optionSettings :: Maybe [OptionSetting]
$sel:optionSettings:OptionConfiguration' :: OptionConfiguration -> Maybe [OptionSetting]
optionSettings} -> Maybe [OptionSetting]
optionSettings) (\s :: OptionConfiguration
s@OptionConfiguration' {} Maybe [OptionSetting]
a -> OptionConfiguration
s {$sel:optionSettings:OptionConfiguration' :: Maybe [OptionSetting]
optionSettings = Maybe [OptionSetting]
a} :: OptionConfiguration) ((Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
-> OptionConfiguration -> f OptionConfiguration)
-> ((Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
-> Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
-> (Maybe [OptionSetting] -> f (Maybe [OptionSetting]))
-> OptionConfiguration
-> f OptionConfiguration
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
optionConfiguration_vpcSecurityGroupMemberships :: Lens.Lens' OptionConfiguration (Prelude.Maybe [Prelude.Text])
optionConfiguration_vpcSecurityGroupMemberships :: (Maybe [Text] -> f (Maybe [Text]))
-> OptionConfiguration -> f OptionConfiguration
optionConfiguration_vpcSecurityGroupMemberships = (OptionConfiguration -> Maybe [Text])
-> (OptionConfiguration -> Maybe [Text] -> OptionConfiguration)
-> Lens
OptionConfiguration
OptionConfiguration
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionConfiguration' {Maybe [Text]
vpcSecurityGroupMemberships :: Maybe [Text]
$sel:vpcSecurityGroupMemberships:OptionConfiguration' :: OptionConfiguration -> Maybe [Text]
vpcSecurityGroupMemberships} -> Maybe [Text]
vpcSecurityGroupMemberships) (\s :: OptionConfiguration
s@OptionConfiguration' {} Maybe [Text]
a -> OptionConfiguration
s {$sel:vpcSecurityGroupMemberships:OptionConfiguration' :: Maybe [Text]
vpcSecurityGroupMemberships = Maybe [Text]
a} :: OptionConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
-> OptionConfiguration -> f OptionConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> OptionConfiguration
-> f OptionConfiguration
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
optionConfiguration_dbSecurityGroupMemberships :: Lens.Lens' OptionConfiguration (Prelude.Maybe [Prelude.Text])
optionConfiguration_dbSecurityGroupMemberships :: (Maybe [Text] -> f (Maybe [Text]))
-> OptionConfiguration -> f OptionConfiguration
optionConfiguration_dbSecurityGroupMemberships = (OptionConfiguration -> Maybe [Text])
-> (OptionConfiguration -> Maybe [Text] -> OptionConfiguration)
-> Lens
OptionConfiguration
OptionConfiguration
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionConfiguration' {Maybe [Text]
dbSecurityGroupMemberships :: Maybe [Text]
$sel:dbSecurityGroupMemberships:OptionConfiguration' :: OptionConfiguration -> Maybe [Text]
dbSecurityGroupMemberships} -> Maybe [Text]
dbSecurityGroupMemberships) (\s :: OptionConfiguration
s@OptionConfiguration' {} Maybe [Text]
a -> OptionConfiguration
s {$sel:dbSecurityGroupMemberships:OptionConfiguration' :: Maybe [Text]
dbSecurityGroupMemberships = Maybe [Text]
a} :: OptionConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
-> OptionConfiguration -> f OptionConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> OptionConfiguration
-> f OptionConfiguration
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
optionConfiguration_optionVersion :: Lens.Lens' OptionConfiguration (Prelude.Maybe Prelude.Text)
optionConfiguration_optionVersion :: (Maybe Text -> f (Maybe Text))
-> OptionConfiguration -> f OptionConfiguration
optionConfiguration_optionVersion = (OptionConfiguration -> Maybe Text)
-> (OptionConfiguration -> Maybe Text -> OptionConfiguration)
-> Lens
OptionConfiguration OptionConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionConfiguration' {Maybe Text
optionVersion :: Maybe Text
$sel:optionVersion:OptionConfiguration' :: OptionConfiguration -> Maybe Text
optionVersion} -> Maybe Text
optionVersion) (\s :: OptionConfiguration
s@OptionConfiguration' {} Maybe Text
a -> OptionConfiguration
s {$sel:optionVersion:OptionConfiguration' :: Maybe Text
optionVersion = Maybe Text
a} :: OptionConfiguration)
optionConfiguration_port :: Lens.Lens' OptionConfiguration (Prelude.Maybe Prelude.Int)
optionConfiguration_port :: (Maybe Int -> f (Maybe Int))
-> OptionConfiguration -> f OptionConfiguration
optionConfiguration_port = (OptionConfiguration -> Maybe Int)
-> (OptionConfiguration -> Maybe Int -> OptionConfiguration)
-> Lens
OptionConfiguration OptionConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionConfiguration' {Maybe Int
port :: Maybe Int
$sel:port:OptionConfiguration' :: OptionConfiguration -> Maybe Int
port} -> Maybe Int
port) (\s :: OptionConfiguration
s@OptionConfiguration' {} Maybe Int
a -> OptionConfiguration
s {$sel:port:OptionConfiguration' :: Maybe Int
port = Maybe Int
a} :: OptionConfiguration)
optionConfiguration_optionName :: Lens.Lens' OptionConfiguration Prelude.Text
optionConfiguration_optionName :: (Text -> f Text) -> OptionConfiguration -> f OptionConfiguration
optionConfiguration_optionName = (OptionConfiguration -> Text)
-> (OptionConfiguration -> Text -> OptionConfiguration)
-> Lens OptionConfiguration OptionConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionConfiguration' {Text
optionName :: Text
$sel:optionName:OptionConfiguration' :: OptionConfiguration -> Text
optionName} -> Text
optionName) (\s :: OptionConfiguration
s@OptionConfiguration' {} Text
a -> OptionConfiguration
s {$sel:optionName:OptionConfiguration' :: Text
optionName = Text
a} :: OptionConfiguration)
instance Prelude.Hashable OptionConfiguration
instance Prelude.NFData OptionConfiguration
instance Core.ToQuery OptionConfiguration where
toQuery :: OptionConfiguration -> QueryString
toQuery OptionConfiguration' {Maybe Int
Maybe [Text]
Maybe [OptionSetting]
Maybe Text
Text
optionName :: Text
port :: Maybe Int
optionVersion :: Maybe Text
dbSecurityGroupMemberships :: Maybe [Text]
vpcSecurityGroupMemberships :: Maybe [Text]
optionSettings :: Maybe [OptionSetting]
$sel:optionName:OptionConfiguration' :: OptionConfiguration -> Text
$sel:port:OptionConfiguration' :: OptionConfiguration -> Maybe Int
$sel:optionVersion:OptionConfiguration' :: OptionConfiguration -> Maybe Text
$sel:dbSecurityGroupMemberships:OptionConfiguration' :: OptionConfiguration -> Maybe [Text]
$sel:vpcSecurityGroupMemberships:OptionConfiguration' :: OptionConfiguration -> Maybe [Text]
$sel:optionSettings:OptionConfiguration' :: OptionConfiguration -> Maybe [OptionSetting]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"OptionSettings"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [OptionSetting] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"OptionSetting"
([OptionSetting] -> QueryString)
-> Maybe [OptionSetting] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OptionSetting]
optionSettings
),
ByteString
"VpcSecurityGroupMemberships"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"VpcSecurityGroupId"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
vpcSecurityGroupMemberships
),
ByteString
"DBSecurityGroupMemberships"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"DBSecurityGroupName"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
dbSecurityGroupMemberships
),
ByteString
"OptionVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
optionVersion,
ByteString
"Port" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
port,
ByteString
"OptionName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
optionName
]