{-# 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.DBClusterParameterGroup
-- 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.DBClusterParameterGroup where

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

-- | Contains the details of an Amazon Neptune DB cluster parameter group.
--
-- This data type is used as a response element in the
-- DescribeDBClusterParameterGroups action.
--
-- /See:/ 'newDBClusterParameterGroup' smart constructor.
data DBClusterParameterGroup = DBClusterParameterGroup'
  { -- | The Amazon Resource Name (ARN) for the DB cluster parameter group.
    DBClusterParameterGroup -> Maybe Text
dbClusterParameterGroupArn :: Prelude.Maybe Prelude.Text,
    -- | Provides the name of the DB parameter group family that this DB cluster
    -- parameter group is compatible with.
    DBClusterParameterGroup -> Maybe Text
dbParameterGroupFamily :: Prelude.Maybe Prelude.Text,
    -- | Provides the name of the DB cluster parameter group.
    DBClusterParameterGroup -> Maybe Text
dbClusterParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | Provides the customer-specified description for this DB cluster
    -- parameter group.
    DBClusterParameterGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (DBClusterParameterGroup -> DBClusterParameterGroup -> Bool
(DBClusterParameterGroup -> DBClusterParameterGroup -> Bool)
-> (DBClusterParameterGroup -> DBClusterParameterGroup -> Bool)
-> Eq DBClusterParameterGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBClusterParameterGroup -> DBClusterParameterGroup -> Bool
$c/= :: DBClusterParameterGroup -> DBClusterParameterGroup -> Bool
== :: DBClusterParameterGroup -> DBClusterParameterGroup -> Bool
$c== :: DBClusterParameterGroup -> DBClusterParameterGroup -> Bool
Prelude.Eq, ReadPrec [DBClusterParameterGroup]
ReadPrec DBClusterParameterGroup
Int -> ReadS DBClusterParameterGroup
ReadS [DBClusterParameterGroup]
(Int -> ReadS DBClusterParameterGroup)
-> ReadS [DBClusterParameterGroup]
-> ReadPrec DBClusterParameterGroup
-> ReadPrec [DBClusterParameterGroup]
-> Read DBClusterParameterGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBClusterParameterGroup]
$creadListPrec :: ReadPrec [DBClusterParameterGroup]
readPrec :: ReadPrec DBClusterParameterGroup
$creadPrec :: ReadPrec DBClusterParameterGroup
readList :: ReadS [DBClusterParameterGroup]
$creadList :: ReadS [DBClusterParameterGroup]
readsPrec :: Int -> ReadS DBClusterParameterGroup
$creadsPrec :: Int -> ReadS DBClusterParameterGroup
Prelude.Read, Int -> DBClusterParameterGroup -> ShowS
[DBClusterParameterGroup] -> ShowS
DBClusterParameterGroup -> String
(Int -> DBClusterParameterGroup -> ShowS)
-> (DBClusterParameterGroup -> String)
-> ([DBClusterParameterGroup] -> ShowS)
-> Show DBClusterParameterGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBClusterParameterGroup] -> ShowS
$cshowList :: [DBClusterParameterGroup] -> ShowS
show :: DBClusterParameterGroup -> String
$cshow :: DBClusterParameterGroup -> String
showsPrec :: Int -> DBClusterParameterGroup -> ShowS
$cshowsPrec :: Int -> DBClusterParameterGroup -> ShowS
Prelude.Show, (forall x.
 DBClusterParameterGroup -> Rep DBClusterParameterGroup x)
-> (forall x.
    Rep DBClusterParameterGroup x -> DBClusterParameterGroup)
-> Generic DBClusterParameterGroup
forall x. Rep DBClusterParameterGroup x -> DBClusterParameterGroup
forall x. DBClusterParameterGroup -> Rep DBClusterParameterGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBClusterParameterGroup x -> DBClusterParameterGroup
$cfrom :: forall x. DBClusterParameterGroup -> Rep DBClusterParameterGroup x
Prelude.Generic)

-- |
-- Create a value of 'DBClusterParameterGroup' 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:
--
-- 'dbClusterParameterGroupArn', 'dbClusterParameterGroup_dbClusterParameterGroupArn' - The Amazon Resource Name (ARN) for the DB cluster parameter group.
--
-- 'dbParameterGroupFamily', 'dbClusterParameterGroup_dbParameterGroupFamily' - Provides the name of the DB parameter group family that this DB cluster
-- parameter group is compatible with.
--
-- 'dbClusterParameterGroupName', 'dbClusterParameterGroup_dbClusterParameterGroupName' - Provides the name of the DB cluster parameter group.
--
-- 'description', 'dbClusterParameterGroup_description' - Provides the customer-specified description for this DB cluster
-- parameter group.
newDBClusterParameterGroup ::
  DBClusterParameterGroup
newDBClusterParameterGroup :: DBClusterParameterGroup
newDBClusterParameterGroup =
  DBClusterParameterGroup' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DBClusterParameterGroup
