{-# 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.OptionSetting where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OptionSetting = OptionSetting'
{
OptionSetting -> Maybe Bool
isCollection :: Prelude.Maybe Prelude.Bool,
OptionSetting -> Maybe Text
applyType :: Prelude.Maybe Prelude.Text,
OptionSetting -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
OptionSetting -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
OptionSetting -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
OptionSetting -> Maybe Bool
isModifiable :: Prelude.Maybe Prelude.Bool,
OptionSetting -> Maybe Text
dataType :: Prelude.Maybe Prelude.Text,
OptionSetting -> Maybe Text
allowedValues :: Prelude.Maybe Prelude.Text,
OptionSetting -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (OptionSetting -> OptionSetting -> Bool
(OptionSetting -> OptionSetting -> Bool)
-> (OptionSetting -> OptionSetting -> Bool) -> Eq OptionSetting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OptionSetting -> OptionSetting -> Bool
$c/= :: OptionSetting -> OptionSetting -> Bool
== :: OptionSetting -> OptionSetting -> Bool
$c== :: OptionSetting -> OptionSetting -> Bool
Prelude.Eq, ReadPrec [OptionSetting]
ReadPrec OptionSetting
Int -> ReadS OptionSetting
ReadS [OptionSetting]
(Int -> ReadS OptionSetting)
-> ReadS [OptionSetting]
-> ReadPrec OptionSetting
-> ReadPrec [OptionSetting]
-> Read OptionSetting
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OptionSetting]
$creadListPrec :: ReadPrec [OptionSetting]
readPrec :: ReadPrec OptionSetting
$creadPrec :: ReadPrec OptionSetting
readList :: ReadS [OptionSetting]
$creadList :: ReadS [OptionSetting]
readsPrec :: Int -> ReadS OptionSetting
$creadsPrec :: Int -> ReadS OptionSetting
Prelude.Read, Int -> OptionSetting -> ShowS
[OptionSetting] -> ShowS
OptionSetting -> String
(Int -> OptionSetting -> ShowS)
-> (OptionSetting -> String)
-> ([OptionSetting] -> ShowS)
-> Show OptionSetting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OptionSetting] -> ShowS
$cshowList :: [OptionSetting] -> ShowS
show :: OptionSetting -> String
$cshow :: OptionSetting -> String
showsPrec :: Int -> OptionSetting -> ShowS
$cshowsPrec :: Int -> OptionSetting -> ShowS
Prelude.Show, (forall x. OptionSetting -> Rep OptionSetting x)
-> (forall x. Rep OptionSetting x -> OptionSetting)
-> Generic OptionSetting
forall x. Rep OptionSetting x -> OptionSetting
forall x. OptionSetting -> Rep OptionSetting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OptionSetting x -> OptionSetting
$cfrom :: forall x. OptionSetting -> Rep OptionSetting x
Prelude.Generic)
newOptionSetting ::
OptionSetting
newOptionSetting :: OptionSetting
newOptionSetting =
OptionSetting' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting
OptionSetting'
{ $sel:isCollection:OptionSetting' :: Maybe Bool
isCollection = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:applyType:OptionSetting' :: Maybe Text
applyType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:value:OptionSetting' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:OptionSetting' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultValue:OptionSetting' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isModifiable:OptionSetting' :: Maybe Bool
isModifiable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:dataType:OptionSetting' :: Maybe Text
dataType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:allowedValues:OptionSetting' :: Maybe Text
allowedValues = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:OptionSetting' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
optionSetting_isCollection :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Bool)
optionSetting_isCollection :: (Maybe Bool -> f (Maybe Bool)) -> OptionSetting -> f OptionSetting
optionSetting_isCollection = (OptionSetting -> Maybe Bool)
-> (OptionSetting -> Maybe Bool -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Bool
isCollection :: Maybe Bool
$sel:isCollection:OptionSetting' :: OptionSetting -> Maybe Bool
isCollection} -> Maybe Bool
isCollection) (\s :: OptionSetting
s@OptionSetting' {} Maybe Bool
a -> OptionSetting
s {$sel:isCollection:OptionSetting' :: Maybe Bool
isCollection = Maybe Bool
a} :: OptionSetting)
optionSetting_applyType :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Text)
optionSetting_applyType :: (Maybe Text -> f (Maybe Text)) -> OptionSetting -> f OptionSetting
optionSetting_applyType = (OptionSetting -> Maybe Text)
-> (OptionSetting -> Maybe Text -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Text
applyType :: Maybe Text
$sel:applyType:OptionSetting' :: OptionSetting -> Maybe Text
applyType} -> Maybe Text
applyType) (\s :: OptionSetting
s@OptionSetting' {} Maybe Text
a -> OptionSetting
s {$sel:applyType:OptionSetting' :: Maybe Text
applyType = Maybe Text
a} :: OptionSetting)
optionSetting_value :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Text)
optionSetting_value :: (Maybe Text -> f (Maybe Text)) -> OptionSetting -> f OptionSetting
optionSetting_value = (OptionSetting -> Maybe Text)
-> (OptionSetting -> Maybe Text -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Text
value :: Maybe Text
$sel:value:OptionSetting' :: OptionSetting -> Maybe Text
value} -> Maybe Text
value) (\s :: OptionSetting
s@OptionSetting' {} Maybe Text
a -> OptionSetting
s {$sel:value:OptionSetting' :: Maybe Text
value = Maybe Text
a} :: OptionSetting)
optionSetting_name :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Text)
optionSetting_name :: (Maybe Text -> f (Maybe Text)) -> OptionSetting -> f OptionSetting
optionSetting_name = (OptionSetting -> Maybe Text)
-> (OptionSetting -> Maybe Text -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Text
name :: Maybe Text
$sel:name:OptionSetting' :: OptionSetting -> Maybe Text
name} -> Maybe Text
name) (\s :: OptionSetting
s@OptionSetting' {} Maybe Text
a -> OptionSetting
s {$sel:name:OptionSetting' :: Maybe Text
name = Maybe Text
a} :: OptionSetting)
optionSetting_defaultValue :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Text)
optionSetting_defaultValue :: (Maybe Text -> f (Maybe Text)) -> OptionSetting -> f OptionSetting
optionSetting_defaultValue = (OptionSetting -> Maybe Text)
-> (OptionSetting -> Maybe Text -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:OptionSetting' :: OptionSetting -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: OptionSetting
s@OptionSetting' {} Maybe Text
a -> OptionSetting
s {$sel:defaultValue:OptionSetting' :: Maybe Text
defaultValue = Maybe Text
a} :: OptionSetting)
optionSetting_isModifiable :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Bool)
optionSetting_isModifiable :: (Maybe Bool -> f (Maybe Bool)) -> OptionSetting -> f OptionSetting
optionSetting_isModifiable = (OptionSetting -> Maybe Bool)
-> (OptionSetting -> Maybe Bool -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Bool
isModifiable :: Maybe Bool
$sel:isModifiable:OptionSetting' :: OptionSetting -> Maybe Bool
isModifiable} -> Maybe Bool
isModifiable) (\s :: OptionSetting
s@OptionSetting' {} Maybe Bool
a -> OptionSetting
s {$sel:isModifiable:OptionSetting' :: Maybe Bool
isModifiable = Maybe Bool
a} :: OptionSetting)
optionSetting_dataType :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Text)
optionSetting_dataType :: (Maybe Text -> f (Maybe Text)) -> OptionSetting -> f OptionSetting
optionSetting_dataType = (OptionSetting -> Maybe Text)
-> (OptionSetting -> Maybe Text -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Text
dataType :: Maybe Text
$sel:dataType:OptionSetting' :: OptionSetting -> Maybe Text
dataType} -> Maybe Text
dataType) (\s :: OptionSetting
s@OptionSetting' {} Maybe Text
a -> OptionSetting
s {$sel:dataType:OptionSetting' :: Maybe Text
dataType = Maybe Text
a} :: OptionSetting)
optionSetting_allowedValues :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Text)
optionSetting_allowedValues :: (Maybe Text -> f (Maybe Text)) -> OptionSetting -> f OptionSetting
optionSetting_allowedValues = (OptionSetting -> Maybe Text)
-> (OptionSetting -> Maybe Text -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Text
allowedValues :: Maybe Text
$sel:allowedValues:OptionSetting' :: OptionSetting -> Maybe Text
allowedValues} -> Maybe Text
allowedValues) (\s :: OptionSetting
s@OptionSetting' {} Maybe Text
a -> OptionSetting
s {$sel:allowedValues:OptionSetting' :: Maybe Text
allowedValues = Maybe Text
a} :: OptionSetting)
optionSetting_description :: Lens.Lens' OptionSetting (Prelude.Maybe Prelude.Text)
optionSetting_description :: (Maybe Text -> f (Maybe Text)) -> OptionSetting -> f OptionSetting
optionSetting_description = (OptionSetting -> Maybe Text)
-> (OptionSetting -> Maybe Text -> OptionSetting)
-> Lens OptionSetting OptionSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionSetting' {Maybe Text
description :: Maybe Text
$sel:description:OptionSetting' :: OptionSetting -> Maybe Text
description} -> Maybe Text
description) (\s :: OptionSetting
s@OptionSetting' {} Maybe Text
a -> OptionSetting
s {$sel:description:OptionSetting' :: Maybe Text
description = Maybe Text
a} :: OptionSetting)
instance Core.FromXML OptionSetting where
parseXML :: [Node] -> Either String OptionSetting
parseXML [Node]
x =
Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting
OptionSetting'
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
forall (f :: * -> *) a b. Functor 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
"IsCollection")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
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
"ApplyType")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
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
"Value")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
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
"Name")
Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> OptionSetting)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool
-> Maybe Text -> Maybe Text -> Maybe Text -> OptionSetting)
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
"DefaultValue")
Either
String
(Maybe Bool
-> Maybe Text -> Maybe Text -> Maybe Text -> OptionSetting)
-> Either String (Maybe Bool)
-> Either
String (Maybe Text -> Maybe Text -> Maybe Text -> OptionSetting)
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
"IsModifiable")
Either
String (Maybe Text -> Maybe Text -> Maybe Text -> OptionSetting)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> OptionSetting)
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
"DataType")
Either String (Maybe Text -> Maybe Text -> OptionSetting)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> OptionSetting)
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
"AllowedValues")
Either String (Maybe Text -> OptionSetting)
-> Either String (Maybe Text) -> Either String OptionSetting
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
"Description")
instance Prelude.Hashable OptionSetting
instance Prelude.NFData OptionSetting
instance Core.ToQuery OptionSetting where
toQuery :: OptionSetting -> QueryString
toQuery OptionSetting' {Maybe Bool
Maybe Text
description :: Maybe Text
allowedValues :: Maybe Text
dataType :: Maybe Text
isModifiable :: Maybe Bool
defaultValue :: Maybe Text
name :: Maybe Text
value :: Maybe Text
applyType :: Maybe Text
isCollection :: Maybe Bool
$sel:description:OptionSetting' :: OptionSetting -> Maybe Text
$sel:allowedValues:OptionSetting' :: OptionSetting -> Maybe Text
$sel:dataType:OptionSetting' :: OptionSetting -> Maybe Text
$sel:isModifiable:OptionSetting' :: OptionSetting -> Maybe Bool
$sel:defaultValue:OptionSetting' :: OptionSetting -> Maybe Text
$sel:name:OptionSetting' :: OptionSetting -> Maybe Text
$sel:value:OptionSetting' :: OptionSetting -> Maybe Text
$sel:applyType:OptionSetting' :: OptionSetting -> Maybe Text
$sel:isCollection:OptionSetting' :: OptionSetting -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"IsCollection" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
isCollection,
ByteString
"ApplyType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
applyType,
ByteString
"Value" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
value,
ByteString
"Name" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
name,
ByteString
"DefaultValue" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
defaultValue,
ByteString
"IsModifiable" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
isModifiable,
ByteString
"DataType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dataType,
ByteString
"AllowedValues" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
allowedValues,
ByteString
"Description" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
description
]