{-# 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-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.DocumentDB.Types.DBClusterParameterGroupNameMessage where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(DBClusterParameterGroupNameMessage
 -> DBClusterParameterGroupNameMessage -> Bool)
-> (DBClusterParameterGroupNameMessage
    -> DBClusterParameterGroupNameMessage -> Bool)
-> Eq DBClusterParameterGroupNameMessage
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]
(Int -> ReadS DBClusterParameterGroupNameMessage)
-> ReadS [DBClusterParameterGroupNameMessage]
-> ReadPrec DBClusterParameterGroupNameMessage
-> ReadPrec [DBClusterParameterGroupNameMessage]
-> Read 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
(Int -> DBClusterParameterGroupNameMessage -> ShowS)
-> (DBClusterParameterGroupNameMessage -> String)
-> ([DBClusterParameterGroupNameMessage] -> ShowS)
-> Show DBClusterParameterGroupNameMessage
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.
 DBClusterParameterGroupNameMessage
 -> Rep DBClusterParameterGroupNameMessage x)
-> (forall x.
    Rep DBClusterParameterGroupNameMessage x
    -> DBClusterParameterGroupNameMessage)
-> Generic DBClusterParameterGroupNameMessage
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' :: Maybe Text -> DBClusterParameterGroupNameMessage
DBClusterParameterGroupNameMessage'
    { $sel:dbClusterParameterGroupName:DBClusterParameterGroupNameMessage' :: Maybe Text
dbClusterParameterGroupName =
        Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> DBClusterParameterGroupNameMessage
-> f DBClusterParameterGroupNameMessage
dbClusterParameterGroupNameMessage_dbClusterParameterGroupName = (DBClusterParameterGroupNameMessage -> Maybe Text)
-> (DBClusterParameterGroupNameMessage
    -> Maybe Text -> DBClusterParameterGroupNameMessage)
-> Lens
     DBClusterParameterGroupNameMessage
     DBClusterParameterGroupNameMessage
     (Maybe Text)
     (Maybe Text)
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
  Core.FromXML
    DBClusterParameterGroupNameMessage
  where
  parseXML :: [Node] -> Either String DBClusterParameterGroupNameMessage
parseXML [Node]
x =
    Maybe Text -> DBClusterParameterGroupNameMessage
DBClusterParameterGroupNameMessage'
      (Maybe Text -> DBClusterParameterGroupNameMessage)
-> Either String (Maybe Text)
-> Either String DBClusterParameterGroupNameMessage
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
"DBClusterParameterGroupName")

instance
  Prelude.Hashable
    DBClusterParameterGroupNameMessage

instance
  Prelude.NFData
    DBClusterParameterGroupNameMessage