{-# 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.DocumentDB.Types.DBClusterParameterGroupNameMessage
-- 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.DocumentDB.Types.DBClusterParameterGroupNameMessage 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 name of a cluster parameter group.
--
-- /See:/ 'newDBClusterParameterGroupNameMessage' smart constructor.
data DBClusterParameterGroupNameMessage = DBClusterParameterGroupNameMessage'
  { -- | The name of a cluster parameter group.
    --
    -- Constraints:
    --
    -- -   Must be from 1 to 255 letters or numbers.
    --
    -- -   The first character must be a letter.
    --
    -- -   Cannot end with a hyphen or contain two consecutive hyphens.
    --
    -- This value is stored as a lowercase string.
    DBClusterParameterGroupNameMessage -> Maybe Text
dbClusterParameterGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (DBClusterParameterGroupNameMessage
-> DBClusterParameterGroupNameMessage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBClusterParameterGroupNameMessage
-> DBClusterParameterGroupNameMessage -> Bool
$c/= :: DBClusterParameterGroupNameMessage
-> DBClusterParameterGroupNameMessage -> Bool
== :: DBClusterParameterGroupNameMessage
-> DBClusterParameterGroupNameMessage -> Bool
$c== :: DBClusterParameterGroupNameMessage
-> DBClusterParameterGroupNameMessage -> Bool
Prelude.Eq, ReadPrec [DBClusterParameterGroupNameMessage]
ReadPrec DBClusterParameterGroupNameMessage
Int -> ReadS DBClusterParameterGroupNameMessage
ReadS [DBClusterParameterGroupNameMessage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBClusterParameterGroupNameMessage]
$creadListPrec :: ReadPrec [DBClusterParameterGroupNameMessage]
readPrec :: ReadPrec DBClusterParameterGroupNameMessage
$creadPrec :: ReadPrec DBClusterParameterGroupNameMessage
readList :: ReadS [DBClusterParameterGroupNameMessage]
$creadList :: ReadS [DBClusterParameterGroupNameMessage]
readsPrec :: Int -> ReadS DBClusterParameterGroupNameMessage
$creadsPrec :: Int -> ReadS DBClusterParameterGroupNameMessage
Prelude.Read, Int -> DBClusterParameterGroupNameMessage -> ShowS
[DBClusterParameterGroupNameMessage] -> ShowS
DBClusterParameterGroupNameMessage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBClusterParameterGroupNameMessage] -> ShowS
$cshowList :: [DBClusterParameterGroupNameMessage] -> ShowS
show :: DBClusterParameterGroupNameMessage -> String
$cshow :: DBClusterParameterGroupNameMessage -> String
showsPrec :: Int -> DBClusterParameterGroupNameMessage -> ShowS
$cshowsPrec :: Int -> DBClusterParameterGroupNameMessage -> ShowS
Prelude.Show, forall x.
Rep DBClusterParameterGroupNameMessage x
-> DBClusterParameterGroupNameMessage
forall x.
DBClusterParameterGroupNameMessage
-> Rep DBClusterParameterGroupNameMessage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DBClusterParameterGroupNameMessage x
-> DBClusterParameterGroupNameMessage
$cfrom :: forall x.
DBClusterParameterGroupNameMessage
-> Rep DBClusterParameterGroupNameMessage x
Prelude.Generic)

-- |
-- Create a value of 'DBClusterParameterGroupNameMessage' 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:
--
-- 'dbClusterParameterGroupName', 'dbClusterParameterGroupNameMessage_dbClusterParameterGroupName' - The name of a cluster parameter group.
--
-- Constraints:
--
-- -   Must be from 1 to 255 letters or numbers.
--
-- -   The first character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- This value is stored as a lowercase string.
newDBClusterParameterGroupNameMessage ::
  DBClusterParameterGroupNameMessage
newDBClusterParameterGroupNameMessage :: DBClusterParameterGroupNameMessage
newDBClusterParameterGroupNameMessage =
  DBClusterParameterGroupNameMessage'
    { $sel:dbClusterParameterGroupName:DBClusterParameterGroupNameMessage' :: Maybe Text
dbClusterParameterGroupName =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The name of a cluster parameter group.
--
-- Constraints:
--
-- -   Must be from 1 to 255 letters or numbers.
--
-- -   The first character must be a letter.
--
-- -   Cannot end with a hyphen or contain two consecutive hyphens.
--
-- This value is stored as a lowercase string.
dbClusterParameterGroupNameMessage_dbClusterParameterGroupName :: Lens.Lens' DBClusterParameterGroupNameMessage (Prelude.Maybe Prelude.Text)
dbClusterParameterGroupNameMessage_dbClusterParameterGroupName :: Lens' DBClusterParameterGroupNameMessage (Maybe Text)
dbClusterParameterGroupNameMessage_dbClusterParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterParameterGroupNameMessage' {Maybe Text
dbClusterParameterGroupName :: Maybe Text
$sel:dbClusterParameterGroupName:DBClusterParameterGroupNameMessage' :: DBClusterParameterGroupNameMessage -> Maybe Text
dbClusterParameterGroupName} -> Maybe Text
dbClusterParameterGroupName) (\s :: DBClusterParameterGroupNameMessage
s@DBClusterParameterGroupNameMessage' {} Maybe Text
a -> DBClusterParameterGroupNameMessage
s {$sel:dbClusterParameterGroupName:DBClusterParameterGroupNameMessage' :: Maybe Text
dbClusterParameterGroupName = Maybe Text
a} :: DBClusterParameterGroupNameMessage)

instance
  Data.FromXML
    DBClusterParameterGroupNameMessage
  where
  parseXML :: [Node] -> Either String DBClusterParameterGroupNameMessage
parseXML [Node]
x =
    Maybe Text -> DBClusterParameterGroupNameMessage
DBClusterParameterGroupNameMessage'
      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
"DBClusterParameterGroupName")

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

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