{-# 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 #-}
module Amazonka.RDS.Types.DBClusterMember where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DBClusterMember = DBClusterMember'
{
DBClusterMember -> Maybe Int
promotionTier :: Prelude.Maybe Prelude.Int,
DBClusterMember -> Maybe Text
dbInstanceIdentifier :: Prelude.Maybe Prelude.Text,
DBClusterMember -> Maybe Bool
isClusterWriter :: Prelude.Maybe Prelude.Bool,
DBClusterMember -> Maybe Text
dbClusterParameterGroupStatus :: Prelude.Maybe Prelude.Text
}
deriving (DBClusterMember -> DBClusterMember -> Bool
(DBClusterMember -> DBClusterMember -> Bool)
-> (DBClusterMember -> DBClusterMember -> Bool)
-> Eq DBClusterMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBClusterMember -> DBClusterMember -> Bool
$c/= :: DBClusterMember -> DBClusterMember -> Bool
== :: DBClusterMember -> DBClusterMember -> Bool
$c== :: DBClusterMember -> DBClusterMember -> Bool
Prelude.Eq, ReadPrec [DBClusterMember]
ReadPrec DBClusterMember
Int -> ReadS DBClusterMember
ReadS [DBClusterMember]
(Int -> ReadS DBClusterMember)
-> ReadS [DBClusterMember]
-> ReadPrec DBClusterMember
-> ReadPrec [DBClusterMember]
-> Read DBClusterMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBClusterMember]
$creadListPrec :: ReadPrec [DBClusterMember]
readPrec :: ReadPrec DBClusterMember
$creadPrec :: ReadPrec DBClusterMember
readList :: ReadS [DBClusterMember]
$creadList :: ReadS [DBClusterMember]
readsPrec :: Int -> ReadS DBClusterMember
$creadsPrec :: Int -> ReadS DBClusterMember
Prelude.Read, Int -> DBClusterMember -> ShowS
[DBClusterMember] -> ShowS
DBClusterMember -> String
(Int -> DBClusterMember -> ShowS)
-> (DBClusterMember -> String)
-> ([DBClusterMember] -> ShowS)
-> Show DBClusterMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBClusterMember] -> ShowS
$cshowList :: [DBClusterMember] -> ShowS
show :: DBClusterMember -> String
$cshow :: DBClusterMember -> String
showsPrec :: Int -> DBClusterMember -> ShowS
$cshowsPrec :: Int -> DBClusterMember -> ShowS
Prelude.Show, (forall x. DBClusterMember -> Rep DBClusterMember x)
-> (forall x. Rep DBClusterMember x -> DBClusterMember)
-> Generic DBClusterMember
forall x. Rep DBClusterMember x -> DBClusterMember
forall x. DBClusterMember -> Rep DBClusterMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBClusterMember x -> DBClusterMember
$cfrom :: forall x. DBClusterMember -> Rep DBClusterMember x
Prelude.Generic)
newDBClusterMember ::
DBClusterMember
newDBClusterMember :: DBClusterMember
newDBClusterMember =
DBClusterMember' :: Maybe Int
-> Maybe Text -> Maybe Bool -> Maybe Text -> DBClusterMember
DBClusterMember'
{ $sel:promotionTier:DBClusterMember' :: Maybe Int
promotionTier = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:dbInstanceIdentifier:DBClusterMember' :: Maybe Text
dbInstanceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isClusterWriter:DBClusterMember' :: Maybe Bool
isClusterWriter = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:dbClusterParameterGroupStatus:DBClusterMember' :: Maybe Text
dbClusterParameterGroupStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dbClusterMember_promotionTier :: Lens.Lens' DBClusterMember (Prelude.Maybe Prelude.Int)
dbClusterMember_promotionTier :: (Maybe Int -> f (Maybe Int))
-> DBClusterMember -> f DBClusterMember
dbClusterMember_promotionTier = (DBClusterMember -> Maybe Int)
-> (DBClusterMember -> Maybe Int -> DBClusterMember)
-> Lens DBClusterMember DBClusterMember (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterMember' {Maybe Int
promotionTier :: Maybe Int
$sel:promotionTier:DBClusterMember' :: DBClusterMember -> Maybe Int
promotionTier} -> Maybe Int
promotionTier) (\s :: DBClusterMember
s@DBClusterMember' {} Maybe Int
a -> DBClusterMember
s {$sel:promotionTier:DBClusterMember' :: Maybe Int
promotionTier = Maybe Int
a} :: DBClusterMember)
dbClusterMember_dbInstanceIdentifier :: Lens.Lens' DBClusterMember (Prelude.Maybe Prelude.Text)
dbClusterMember_dbInstanceIdentifier :: (Maybe Text -> f (Maybe Text))
-> DBClusterMember -> f DBClusterMember
dbClusterMember_dbInstanceIdentifier = (DBClusterMember -> Maybe Text)
-> (DBClusterMember -> Maybe Text -> DBClusterMember)
-> Lens DBClusterMember DBClusterMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterMember' {Maybe Text
dbInstanceIdentifier :: Maybe Text
$sel:dbInstanceIdentifier:DBClusterMember' :: DBClusterMember -> Maybe Text
dbInstanceIdentifier} -> Maybe Text
dbInstanceIdentifier) (\s :: DBClusterMember
s@DBClusterMember' {} Maybe Text
a -> DBClusterMember
s {$sel:dbInstanceIdentifier:DBClusterMember' :: Maybe Text
dbInstanceIdentifier = Maybe Text
a} :: DBClusterMember)
dbClusterMember_isClusterWriter :: Lens.Lens' DBClusterMember (Prelude.Maybe Prelude.Bool)
dbClusterMember_isClusterWriter :: (Maybe Bool -> f (Maybe Bool))
-> DBClusterMember -> f DBClusterMember
dbClusterMember_isClusterWriter = (DBClusterMember -> Maybe Bool)
-> (DBClusterMember -> Maybe Bool -> DBClusterMember)
-> Lens DBClusterMember DBClusterMember (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterMember' {Maybe Bool
isClusterWriter :: Maybe Bool
$sel:isClusterWriter:DBClusterMember' :: DBClusterMember -> Maybe Bool
isClusterWriter} -> Maybe Bool
isClusterWriter) (\s :: DBClusterMember
s@DBClusterMember' {} Maybe Bool
a -> DBClusterMember
s {$sel:isClusterWriter:DBClusterMember' :: Maybe Bool
isClusterWriter = Maybe Bool
a} :: DBClusterMember)
dbClusterMember_dbClusterParameterGroupStatus :: Lens.Lens' DBClusterMember (Prelude.Maybe Prelude.Text)
dbClusterMember_dbClusterParameterGroupStatus :: (Maybe Text -> f (Maybe Text))
-> DBClusterMember -> f DBClusterMember
dbClusterMember_dbClusterParameterGroupStatus = (DBClusterMember -> Maybe Text)
-> (DBClusterMember -> Maybe Text -> DBClusterMember)
-> Lens DBClusterMember DBClusterMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterMember' {Maybe Text
dbClusterParameterGroupStatus :: Maybe Text
$sel:dbClusterParameterGroupStatus:DBClusterMember' :: DBClusterMember -> Maybe Text
dbClusterParameterGroupStatus} -> Maybe Text
dbClusterParameterGroupStatus) (\s :: DBClusterMember
s@DBClusterMember' {} Maybe Text
a -> DBClusterMember
s {$sel:dbClusterParameterGroupStatus:DBClusterMember' :: Maybe Text
dbClusterParameterGroupStatus = Maybe Text
a} :: DBClusterMember)
instance Core.FromXML DBClusterMember where
parseXML :: [Node] -> Either String DBClusterMember
parseXML [Node]
x =
Maybe Int
-> Maybe Text -> Maybe Bool -> Maybe Text -> DBClusterMember
DBClusterMember'
(Maybe Int
-> Maybe Text -> Maybe Bool -> Maybe Text -> DBClusterMember)
-> Either String (Maybe Int)
-> Either
String (Maybe Text -> Maybe Bool -> Maybe Text -> DBClusterMember)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PromotionTier")
Either
String (Maybe Text -> Maybe Bool -> Maybe Text -> DBClusterMember)
-> Either String (Maybe Text)
-> Either String (Maybe Bool -> Maybe Text -> DBClusterMember)
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
"DBInstanceIdentifier")
Either String (Maybe Bool -> Maybe Text -> DBClusterMember)
-> Either String (Maybe Bool)
-> Either String (Maybe Text -> DBClusterMember)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsClusterWriter")
Either String (Maybe Text -> DBClusterMember)
-> Either String (Maybe Text) -> Either String DBClusterMember
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
"DBClusterParameterGroupStatus")
instance Prelude.Hashable DBClusterMember
instance Prelude.NFData DBClusterMember