{-# 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.SecurityHub.Types.AwsRdsDbProcessorFeature where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsRdsDbProcessorFeature = AwsRdsDbProcessorFeature'
{
AwsRdsDbProcessorFeature -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
AwsRdsDbProcessorFeature -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (AwsRdsDbProcessorFeature -> AwsRdsDbProcessorFeature -> Bool
(AwsRdsDbProcessorFeature -> AwsRdsDbProcessorFeature -> Bool)
-> (AwsRdsDbProcessorFeature -> AwsRdsDbProcessorFeature -> Bool)
-> Eq AwsRdsDbProcessorFeature
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsRdsDbProcessorFeature -> AwsRdsDbProcessorFeature -> Bool
$c/= :: AwsRdsDbProcessorFeature -> AwsRdsDbProcessorFeature -> Bool
== :: AwsRdsDbProcessorFeature -> AwsRdsDbProcessorFeature -> Bool
$c== :: AwsRdsDbProcessorFeature -> AwsRdsDbProcessorFeature -> Bool
Prelude.Eq, ReadPrec [AwsRdsDbProcessorFeature]
ReadPrec AwsRdsDbProcessorFeature
Int -> ReadS AwsRdsDbProcessorFeature
ReadS [AwsRdsDbProcessorFeature]
(Int -> ReadS AwsRdsDbProcessorFeature)
-> ReadS [AwsRdsDbProcessorFeature]
-> ReadPrec AwsRdsDbProcessorFeature
-> ReadPrec [AwsRdsDbProcessorFeature]
-> Read AwsRdsDbProcessorFeature
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsRdsDbProcessorFeature]
$creadListPrec :: ReadPrec [AwsRdsDbProcessorFeature]
readPrec :: ReadPrec AwsRdsDbProcessorFeature
$creadPrec :: ReadPrec AwsRdsDbProcessorFeature
readList :: ReadS [AwsRdsDbProcessorFeature]
$creadList :: ReadS [AwsRdsDbProcessorFeature]
readsPrec :: Int -> ReadS AwsRdsDbProcessorFeature
$creadsPrec :: Int -> ReadS AwsRdsDbProcessorFeature
Prelude.Read, Int -> AwsRdsDbProcessorFeature -> ShowS
[AwsRdsDbProcessorFeature] -> ShowS
AwsRdsDbProcessorFeature -> String
(Int -> AwsRdsDbProcessorFeature -> ShowS)
-> (AwsRdsDbProcessorFeature -> String)
-> ([AwsRdsDbProcessorFeature] -> ShowS)
-> Show AwsRdsDbProcessorFeature
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsRdsDbProcessorFeature] -> ShowS
$cshowList :: [AwsRdsDbProcessorFeature] -> ShowS
show :: AwsRdsDbProcessorFeature -> String
$cshow :: AwsRdsDbProcessorFeature -> String
showsPrec :: Int -> AwsRdsDbProcessorFeature -> ShowS
$cshowsPrec :: Int -> AwsRdsDbProcessorFeature -> ShowS
Prelude.Show, (forall x.
AwsRdsDbProcessorFeature -> Rep AwsRdsDbProcessorFeature x)
-> (forall x.
Rep AwsRdsDbProcessorFeature x -> AwsRdsDbProcessorFeature)
-> Generic AwsRdsDbProcessorFeature
forall x.
Rep AwsRdsDbProcessorFeature x -> AwsRdsDbProcessorFeature
forall x.
AwsRdsDbProcessorFeature -> Rep AwsRdsDbProcessorFeature x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsRdsDbProcessorFeature x -> AwsRdsDbProcessorFeature
$cfrom :: forall x.
AwsRdsDbProcessorFeature -> Rep AwsRdsDbProcessorFeature x
Prelude.Generic)
newAwsRdsDbProcessorFeature ::
AwsRdsDbProcessorFeature
newAwsRdsDbProcessorFeature :: AwsRdsDbProcessorFeature
newAwsRdsDbProcessorFeature =
AwsRdsDbProcessorFeature' :: Maybe Text -> Maybe Text -> AwsRdsDbProcessorFeature
AwsRdsDbProcessorFeature'
{ $sel:value:AwsRdsDbProcessorFeature' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:AwsRdsDbProcessorFeature' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsRdsDbProcessorFeature_value :: Lens.Lens' AwsRdsDbProcessorFeature (Prelude.Maybe Prelude.Text)
awsRdsDbProcessorFeature_value :: (Maybe Text -> f (Maybe Text))
-> AwsRdsDbProcessorFeature -> f AwsRdsDbProcessorFeature
awsRdsDbProcessorFeature_value = (AwsRdsDbProcessorFeature -> Maybe Text)
-> (AwsRdsDbProcessorFeature
-> Maybe Text -> AwsRdsDbProcessorFeature)
-> Lens
AwsRdsDbProcessorFeature
AwsRdsDbProcessorFeature
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsDbProcessorFeature' {Maybe Text
value :: Maybe Text
$sel:value:AwsRdsDbProcessorFeature' :: AwsRdsDbProcessorFeature -> Maybe Text
value} -> Maybe Text
value) (\s :: AwsRdsDbProcessorFeature
s@AwsRdsDbProcessorFeature' {} Maybe Text
a -> AwsRdsDbProcessorFeature
s {$sel:value:AwsRdsDbProcessorFeature' :: Maybe Text
value = Maybe Text
a} :: AwsRdsDbProcessorFeature)
awsRdsDbProcessorFeature_name :: Lens.Lens' AwsRdsDbProcessorFeature (Prelude.Maybe Prelude.Text)
awsRdsDbProcessorFeature_name :: (Maybe Text -> f (Maybe Text))
-> AwsRdsDbProcessorFeature -> f AwsRdsDbProcessorFeature
awsRdsDbProcessorFeature_name = (AwsRdsDbProcessorFeature -> Maybe Text)
-> (AwsRdsDbProcessorFeature
-> Maybe Text -> AwsRdsDbProcessorFeature)
-> Lens
AwsRdsDbProcessorFeature
AwsRdsDbProcessorFeature
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsDbProcessorFeature' {Maybe Text
name :: Maybe Text
$sel:name:AwsRdsDbProcessorFeature' :: AwsRdsDbProcessorFeature -> Maybe Text
name} -> Maybe Text
name) (\s :: AwsRdsDbProcessorFeature
s@AwsRdsDbProcessorFeature' {} Maybe Text
a -> AwsRdsDbProcessorFeature
s {$sel:name:AwsRdsDbProcessorFeature' :: Maybe Text
name = Maybe Text
a} :: AwsRdsDbProcessorFeature)
instance Core.FromJSON AwsRdsDbProcessorFeature where
parseJSON :: Value -> Parser AwsRdsDbProcessorFeature
parseJSON =
String
-> (Object -> Parser AwsRdsDbProcessorFeature)
-> Value
-> Parser AwsRdsDbProcessorFeature
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsRdsDbProcessorFeature"
( \Object
x ->
Maybe Text -> Maybe Text -> AwsRdsDbProcessorFeature
AwsRdsDbProcessorFeature'
(Maybe Text -> Maybe Text -> AwsRdsDbProcessorFeature)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsRdsDbProcessorFeature)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Value") Parser (Maybe Text -> AwsRdsDbProcessorFeature)
-> Parser (Maybe Text) -> Parser AwsRdsDbProcessorFeature
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
)
instance Prelude.Hashable AwsRdsDbProcessorFeature
instance Prelude.NFData AwsRdsDbProcessorFeature
instance Core.ToJSON AwsRdsDbProcessorFeature where
toJSON :: AwsRdsDbProcessorFeature -> Value
toJSON AwsRdsDbProcessorFeature' {Maybe Text
name :: Maybe Text
value :: Maybe Text
$sel:name:AwsRdsDbProcessorFeature' :: AwsRdsDbProcessorFeature -> Maybe Text
$sel:value:AwsRdsDbProcessorFeature' :: AwsRdsDbProcessorFeature -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Value" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
value,
(Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name
]
)