{-# 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.ElasticBeanstalk.Types.ConfigurationOptionSetting where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConfigurationOptionSetting = ConfigurationOptionSetting'
{
ConfigurationOptionSetting -> Maybe Text
optionName :: Prelude.Maybe Prelude.Text,
ConfigurationOptionSetting -> Maybe Text
resourceName :: Prelude.Maybe Prelude.Text,
ConfigurationOptionSetting -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
ConfigurationOptionSetting -> Maybe Text
value :: Prelude.Maybe Prelude.Text
}
deriving (ConfigurationOptionSetting -> ConfigurationOptionSetting -> Bool
(ConfigurationOptionSetting -> ConfigurationOptionSetting -> Bool)
-> (ConfigurationOptionSetting
-> ConfigurationOptionSetting -> Bool)
-> Eq ConfigurationOptionSetting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationOptionSetting -> ConfigurationOptionSetting -> Bool
$c/= :: ConfigurationOptionSetting -> ConfigurationOptionSetting -> Bool
== :: ConfigurationOptionSetting -> ConfigurationOptionSetting -> Bool
$c== :: ConfigurationOptionSetting -> ConfigurationOptionSetting -> Bool
Prelude.Eq, ReadPrec [ConfigurationOptionSetting]
ReadPrec ConfigurationOptionSetting
Int -> ReadS ConfigurationOptionSetting
ReadS [ConfigurationOptionSetting]
(Int -> ReadS ConfigurationOptionSetting)
-> ReadS [ConfigurationOptionSetting]
-> ReadPrec ConfigurationOptionSetting
-> ReadPrec [ConfigurationOptionSetting]
-> Read ConfigurationOptionSetting
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationOptionSetting]
$creadListPrec :: ReadPrec [ConfigurationOptionSetting]
readPrec :: ReadPrec ConfigurationOptionSetting
$creadPrec :: ReadPrec ConfigurationOptionSetting
readList :: ReadS [ConfigurationOptionSetting]
$creadList :: ReadS [ConfigurationOptionSetting]
readsPrec :: Int -> ReadS ConfigurationOptionSetting
$creadsPrec :: Int -> ReadS ConfigurationOptionSetting
Prelude.Read, Int -> ConfigurationOptionSetting -> ShowS
[ConfigurationOptionSetting] -> ShowS
ConfigurationOptionSetting -> String
(Int -> ConfigurationOptionSetting -> ShowS)
-> (ConfigurationOptionSetting -> String)
-> ([ConfigurationOptionSetting] -> ShowS)
-> Show ConfigurationOptionSetting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationOptionSetting] -> ShowS
$cshowList :: [ConfigurationOptionSetting] -> ShowS
show :: ConfigurationOptionSetting -> String
$cshow :: ConfigurationOptionSetting -> String
showsPrec :: Int -> ConfigurationOptionSetting -> ShowS
$cshowsPrec :: Int -> ConfigurationOptionSetting -> ShowS
Prelude.Show, (forall x.
ConfigurationOptionSetting -> Rep ConfigurationOptionSetting x)
-> (forall x.
Rep ConfigurationOptionSetting x -> ConfigurationOptionSetting)
-> Generic ConfigurationOptionSetting
forall x.
Rep ConfigurationOptionSetting x -> ConfigurationOptionSetting
forall x.
ConfigurationOptionSetting -> Rep ConfigurationOptionSetting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigurationOptionSetting x -> ConfigurationOptionSetting
$cfrom :: forall x.
ConfigurationOptionSetting -> Rep ConfigurationOptionSetting x
Prelude.Generic)
newConfigurationOptionSetting ::
ConfigurationOptionSetting
newConfigurationOptionSetting :: ConfigurationOptionSetting
newConfigurationOptionSetting =
ConfigurationOptionSetting' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationOptionSetting
ConfigurationOptionSetting'
{ $sel:optionName:ConfigurationOptionSetting' :: Maybe Text
optionName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceName:ConfigurationOptionSetting' :: Maybe Text
resourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:namespace:ConfigurationOptionSetting' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:value:ConfigurationOptionSetting' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
configurationOptionSetting_optionName :: Lens.Lens' ConfigurationOptionSetting (Prelude.Maybe Prelude.Text)
configurationOptionSetting_optionName :: (Maybe Text -> f (Maybe Text))
-> ConfigurationOptionSetting -> f ConfigurationOptionSetting
configurationOptionSetting_optionName = (ConfigurationOptionSetting -> Maybe Text)
-> (ConfigurationOptionSetting
-> Maybe Text -> ConfigurationOptionSetting)
-> Lens
ConfigurationOptionSetting
ConfigurationOptionSetting
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionSetting' {Maybe Text
optionName :: Maybe Text
$sel:optionName:ConfigurationOptionSetting' :: ConfigurationOptionSetting -> Maybe Text
optionName} -> Maybe Text
optionName) (\s :: ConfigurationOptionSetting
s@ConfigurationOptionSetting' {} Maybe Text
a -> ConfigurationOptionSetting
s {$sel:optionName:ConfigurationOptionSetting' :: Maybe Text
optionName = Maybe Text
a} :: ConfigurationOptionSetting)
configurationOptionSetting_resourceName :: Lens.Lens' ConfigurationOptionSetting (Prelude.Maybe Prelude.Text)
configurationOptionSetting_resourceName :: (Maybe Text -> f (Maybe Text))
-> ConfigurationOptionSetting -> f ConfigurationOptionSetting
configurationOptionSetting_resourceName = (ConfigurationOptionSetting -> Maybe Text)
-> (ConfigurationOptionSetting
-> Maybe Text -> ConfigurationOptionSetting)
-> Lens
ConfigurationOptionSetting
ConfigurationOptionSetting
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionSetting' {Maybe Text
resourceName :: Maybe Text
$sel:resourceName:ConfigurationOptionSetting' :: ConfigurationOptionSetting -> Maybe Text
resourceName} -> Maybe Text
resourceName) (\s :: ConfigurationOptionSetting
s@ConfigurationOptionSetting' {} Maybe Text
a -> ConfigurationOptionSetting
s {$sel:resourceName:ConfigurationOptionSetting' :: Maybe Text
resourceName = Maybe Text
a} :: ConfigurationOptionSetting)
configurationOptionSetting_namespace :: Lens.Lens' ConfigurationOptionSetting (Prelude.Maybe Prelude.Text)
configurationOptionSetting_namespace :: (Maybe Text -> f (Maybe Text))
-> ConfigurationOptionSetting -> f ConfigurationOptionSetting
configurationOptionSetting_namespace = (ConfigurationOptionSetting -> Maybe Text)
-> (ConfigurationOptionSetting
-> Maybe Text -> ConfigurationOptionSetting)
-> Lens
ConfigurationOptionSetting
ConfigurationOptionSetting
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionSetting' {Maybe Text
namespace :: Maybe Text
$sel:namespace:ConfigurationOptionSetting' :: ConfigurationOptionSetting -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: ConfigurationOptionSetting
s@ConfigurationOptionSetting' {} Maybe Text
a -> ConfigurationOptionSetting
s {$sel:namespace:ConfigurationOptionSetting' :: Maybe Text
namespace = Maybe Text
a} :: ConfigurationOptionSetting)
configurationOptionSetting_value :: Lens.Lens' ConfigurationOptionSetting (Prelude.Maybe Prelude.Text)
configurationOptionSetting_value :: (Maybe Text -> f (Maybe Text))
-> ConfigurationOptionSetting -> f ConfigurationOptionSetting
configurationOptionSetting_value = (ConfigurationOptionSetting -> Maybe Text)
-> (ConfigurationOptionSetting
-> Maybe Text -> ConfigurationOptionSetting)
-> Lens
ConfigurationOptionSetting
ConfigurationOptionSetting
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionSetting' {Maybe Text
value :: Maybe Text
$sel:value:ConfigurationOptionSetting' :: ConfigurationOptionSetting -> Maybe Text
value} -> Maybe Text
value) (\s :: ConfigurationOptionSetting
s@ConfigurationOptionSetting' {} Maybe Text
a -> ConfigurationOptionSetting
s {$sel:value:ConfigurationOptionSetting' :: Maybe Text
value = Maybe Text
a} :: ConfigurationOptionSetting)
instance Core.FromXML ConfigurationOptionSetting where
parseXML :: [Node] -> Either String ConfigurationOptionSetting
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationOptionSetting
ConfigurationOptionSetting'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationOptionSetting)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> ConfigurationOptionSetting)
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 Text
-> Maybe Text -> Maybe Text -> ConfigurationOptionSetting)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> ConfigurationOptionSetting)
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
"ResourceName")
Either
String (Maybe Text -> Maybe Text -> ConfigurationOptionSetting)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> ConfigurationOptionSetting)
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
"Namespace")
Either String (Maybe Text -> ConfigurationOptionSetting)
-> Either String (Maybe Text)
-> Either String ConfigurationOptionSetting
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")
instance Prelude.Hashable ConfigurationOptionSetting
instance Prelude.NFData ConfigurationOptionSetting
instance Core.ToQuery ConfigurationOptionSetting where
toQuery :: ConfigurationOptionSetting -> QueryString
toQuery ConfigurationOptionSetting' {Maybe Text
value :: Maybe Text
namespace :: Maybe Text
resourceName :: Maybe Text
optionName :: Maybe Text
$sel:value:ConfigurationOptionSetting' :: ConfigurationOptionSetting -> Maybe Text
$sel:namespace:ConfigurationOptionSetting' :: ConfigurationOptionSetting -> Maybe Text
$sel:resourceName:ConfigurationOptionSetting' :: ConfigurationOptionSetting -> Maybe Text
$sel:optionName:ConfigurationOptionSetting' :: ConfigurationOptionSetting -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"OptionName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
optionName,
ByteString
"ResourceName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
resourceName,
ByteString
"Namespace" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
namespace,
ByteString
"Value" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
value
]