{-# 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.Neptune.Types.DBParameterGroupNameMessage
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Neptune.Types.DBParameterGroupNameMessage where

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

-- | /See:/ 'newDBParameterGroupNameMessage' smart constructor.
data DBParameterGroupNameMessage = DBParameterGroupNameMessage'
  { -- | Provides the name of the DB parameter group.
    DBParameterGroupNameMessage -> Maybe Text
dbParameterGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (DBParameterGroupNameMessage -> DBParameterGroupNameMessage -> Bool
(DBParameterGroupNameMessage
 -> DBParameterGroupNameMessage -> Bool)
-> (DBParameterGroupNameMessage
    -> DBParameterGroupNameMessage -> Bool)
-> Eq DBParameterGroupNameMessage
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]
(Int -> ReadS DBParameterGroupNameMessage)
-> ReadS [DBParameterGroupNameMessage]
-> ReadPrec DBParameterGroupNameMessage
-> ReadPrec [DBParameterGroupNameMessage]
-> Read 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
(Int -> DBParameterGroupNameMessage -> ShowS)
-> (DBParameterGroupNameMessage -> String)
-> ([DBParameterGroupNameMessage] -> ShowS)
-> Show DBParameterGroupNameMessage
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.
 DBParameterGroupNameMessage -> Rep DBParameterGroupNameMessage x)
-> (forall x.
    Rep DBParameterGroupNameMessage x -> DBParameterGroupNameMessage)
-> Generic DBParameterGroupNameMessage
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' - Provides the name of the DB parameter group.
newDBParameterGroupNameMessage ::
  DBParameterGroupNameMessage
newDBParameterGroupNameMessage :: DBParameterGroupNameMessage
newDBParameterGroupNameMessage =
  DBParameterGroupNameMessage' :: Maybe Text -> DBParameterGroupNameMessage
DBParameterGroupNameMessage'
    { $sel:dbParameterGroupName:DBParameterGroupNameMessage' :: Maybe Text
dbParameterGroupName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Provides the name of the DB parameter group.
dbParameterGroupNameMessage_dbParameterGroupName :: Lens.Lens' DBParameterGroupNameMessage (Prelude.Maybe Prelude.Text)
dbParameterGroupNameMessage_dbParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> DBParameterGroupNameMessage -> f DBParameterGroupNameMessage
dbParameterGroupNameMessage_dbParameterGroupName = (DBParameterGroupNameMessage -> Maybe Text)
-> (DBParameterGroupNameMessage
    -> Maybe Text -> DBParameterGroupNameMessage)
-> Lens
     DBParameterGroupNameMessage
     DBParameterGroupNameMessage
     (Maybe Text)
     (Maybe Text)
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 Core.FromXML DBParameterGroupNameMessage where
  parseXML :: [Node] -> Either String DBParameterGroupNameMessage
parseXML [Node]
x =
    Maybe Text -> DBParameterGroupNameMessage
DBParameterGroupNameMessage'
      (Maybe Text -> DBParameterGroupNameMessage)
-> Either String (Maybe Text)
-> Either String DBParameterGroupNameMessage
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
"DBParameterGroupName")

instance Prelude.Hashable DBParameterGroupNameMessage

instance Prelude.NFData DBParameterGroupNameMessage