{-# 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.AwsRdsDbOptionGroupMembership where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsRdsDbOptionGroupMembership = AwsRdsDbOptionGroupMembership'
{
AwsRdsDbOptionGroupMembership -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
AwsRdsDbOptionGroupMembership -> Maybe Text
optionGroupName :: Prelude.Maybe Prelude.Text
}
deriving (AwsRdsDbOptionGroupMembership
-> AwsRdsDbOptionGroupMembership -> Bool
(AwsRdsDbOptionGroupMembership
-> AwsRdsDbOptionGroupMembership -> Bool)
-> (AwsRdsDbOptionGroupMembership
-> AwsRdsDbOptionGroupMembership -> Bool)
-> Eq AwsRdsDbOptionGroupMembership
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsRdsDbOptionGroupMembership
-> AwsRdsDbOptionGroupMembership -> Bool
$c/= :: AwsRdsDbOptionGroupMembership
-> AwsRdsDbOptionGroupMembership -> Bool
== :: AwsRdsDbOptionGroupMembership
-> AwsRdsDbOptionGroupMembership -> Bool
$c== :: AwsRdsDbOptionGroupMembership
-> AwsRdsDbOptionGroupMembership -> Bool
Prelude.Eq, ReadPrec [AwsRdsDbOptionGroupMembership]
ReadPrec AwsRdsDbOptionGroupMembership
Int -> ReadS AwsRdsDbOptionGroupMembership
ReadS [AwsRdsDbOptionGroupMembership]
(Int -> ReadS AwsRdsDbOptionGroupMembership)
-> ReadS [AwsRdsDbOptionGroupMembership]
-> ReadPrec AwsRdsDbOptionGroupMembership
-> ReadPrec [AwsRdsDbOptionGroupMembership]
-> Read AwsRdsDbOptionGroupMembership
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsRdsDbOptionGroupMembership]
$creadListPrec :: ReadPrec [AwsRdsDbOptionGroupMembership]
readPrec :: ReadPrec AwsRdsDbOptionGroupMembership
$creadPrec :: ReadPrec AwsRdsDbOptionGroupMembership
readList :: ReadS [AwsRdsDbOptionGroupMembership]
$creadList :: ReadS [AwsRdsDbOptionGroupMembership]
readsPrec :: Int -> ReadS AwsRdsDbOptionGroupMembership
$creadsPrec :: Int -> ReadS AwsRdsDbOptionGroupMembership
Prelude.Read, Int -> AwsRdsDbOptionGroupMembership -> ShowS
[AwsRdsDbOptionGroupMembership] -> ShowS
AwsRdsDbOptionGroupMembership -> String
(Int -> AwsRdsDbOptionGroupMembership -> ShowS)
-> (AwsRdsDbOptionGroupMembership -> String)
-> ([AwsRdsDbOptionGroupMembership] -> ShowS)
-> Show AwsRdsDbOptionGroupMembership
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsRdsDbOptionGroupMembership] -> ShowS
$cshowList :: [AwsRdsDbOptionGroupMembership] -> ShowS
show :: AwsRdsDbOptionGroupMembership -> String
$cshow :: AwsRdsDbOptionGroupMembership -> String
showsPrec :: Int -> AwsRdsDbOptionGroupMembership -> ShowS
$cshowsPrec :: Int -> AwsRdsDbOptionGroupMembership -> ShowS
Prelude.Show, (forall x.
AwsRdsDbOptionGroupMembership
-> Rep AwsRdsDbOptionGroupMembership x)
-> (forall x.
Rep AwsRdsDbOptionGroupMembership x
-> AwsRdsDbOptionGroupMembership)
-> Generic AwsRdsDbOptionGroupMembership
forall x.
Rep AwsRdsDbOptionGroupMembership x
-> AwsRdsDbOptionGroupMembership
forall x.
AwsRdsDbOptionGroupMembership
-> Rep AwsRdsDbOptionGroupMembership x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsRdsDbOptionGroupMembership x
-> AwsRdsDbOptionGroupMembership
$cfrom :: forall x.
AwsRdsDbOptionGroupMembership
-> Rep AwsRdsDbOptionGroupMembership x
Prelude.Generic)
newAwsRdsDbOptionGroupMembership ::
AwsRdsDbOptionGroupMembership
newAwsRdsDbOptionGroupMembership :: AwsRdsDbOptionGroupMembership
newAwsRdsDbOptionGroupMembership =
AwsRdsDbOptionGroupMembership' :: Maybe Text -> Maybe Text -> AwsRdsDbOptionGroupMembership
AwsRdsDbOptionGroupMembership'
{ $sel:status:AwsRdsDbOptionGroupMembership' :: Maybe Text
status =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:optionGroupName:AwsRdsDbOptionGroupMembership' :: Maybe Text
optionGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsRdsDbOptionGroupMembership_status :: Lens.Lens' AwsRdsDbOptionGroupMembership (Prelude.Maybe Prelude.Text)
awsRdsDbOptionGroupMembership_status :: (Maybe Text -> f (Maybe Text))
-> AwsRdsDbOptionGroupMembership -> f AwsRdsDbOptionGroupMembership
awsRdsDbOptionGroupMembership_status = (AwsRdsDbOptionGroupMembership -> Maybe Text)
-> (AwsRdsDbOptionGroupMembership
-> Maybe Text -> AwsRdsDbOptionGroupMembership)
-> Lens
AwsRdsDbOptionGroupMembership
AwsRdsDbOptionGroupMembership
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsDbOptionGroupMembership' {Maybe Text
status :: Maybe Text
$sel:status:AwsRdsDbOptionGroupMembership' :: AwsRdsDbOptionGroupMembership -> Maybe Text
status} -> Maybe Text
status) (\s :: AwsRdsDbOptionGroupMembership
s@AwsRdsDbOptionGroupMembership' {} Maybe Text
a -> AwsRdsDbOptionGroupMembership
s {$sel:status:AwsRdsDbOptionGroupMembership' :: Maybe Text
status = Maybe Text
a} :: AwsRdsDbOptionGroupMembership)
awsRdsDbOptionGroupMembership_optionGroupName :: Lens.Lens' AwsRdsDbOptionGroupMembership (Prelude.Maybe Prelude.Text)
awsRdsDbOptionGroupMembership_optionGroupName :: (Maybe Text -> f (Maybe Text))
-> AwsRdsDbOptionGroupMembership -> f AwsRdsDbOptionGroupMembership
awsRdsDbOptionGroupMembership_optionGroupName = (AwsRdsDbOptionGroupMembership -> Maybe Text)
-> (AwsRdsDbOptionGroupMembership
-> Maybe Text -> AwsRdsDbOptionGroupMembership)
-> Lens
AwsRdsDbOptionGroupMembership
AwsRdsDbOptionGroupMembership
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsDbOptionGroupMembership' {Maybe Text
optionGroupName :: Maybe Text
$sel:optionGroupName:AwsRdsDbOptionGroupMembership' :: AwsRdsDbOptionGroupMembership -> Maybe Text
optionGroupName} -> Maybe Text
optionGroupName) (\s :: AwsRdsDbOptionGroupMembership
s@AwsRdsDbOptionGroupMembership' {} Maybe Text
a -> AwsRdsDbOptionGroupMembership
s {$sel:optionGroupName:AwsRdsDbOptionGroupMembership' :: Maybe Text
optionGroupName = Maybe Text
a} :: AwsRdsDbOptionGroupMembership)
instance Core.FromJSON AwsRdsDbOptionGroupMembership where
parseJSON :: Value -> Parser AwsRdsDbOptionGroupMembership
parseJSON =
String
-> (Object -> Parser AwsRdsDbOptionGroupMembership)
-> Value
-> Parser AwsRdsDbOptionGroupMembership
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsRdsDbOptionGroupMembership"
( \Object
x ->
Maybe Text -> Maybe Text -> AwsRdsDbOptionGroupMembership
AwsRdsDbOptionGroupMembership'
(Maybe Text -> Maybe Text -> AwsRdsDbOptionGroupMembership)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AwsRdsDbOptionGroupMembership)
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
"Status")
Parser (Maybe Text -> AwsRdsDbOptionGroupMembership)
-> Parser (Maybe Text) -> Parser AwsRdsDbOptionGroupMembership
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
"OptionGroupName")
)
instance
Prelude.Hashable
AwsRdsDbOptionGroupMembership
instance Prelude.NFData AwsRdsDbOptionGroupMembership
instance Core.ToJSON AwsRdsDbOptionGroupMembership where
toJSON :: AwsRdsDbOptionGroupMembership -> Value
toJSON AwsRdsDbOptionGroupMembership' {Maybe Text
optionGroupName :: Maybe Text
status :: Maybe Text
$sel:optionGroupName:AwsRdsDbOptionGroupMembership' :: AwsRdsDbOptionGroupMembership -> Maybe Text
$sel:status:AwsRdsDbOptionGroupMembership' :: AwsRdsDbOptionGroupMembership -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Status" 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
status,
(Text
"OptionGroupName" 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
optionGroupName
]
)