{-# 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.DBParameterGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DBParameterGroup = DBParameterGroup'
{
DBParameterGroup -> Maybe Text
dbParameterGroupArn :: Prelude.Maybe Prelude.Text,
DBParameterGroup -> Maybe Text
dbParameterGroupFamily :: Prelude.Maybe Prelude.Text,
DBParameterGroup -> Maybe Text
dbParameterGroupName :: Prelude.Maybe Prelude.Text,
DBParameterGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (DBParameterGroup -> DBParameterGroup -> Bool
(DBParameterGroup -> DBParameterGroup -> Bool)
-> (DBParameterGroup -> DBParameterGroup -> Bool)
-> Eq DBParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBParameterGroup -> DBParameterGroup -> Bool
$c/= :: DBParameterGroup -> DBParameterGroup -> Bool
== :: DBParameterGroup -> DBParameterGroup -> Bool
$c== :: DBParameterGroup -> DBParameterGroup -> Bool
Prelude.Eq, ReadPrec [DBParameterGroup]
ReadPrec DBParameterGroup
Int -> ReadS DBParameterGroup
ReadS [DBParameterGroup]
(Int -> ReadS DBParameterGroup)
-> ReadS [DBParameterGroup]
-> ReadPrec DBParameterGroup
-> ReadPrec [DBParameterGroup]
-> Read DBParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBParameterGroup]
$creadListPrec :: ReadPrec [DBParameterGroup]
readPrec :: ReadPrec DBParameterGroup
$creadPrec :: ReadPrec DBParameterGroup
readList :: ReadS [DBParameterGroup]
$creadList :: ReadS [DBParameterGroup]
readsPrec :: Int -> ReadS DBParameterGroup
$creadsPrec :: Int -> ReadS DBParameterGroup
Prelude.Read, Int -> DBParameterGroup -> ShowS
[DBParameterGroup] -> ShowS
DBParameterGroup -> String
(Int -> DBParameterGroup -> ShowS)
-> (DBParameterGroup -> String)
-> ([DBParameterGroup] -> ShowS)
-> Show DBParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBParameterGroup] -> ShowS
$cshowList :: [DBParameterGroup] -> ShowS
show :: DBParameterGroup -> String
$cshow :: DBParameterGroup -> String
showsPrec :: Int -> DBParameterGroup -> ShowS
$cshowsPrec :: Int -> DBParameterGroup -> ShowS
Prelude.Show, (forall x. DBParameterGroup -> Rep DBParameterGroup x)
-> (forall x. Rep DBParameterGroup x -> DBParameterGroup)
-> Generic DBParameterGroup
forall x. Rep DBParameterGroup x -> DBParameterGroup
forall x. DBParameterGroup -> Rep DBParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBParameterGroup x -> DBParameterGroup
$cfrom :: forall x. DBParameterGroup -> Rep DBParameterGroup x
Prelude.Generic)
newDBParameterGroup ::
DBParameterGroup
newDBParameterGroup :: DBParameterGroup
newDBParameterGroup =
DBParameterGroup' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> DBParameterGroup
DBParameterGroup'
{ $sel:dbParameterGroupArn:DBParameterGroup' :: Maybe Text
dbParameterGroupArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbParameterGroupFamily:DBParameterGroup' :: Maybe Text
dbParameterGroupFamily = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbParameterGroupName:DBParameterGroup' :: Maybe Text
dbParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:DBParameterGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dbParameterGroup_dbParameterGroupArn :: Lens.Lens' DBParameterGroup (Prelude.Maybe Prelude.Text)
dbParameterGroup_dbParameterGroupArn :: (Maybe Text -> f (Maybe Text))
-> DBParameterGroup -> f DBParameterGroup
dbParameterGroup_dbParameterGroupArn = (DBParameterGroup -> Maybe Text)
-> (DBParameterGroup -> Maybe Text -> DBParameterGroup)
-> Lens DBParameterGroup DBParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBParameterGroup' {Maybe Text
dbParameterGroupArn :: Maybe Text
$sel:dbParameterGroupArn:DBParameterGroup' :: DBParameterGroup -> Maybe Text
dbParameterGroupArn} -> Maybe Text
dbParameterGroupArn) (\s :: DBParameterGroup
s@DBParameterGroup' {} Maybe Text
a -> DBParameterGroup
s {$sel:dbParameterGroupArn:DBParameterGroup' :: Maybe Text
dbParameterGroupArn = Maybe Text
a} :: DBParameterGroup)
dbParameterGroup_dbParameterGroupFamily :: Lens.Lens' DBParameterGroup (Prelude.Maybe Prelude.Text)
dbParameterGroup_dbParameterGroupFamily :: (Maybe Text -> f (Maybe Text))
-> DBParameterGroup -> f DBParameterGroup
dbParameterGroup_dbParameterGroupFamily = (DBParameterGroup -> Maybe Text)
-> (DBParameterGroup -> Maybe Text -> DBParameterGroup)
-> Lens DBParameterGroup DBParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBParameterGroup' {Maybe Text
dbParameterGroupFamily :: Maybe Text
$sel:dbParameterGroupFamily:DBParameterGroup' :: DBParameterGroup -> Maybe Text
dbParameterGroupFamily} -> Maybe Text
dbParameterGroupFamily) (\s :: DBParameterGroup
s@DBParameterGroup' {} Maybe Text
a -> DBParameterGroup
s {$sel:dbParameterGroupFamily:DBParameterGroup' :: Maybe Text
dbParameterGroupFamily = Maybe Text
a} :: DBParameterGroup)
dbParameterGroup_dbParameterGroupName :: Lens.Lens' DBParameterGroup (Prelude.Maybe Prelude.Text)
dbParameterGroup_dbParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> DBParameterGroup -> f DBParameterGroup
dbParameterGroup_dbParameterGroupName = (DBParameterGroup -> Maybe Text)
-> (DBParameterGroup -> Maybe Text -> DBParameterGroup)
-> Lens DBParameterGroup DBParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBParameterGroup' {Maybe Text
dbParameterGroupName :: Maybe Text
$sel:dbParameterGroupName:DBParameterGroup' :: DBParameterGroup -> Maybe Text
dbParameterGroupName} -> Maybe Text
dbParameterGroupName) (\s :: DBParameterGroup
s@DBParameterGroup' {} Maybe Text
a -> DBParameterGroup
s {$sel:dbParameterGroupName:DBParameterGroup' :: Maybe Text
dbParameterGroupName = Maybe Text
a} :: DBParameterGroup)
dbParameterGroup_description :: Lens.Lens' DBParameterGroup (Prelude.Maybe Prelude.Text)
dbParameterGroup_description :: (Maybe Text -> f (Maybe Text))
-> DBParameterGroup -> f DBParameterGroup
dbParameterGroup_description = (DBParameterGroup -> Maybe Text)
-> (DBParameterGroup -> Maybe Text -> DBParameterGroup)
-> Lens DBParameterGroup DBParameterGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBParameterGroup' {Maybe Text
description :: Maybe Text
$sel:description:DBParameterGroup' :: DBParameterGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: DBParameterGroup
s@DBParameterGroup' {} Maybe Text
a -> DBParameterGroup
s {$sel:description:DBParameterGroup' :: Maybe Text
description = Maybe Text
a} :: DBParameterGroup)
instance Core.FromXML DBParameterGroup where
parseXML :: [Node] -> Either String DBParameterGroup
parseXML [Node]
x =
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> DBParameterGroup
DBParameterGroup'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> DBParameterGroup)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> Maybe Text -> DBParameterGroup)
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
"DBParameterGroupArn")
Either
String (Maybe Text -> Maybe Text -> Maybe Text -> DBParameterGroup)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> DBParameterGroup)
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
"DBParameterGroupFamily")
Either String (Maybe Text -> Maybe Text -> DBParameterGroup)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> DBParameterGroup)
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
"DBParameterGroupName")
Either String (Maybe Text -> DBParameterGroup)
-> Either String (Maybe Text) -> Either String DBParameterGroup
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 DBParameterGroup
instance Prelude.NFData DBParameterGroup