DBClusterParameterGroup'
    { $sel:dbClusterParameterGroupArn:DBClusterParameterGroup' :: Maybe Text
dbClusterParameterGroupArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbParameterGroupFamily:DBClusterParameterGroup' :: Maybe Text
dbParameterGroupFamily = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterParameterGroupName:DBClusterParameterGroup' :: Maybe Text
dbClusterParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DBClusterParameterGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) for the DB cluster parameter group.
dbClusterParameterGroup_dbClusterParameterGroupArn :: Lens.Lens' DBClusterParameterGroup (Prelude.Maybe Prelude.Text)
dbClusterParameterGroup_dbClusterParameterGroupArn :: (Maybe Text -> f (Maybe Text))
-> DBClusterParameterGroup -> f DBClusterParameterGroup
dbClusterParameterGroup_dbClusterParameterGroupArn = (DBClusterParameterGroup -> Maybe Text)
-> (DBClusterParameterGroup
    -> Maybe Text -> DBClusterParameterGroup)
-> Lens
     DBClusterParameterGroup
     DBClusterParameterGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterParameterGroup' {Maybe Text
dbClusterParameterGroupArn :: Maybe Text
$sel:dbClusterParameterGroupArn:DBClusterParameterGroup' :: DBClusterParameterGroup -> Maybe Text
dbClusterParameterGroupArn} -> Maybe Text
dbClusterParameterGroupArn) (\s :: DBClusterParameterGroup
s@DBClusterParameterGroup' {} Maybe Text
a -> DBClusterParameterGroup
s {$sel:dbClusterParameterGroupArn:DBClusterParameterGroup' :: Maybe Text
dbClusterParameterGroupArn = Maybe Text
a} :: DBClusterParameterGroup)

-- | Provides the name of the DB parameter group family that this DB cluster
-- parameter group is compatible with.
dbClusterParameterGroup_dbParameterGroupFamily :: Lens.Lens' DBClusterParameterGroup (Prelude.Maybe Prelude.Text)
dbClusterParameterGroup_dbParameterGroupFamily :: (Maybe Text -> f (Maybe Text))
-> DBClusterParameterGroup -> f DBClusterParameterGroup
dbClusterParameterGroup_dbParameterGroupFamily = (DBClusterParameterGroup -> Maybe Text)
-> (DBClusterParameterGroup
    -> Maybe Text -> DBClusterParameterGroup)
-> Lens
     DBClusterParameterGroup
     DBClusterParameterGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterParameterGroup' {Maybe Text
dbParameterGroupFamily :: Maybe Text
$sel:dbParameterGroupFamily:DBClusterParameterGroup' :: DBClusterParameterGroup -> Maybe Text
dbParameterGroupFamily} -> Maybe Text
dbParameterGroupFamily) (\s :: DBClusterParameterGroup
s@DBClusterParameterGroup' {} Maybe Text
a -> DBClusterParameterGroup
s {$sel:dbParameterGroupFamily:DBClusterParameterGroup' :: Maybe Text
dbParameterGroupFamily = Maybe Text
a} :: DBClusterParameterGroup)

-- | Provides the name of the DB cluster parameter group.
dbClusterParameterGroup_dbClusterParameterGroupName :: Lens.Lens' DBClusterParameterGroup (Prelude.Maybe Prelude.Text)
dbClusterParameterGroup_dbClusterParameterGroupName :: (Maybe Text -> f (Maybe Text))
-> DBClusterParameterGroup -> f DBClusterParameterGroup
dbClusterParameterGroup_dbClusterParameterGroupName = (DBClusterParameterGroup -> Maybe Text)
-> (DBClusterParameterGroup
    -> Maybe Text -> DBClusterParameterGroup)
-> Lens
     DBClusterParameterGroup
     DBClusterParameterGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterParameterGroup' {Maybe Text
dbClusterParameterGroupName :: Maybe Text
$sel:dbClusterParameterGroupName:DBClusterParameterGroup' :: DBClusterParameterGroup -> Maybe Text
dbClusterParameterGroupName} -> Maybe Text
dbClusterParameterGroupName) (\s :: DBClusterParameterGroup
s@DBClusterParameterGroup' {} Maybe Text
a -> DBClusterParameterGroup
s {$sel:dbClusterParameterGroupName:DBClusterParameterGroup' :: Maybe Text
dbClusterParameterGroupName = Maybe Text
a} :: DBClusterParameterGroup)

-- | Provides the customer-specified description for this DB cluster
-- parameter group.
dbClusterParameterGroup_description :: Lens.Lens' DBClusterParameterGroup (Prelude.Maybe Prelude.Text)
dbClusterParameterGroup_description :: (Maybe Text -> f (Maybe Text))
-> DBClusterParameterGroup -> f DBClusterParameterGroup
dbClusterParameterGroup_description = (DBClusterParameterGroup -> Maybe Text)
-> (DBClusterParameterGroup
    -> Maybe Text -> DBClusterParameterGroup)
-> Lens
     DBClusterParameterGroup
     DBClusterParameterGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterParameterGroup' {Maybe Text
description :: Maybe Text
$sel:description:DBClusterParameterGroup' :: DBClusterParameterGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: DBClusterParameterGroup
s@DBClusterParameterGroup' {} Maybe Text
a -> DBClusterParameterGroup
s {$sel:description:DBClusterParameterGroup' :: Maybe Text
description = Maybe Text
a} :: DBClusterParameterGroup)

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

instance Prelude.NFData DBClusterParameterGroup