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

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

-- | The status of the DB parameter group.
--
-- This data type is used as a response element in the following actions:
--
-- -   CreateDBInstance
--
-- -   DeleteDBInstance
--
-- -   ModifyDBInstance
--
-- -   RebootDBInstance
--
-- /See:/ 'newDBParameterGroupStatus' smart constructor.
data DBParameterGroupStatus = DBParameterGroupStatus'
  { -- | The name of the DP parameter group.
    DBParameterGroupStatus -> Maybe Text
dbParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | The status of parameter updates.
    DBParameterGroupStatus -> Maybe Text
parameterApplyStatus :: Prelude.Maybe Prelude.Text
  }
  deriving (DBParameterGroupStatus -> DBParameterGroupStatus -> Bool
(DBParameterGroupStatus -> DBParameterGroupStatus -> Bool)
-> (DBParameterGroupStatus -> DBParameterGroupStatus -> Bool)
-> Eq DBParameterGroupStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBParameterGroupStatus -> DBParameterGroupStatus -> Bool
$c/= :: DBParameterGroupStatus -> DBParameterGroupStatus -> Bool
== :: DBParameterGroupStatus -> DBParameterGroupStatus -> Bool
$c== :: DBParameterGroupStatus -> DBParameterGroupStatus -> Bool
Prelude.Eq, ReadPrec [DBParameterGroupStatus]
ReadPrec DBParameterGroupStatus
Int -> ReadS DBParameterGroupStatus
ReadS [DBParameterGroupStatus]
(Int -> ReadS DBParameterGroupStatus)
-> ReadS [DBParameterGroupStatus]
-> ReadPrec DBParameterGroupStatus
-> ReadPrec [DBParameterGroupStatus]
-> Read DBParameterGroupStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBParameterGroupStatus]
$creadListPrec :: ReadPrec [DBParameterGroupStatus]
readPrec :: ReadPrec DBParameterGroupStatus
$creadPrec :: ReadPrec DBParameterGroupStatus
readList :: ReadS [DBParameterGroupStatus]
$creadList :: ReadS [DBParameterGroupStatus]
readsPrec :: Int -> ReadS DBParameterGroupStatus
$creadsPrec :: Int -> ReadS DBParameterGroupStatus
Prelude.Read, Int -> DBParameterGroupStatus -> ShowS
[DBParameterGroupStatus] -> ShowS
DBParameterGroupStatus -> String
(Int -> DBParameterGroupStatus -> ShowS)
-> (DBParameterGroupStatus -> String)
-> ([DBParameterGroupStatus] -> ShowS)
-> Show DBParameterGroupStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBParameterGroupStatus] -> ShowS
$cshowList :: [DBParameterGroupStatus] -> ShowS
show :: DBParameterGroupStatus -> String
$cshow :: DBParameterGroupStatus -> String
showsPrec :: Int -> DBParameterGroupStatus -> ShowS
$cshowsPrec :: Int -> DBParameterGroupStatus -> ShowS
Prelude.Show, (forall x. DBParameterGroupStatus -> Rep DBParameterGroupStatus x)
-> (forall x.
    Rep DBParameterGroupStatus x -> DBParameterGroupStatus)
-> Generic DBParameterGroupStatus
forall x. Rep DBParameterGroupStatus x -> DBParameterGroupStatus
forall x. DBParameterGroupStatus -> Rep DBParameterGroupStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBParameterGroupStatus x -> DBParameterGroupStatus
$cfrom :: forall x. DBParameterGroupStatus -> Rep DBParameterGroupStatus x
Prelude.Generic)

-- |
-- Create a value of 'DBParameterGroupStatus' 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', 'dbParameterGroupStatus_dbParameterGroupName' - The name of the DP parameter group.
--
-- 'parameterApplyStatus', 'dbParameterGroupStatus_parameterApplyStatus' - The status of parameter updates.
newDBParameterGroupStatus ::
  DBParameterGroupStatus
newDBParameterGroupStatus :: DBParameterGroupStatus
newDBParameterGroupStatus =
  DBParameterGroupStatus' :: Maybe Text -> Maybe Text -> DBParameterGroupStatus
DBParameterGroupStatus'
    { $sel:dbParameterGroupName:DBParameterGroupStatus' :: Maybe Text
dbParameterGroupName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterApplyStatus:DBParameterGroupStatus' :: Maybe Text
parameterApplyStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The status of parameter updates.
dbParameterGroupStatus_parameterApplyStatus :: Lens.Lens' DBParameterGroupStatus (Prelude.Maybe Prelude.Text)
dbParameterGroupStatus_parameterApplyStatus :: (Maybe Text -> f (Maybe Text))
-> DBParameterGroupStatus -> f DBParameterGroupStatus
dbParameterGroupStatus_parameterApplyStatus = (DBParameterGroupStatus -> Maybe Text)
-> (DBParameterGroupStatus -> Maybe Text -> DBParameterGroupStatus)
-> Lens
     DBParameterGroupStatus
     DBParameterGroupStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBParameterGroupStatus' {Maybe Text
parameterApplyStatus :: Maybe Text
$sel:parameterApplyStatus:DBParameterGroupStatus' :: DBParameterGroupStatus -> Maybe Text
parameterApplyStatus} -> Maybe Text
parameterApplyStatus) (\s :: DBParameterGroupStatus
s@DBParameterGroupStatus' {} Maybe Text
a -> DBParameterGroupStatus
s {$sel:parameterApplyStatus:DBParameterGroupStatus' :: Maybe Text
parameterApplyStatus = Maybe Text
a} :: DBParameterGroupStatus)

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

instance Prelude.Hashable DBParameterGroupStatus

instance Prelude.NFData DBParameterGroupStatus