{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RDS.Types.DBParameterGroupNameMessage
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.RDS.Types.DBParameterGroupNameMessage where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Contains the result of a successful invocation of the
-- @ModifyDBParameterGroup@ or @ResetDBParameterGroup@ action.
--
-- /See:/ 'newDBParameterGroupNameMessage' smart constructor.
data DBParameterGroupNameMessage = DBParameterGroupNameMessage'
  { -- | The name of the DB parameter group.
    DBParameterGroupNameMessage -> Maybe Text
dbParameterGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (DBParameterGroupNameMessage -> DBParameterGroupNameMessage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBParameterGroupNameMessage -> DBParameterGroupNameMessage -> Bool
$c/= :: DBParameterGroupNameMessage -> DBParameterGroupNameMessage -> Bool
== :: DBParameterGroupNameMessage -> DBParameterGroupNameMessage -> Bool
$c== :: DBParameterGroupNameMessage -> DBParameterGroupNameMessage -> Bool
Prelude.Eq, ReadPrec [DBParameterGroupNameMessage]
ReadPrec DBParameterGroupNameMessage
Int -> ReadS DBParameterGroupNameMessage
ReadS [DBParameterGroupNameMessage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBParameterGroupNameMessage]
$creadListPrec :: ReadPrec [DBParameterGroupNameMessage]
readPrec :: ReadPrec DBParameterGroupNameMessage
$creadPrec :: ReadPrec DBParameterGroupNameMessage
readList :: ReadS [DBParameterGroupNameMessage]
$creadList :: ReadS [DBParameterGroupNameMessage]
readsPrec :: Int -> ReadS DBParameterGroupNameMessage
$creadsPrec :: Int -> ReadS DBParameterGroupNameMessage
Prelude.Read, Int -> DBParameterGroupNameMessage -> ShowS
[DBParameterGroupNameMessage] -> ShowS
DBParameterGroupNameMessage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBParameterGroupNameMessage] -> ShowS
$cshowList :: [DBParameterGroupNameMessage] -> ShowS
show :: DBParameterGroupNameMessage -> String
$cshow :: DBParameterGroupNameMessage -> String
showsPrec :: Int -> DBParameterGroupNameMessage -> ShowS
$cshowsPrec :: Int -> DBParameterGroupNameMessage -> ShowS
Prelude.Show, forall x.
Rep DBParameterGroupNameMessage x -> DBParameterGroupNameMessage
forall x.
DBParameterGroupNameMessage -> Rep DBParameterGroupNameMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DBParameterGroupNameMessage x -> DBParameterGroupNameMessage
$cfrom :: forall x.
DBParameterGroupNameMessage -> Rep DBParameterGroupNameMessage x
Prelude.Generic)

-- |
-- Create a value of 'DBParameterGroupNameMessage' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'dbParameterGroupName', 'dbParameterGroupNameMessage_dbParameterGroupName' - The name of the DB parameter group.
newDBParameterGroupNameMessage ::
  DBParameterGroupNameMessage
newDBParameterGroupNameMessage :: DBParameterGroupNameMessage
newDBParameterGroupNameMessage =
  DBParameterGroupNameMessage'
    { $sel:dbParameterGroupName:DBParameterGroupNameMessage' :: Maybe Text
dbParameterGroupName =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the DB parameter group.
dbParameterGroupNameMessage_dbParameterGroupName :: Lens.Lens' DBParameterGroupNameMessage (Prelude.Maybe Prelude.Text)
dbParameterGroupNameMessage_dbParameterGroupName :: Lens' DBParameterGroupNameMessage (Maybe Text)
dbParameterGroupNameMessage_dbParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBParameterGroupNameMessage' {Maybe Text
dbParameterGroupName :: Maybe Text
$sel:dbParameterGroupName:DBParameterGroupNameMessage' :: DBParameterGroupNameMessage -> Maybe Text
dbParameterGroupName} -> Maybe Text
dbParameterGroupName) (\s :: DBParameterGroupNameMessage
s@DBParameterGroupNameMessage' {} Maybe Text
a -> DBParameterGroupNameMessage
s {$sel:dbParameterGroupName:DBParameterGroupNameMessage' :: Maybe Text
dbParameterGroupName = Maybe Text
a} :: DBParameterGroupNameMessage)

instance Data.FromXML DBParameterGroupNameMessage where
  parseXML :: [Node] -> Either String DBParameterGroupNameMessage
parseXML [Node]
x =
    Maybe Text -> DBParameterGroupNameMessage
DBParameterGroupNameMessage'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBParameterGroupName")

instance Prelude.Hashable DBParameterGroupNameMessage where
  hashWithSalt :: Int -> DBParameterGroupNameMessage -> Int
hashWithSalt Int
_salt DBParameterGroupNameMessage' {Maybe Text
dbParameterGroupName :: Maybe Text
$sel:dbParameterGroupName:DBParameterGroupNameMessage' :: DBParameterGroupNameMessage -> Maybe Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbParameterGroupName

instance Prelude.NFData DBParameterGroupNameMessage where
  rnf :: DBParameterGroupNameMessage -> ()
rnf DBParameterGroupNameMessage' {Maybe Text
dbParameterGroupName :: Maybe Text
$sel:dbParameterGroupName:DBParameterGroupNameMessage' :: DBParameterGroupNameMessage -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbParameterGroupName