{-# 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.RDS.Types.DBClusterOptionGroupStatus
-- 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.RDS.Types.DBClusterOptionGroupStatus where

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

-- | Contains status information for a DB cluster option group.
--
-- /See:/ 'newDBClusterOptionGroupStatus' smart constructor.
data DBClusterOptionGroupStatus = DBClusterOptionGroupStatus'
  { -- | Specifies the status of the DB cluster option group.
    DBClusterOptionGroupStatus -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the DB cluster option group.
    DBClusterOptionGroupStatus -> Maybe Text
dbClusterOptionGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (DBClusterOptionGroupStatus -> DBClusterOptionGroupStatus -> Bool
(DBClusterOptionGroupStatus -> DBClusterOptionGroupStatus -> Bool)
-> (DBClusterOptionGroupStatus
    -> DBClusterOptionGroupStatus -> Bool)
-> Eq DBClusterOptionGroupStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBClusterOptionGroupStatus -> DBClusterOptionGroupStatus -> Bool
$c/= :: DBClusterOptionGroupStatus -> DBClusterOptionGroupStatus -> Bool
== :: DBClusterOptionGroupStatus -> DBClusterOptionGroupStatus -> Bool
$c== :: DBClusterOptionGroupStatus -> DBClusterOptionGroupStatus -> Bool
Prelude.Eq, ReadPrec [DBClusterOptionGroupStatus]
ReadPrec DBClusterOptionGroupStatus
Int -> ReadS DBClusterOptionGroupStatus
ReadS [DBClusterOptionGroupStatus]
(Int -> ReadS DBClusterOptionGroupStatus)
-> ReadS [DBClusterOptionGroupStatus]
-> ReadPrec DBClusterOptionGroupStatus
-> ReadPrec [DBClusterOptionGroupStatus]
-> Read DBClusterOptionGroupStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBClusterOptionGroupStatus]
$creadListPrec :: ReadPrec [DBClusterOptionGroupStatus]
readPrec :: ReadPrec DBClusterOptionGroupStatus
$creadPrec :: ReadPrec DBClusterOptionGroupStatus
readList :: ReadS [DBClusterOptionGroupStatus]
$creadList :: ReadS [DBClusterOptionGroupStatus]
readsPrec :: Int -> ReadS DBClusterOptionGroupStatus
$creadsPrec :: Int -> ReadS DBClusterOptionGroupStatus
Prelude.Read, Int -> DBClusterOptionGroupStatus -> ShowS
[DBClusterOptionGroupStatus] -> ShowS
DBClusterOptionGroupStatus -> String
(Int -> DBClusterOptionGroupStatus -> ShowS)
-> (DBClusterOptionGroupStatus -> String)
-> ([DBClusterOptionGroupStatus] -> ShowS)
-> Show DBClusterOptionGroupStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBClusterOptionGroupStatus] -> ShowS
$cshowList :: [DBClusterOptionGroupStatus] -> ShowS
show :: DBClusterOptionGroupStatus -> String
$cshow :: DBClusterOptionGroupStatus -> String
showsPrec :: Int -> DBClusterOptionGroupStatus -> ShowS
$cshowsPrec :: Int -> DBClusterOptionGroupStatus -> ShowS
Prelude.Show, (forall x.
 DBClusterOptionGroupStatus -> Rep DBClusterOptionGroupStatus x)
-> (forall x.
    Rep DBClusterOptionGroupStatus x -> DBClusterOptionGroupStatus)
-> Generic DBClusterOptionGroupStatus
forall x.
Rep DBClusterOptionGroupStatus x -> DBClusterOptionGroupStatus
forall x.
DBClusterOptionGroupStatus -> Rep DBClusterOptionGroupStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DBClusterOptionGroupStatus x -> DBClusterOptionGroupStatus
$cfrom :: forall x.
DBClusterOptionGroupStatus -> Rep DBClusterOptionGroupStatus x
Prelude.Generic)

-- |
-- Create a value of 'DBClusterOptionGroupStatus' 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:
--
-- 'status', 'dbClusterOptionGroupStatus_status' - Specifies the status of the DB cluster option group.
--
-- 'dbClusterOptionGroupName', 'dbClusterOptionGroupStatus_dbClusterOptionGroupName' - Specifies the name of the DB cluster option group.
newDBClusterOptionGroupStatus ::
  DBClusterOptionGroupStatus
newDBClusterOptionGroupStatus :: DBClusterOptionGroupStatus
newDBClusterOptionGroupStatus =
  DBClusterOptionGroupStatus' :: Maybe Text -> Maybe Text -> DBClusterOptionGroupStatus
DBClusterOptionGroupStatus'
    { $sel:status:DBClusterOptionGroupStatus' :: Maybe Text
status =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterOptionGroupName:DBClusterOptionGroupStatus' :: Maybe Text
dbClusterOptionGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies the status of the DB cluster option group.
dbClusterOptionGroupStatus_status :: Lens.Lens' DBClusterOptionGroupStatus (Prelude.Maybe Prelude.Text)
dbClusterOptionGroupStatus_status :: (Maybe Text -> f (Maybe Text))
-> DBClusterOptionGroupStatus -> f DBClusterOptionGroupStatus
dbClusterOptionGroupStatus_status = (DBClusterOptionGroupStatus -> Maybe Text)
-> (DBClusterOptionGroupStatus
    -> Maybe Text -> DBClusterOptionGroupStatus)
-> Lens
     DBClusterOptionGroupStatus
     DBClusterOptionGroupStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterOptionGroupStatus' {Maybe Text
status :: Maybe Text
$sel:status:DBClusterOptionGroupStatus' :: DBClusterOptionGroupStatus -> Maybe Text
status} -> Maybe Text
status) (\s :: DBClusterOptionGroupStatus
s@DBClusterOptionGroupStatus' {} Maybe Text
a -> DBClusterOptionGroupStatus
s {$sel:status:DBClusterOptionGroupStatus' :: Maybe Text
status = Maybe Text
a} :: DBClusterOptionGroupStatus)

-- | Specifies the name of the DB cluster option group.
dbClusterOptionGroupStatus_dbClusterOptionGroupName :: Lens.Lens' DBClusterOptionGroupStatus (Prelude.Maybe Prelude.Text)
dbClusterOptionGroupStatus_dbClusterOptionGroupName :: (Maybe Text -> f (Maybe Text))
-> DBClusterOptionGroupStatus -> f DBClusterOptionGroupStatus
dbClusterOptionGroupStatus_dbClusterOptionGroupName = (DBClusterOptionGroupStatus -> Maybe Text)
-> (DBClusterOptionGroupStatus
    -> Maybe Text -> DBClusterOptionGroupStatus)
-> Lens
     DBClusterOptionGroupStatus
     DBClusterOptionGroupStatus
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterOptionGroupStatus' {Maybe Text
dbClusterOptionGroupName :: Maybe Text
$sel:dbClusterOptionGroupName:DBClusterOptionGroupStatus' :: DBClusterOptionGroupStatus -> Maybe Text
dbClusterOptionGroupName} -> Maybe Text
dbClusterOptionGroupName) (\s :: DBClusterOptionGroupStatus
s@DBClusterOptionGroupStatus' {} Maybe Text
a -> DBClusterOptionGroupStatus
s {$sel:dbClusterOptionGroupName:DBClusterOptionGroupStatus' :: Maybe Text
dbClusterOptionGroupName = Maybe Text
a} :: DBClusterOptionGroupStatus)

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

instance Prelude.Hashable DBClusterOptionGroupStatus

instance Prelude.NFData DBClusterOptionGroupStatus