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