{-# 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.GlobalCluster where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types.FailoverState
import Amazonka.RDS.Types.GlobalClusterMember
data GlobalCluster = GlobalCluster'
{
GlobalCluster -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
GlobalCluster -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
GlobalCluster -> Maybe Bool
deletionProtection :: Prelude.Maybe Prelude.Bool,
GlobalCluster -> Maybe Bool
storageEncrypted :: Prelude.Maybe Prelude.Bool,
GlobalCluster -> Maybe Text
globalClusterIdentifier :: Prelude.Maybe Prelude.Text,
GlobalCluster -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
GlobalCluster -> Maybe Text
globalClusterArn :: Prelude.Maybe Prelude.Text,
GlobalCluster -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
GlobalCluster -> Maybe [GlobalClusterMember]
globalClusterMembers :: Prelude.Maybe [GlobalClusterMember],
GlobalCluster -> Maybe FailoverState
failoverState :: Prelude.Maybe FailoverState,
GlobalCluster -> Maybe Text
globalClusterResourceId :: Prelude.Maybe Prelude.Text
}
deriving (GlobalCluster -> GlobalCluster -> Bool
(GlobalCluster -> GlobalCluster -> Bool)
-> (GlobalCluster -> GlobalCluster -> Bool) -> Eq GlobalCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlobalCluster -> GlobalCluster -> Bool
$c/= :: GlobalCluster -> GlobalCluster -> Bool
== :: GlobalCluster -> GlobalCluster -> Bool
$c== :: GlobalCluster -> GlobalCluster -> Bool
Prelude.Eq, ReadPrec [GlobalCluster]
ReadPrec GlobalCluster
Int -> ReadS GlobalCluster
ReadS [GlobalCluster]
(Int -> ReadS GlobalCluster)
-> ReadS [GlobalCluster]
-> ReadPrec GlobalCluster
-> ReadPrec [GlobalCluster]
-> Read GlobalCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlobalCluster]
$creadListPrec :: ReadPrec [GlobalCluster]
readPrec :: ReadPrec GlobalCluster
$creadPrec :: ReadPrec GlobalCluster
readList :: ReadS [GlobalCluster]
$creadList :: ReadS [GlobalCluster]
readsPrec :: Int -> ReadS GlobalCluster
$creadsPrec :: Int -> ReadS GlobalCluster
Prelude.Read, Int -> GlobalCluster -> ShowS
[GlobalCluster] -> ShowS
GlobalCluster -> String
(Int -> GlobalCluster -> ShowS)
-> (GlobalCluster -> String)
-> ([GlobalCluster] -> ShowS)
-> Show GlobalCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlobalCluster] -> ShowS
$cshowList :: [GlobalCluster] -> ShowS
show :: GlobalCluster -> String
$cshow :: GlobalCluster -> String
showsPrec :: Int -> GlobalCluster -> ShowS
$cshowsPrec :: Int -> GlobalCluster -> ShowS
Prelude.Show, (forall x. GlobalCluster -> Rep GlobalCluster x)
-> (forall x. Rep GlobalCluster x -> GlobalCluster)
-> Generic GlobalCluster
forall x. Rep GlobalCluster x -> GlobalCluster
forall x. GlobalCluster -> Rep GlobalCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GlobalCluster x -> GlobalCluster
$cfrom :: forall x. GlobalCluster -> Rep GlobalCluster x
Prelude.Generic)
newGlobalCluster ::
GlobalCluster
newGlobalCluster :: GlobalCluster
newGlobalCluster =
GlobalCluster' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster
GlobalCluster'
{ $sel:engineVersion:GlobalCluster' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:GlobalCluster' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deletionProtection:GlobalCluster' :: Maybe Bool
deletionProtection = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:storageEncrypted:GlobalCluster' :: Maybe Bool
storageEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:globalClusterIdentifier:GlobalCluster' :: Maybe Text
globalClusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engine:GlobalCluster' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:globalClusterArn:GlobalCluster' :: Maybe Text
globalClusterArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:databaseName:GlobalCluster' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:globalClusterMembers:GlobalCluster' :: Maybe [GlobalClusterMember]
globalClusterMembers = Maybe [GlobalClusterMember]
forall a. Maybe a
Prelude.Nothing,
$sel:failoverState:GlobalCluster' :: Maybe FailoverState
failoverState = Maybe FailoverState
forall a. Maybe a
Prelude.Nothing,
$sel:globalClusterResourceId:GlobalCluster' :: Maybe Text
globalClusterResourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
globalCluster_engineVersion :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Text)
globalCluster_engineVersion :: (Maybe Text -> f (Maybe Text)) -> GlobalCluster -> f GlobalCluster
globalCluster_engineVersion = (GlobalCluster -> Maybe Text)
-> (GlobalCluster -> Maybe Text -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:GlobalCluster' :: GlobalCluster -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Text
a -> GlobalCluster
s {$sel:engineVersion:GlobalCluster' :: Maybe Text
engineVersion = Maybe Text
a} :: GlobalCluster)
globalCluster_status :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Text)
globalCluster_status :: (Maybe Text -> f (Maybe Text)) -> GlobalCluster -> f GlobalCluster
globalCluster_status = (GlobalCluster -> Maybe Text)
-> (GlobalCluster -> Maybe Text -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Text
status :: Maybe Text
$sel:status:GlobalCluster' :: GlobalCluster -> Maybe Text
status} -> Maybe Text
status) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Text
a -> GlobalCluster
s {$sel:status:GlobalCluster' :: Maybe Text
status = Maybe Text
a} :: GlobalCluster)
globalCluster_deletionProtection :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Bool)
globalCluster_deletionProtection :: (Maybe Bool -> f (Maybe Bool)) -> GlobalCluster -> f GlobalCluster
globalCluster_deletionProtection = (GlobalCluster -> Maybe Bool)
-> (GlobalCluster -> Maybe Bool -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Bool
deletionProtection :: Maybe Bool
$sel:deletionProtection:GlobalCluster' :: GlobalCluster -> Maybe Bool
deletionProtection} -> Maybe Bool
deletionProtection) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Bool
a -> GlobalCluster
s {$sel:deletionProtection:GlobalCluster' :: Maybe Bool
deletionProtection = Maybe Bool
a} :: GlobalCluster)
globalCluster_storageEncrypted :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Bool)
globalCluster_storageEncrypted :: (Maybe Bool -> f (Maybe Bool)) -> GlobalCluster -> f GlobalCluster
globalCluster_storageEncrypted = (GlobalCluster -> Maybe Bool)
-> (GlobalCluster -> Maybe Bool -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Bool
storageEncrypted :: Maybe Bool
$sel:storageEncrypted:GlobalCluster' :: GlobalCluster -> Maybe Bool
storageEncrypted} -> Maybe Bool
storageEncrypted) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Bool
a -> GlobalCluster
s {$sel:storageEncrypted:GlobalCluster' :: Maybe Bool
storageEncrypted = Maybe Bool
a} :: GlobalCluster)
globalCluster_globalClusterIdentifier :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Text)
globalCluster_globalClusterIdentifier :: (Maybe Text -> f (Maybe Text)) -> GlobalCluster -> f GlobalCluster
globalCluster_globalClusterIdentifier = (GlobalCluster -> Maybe Text)
-> (GlobalCluster -> Maybe Text -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Text
globalClusterIdentifier :: Maybe Text
$sel:globalClusterIdentifier:GlobalCluster' :: GlobalCluster -> Maybe Text
globalClusterIdentifier} -> Maybe Text
globalClusterIdentifier) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Text
a -> GlobalCluster
s {$sel:globalClusterIdentifier:GlobalCluster' :: Maybe Text
globalClusterIdentifier = Maybe Text
a} :: GlobalCluster)
globalCluster_engine :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Text)
globalCluster_engine :: (Maybe Text -> f (Maybe Text)) -> GlobalCluster -> f GlobalCluster
globalCluster_engine = (GlobalCluster -> Maybe Text)
-> (GlobalCluster -> Maybe Text -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Text
engine :: Maybe Text
$sel:engine:GlobalCluster' :: GlobalCluster -> Maybe Text
engine} -> Maybe Text
engine) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Text
a -> GlobalCluster
s {$sel:engine:GlobalCluster' :: Maybe Text
engine = Maybe Text
a} :: GlobalCluster)
globalCluster_globalClusterArn :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Text)
globalCluster_globalClusterArn :: (Maybe Text -> f (Maybe Text)) -> GlobalCluster -> f GlobalCluster
globalCluster_globalClusterArn = (GlobalCluster -> Maybe Text)
-> (GlobalCluster -> Maybe Text -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Text
globalClusterArn :: Maybe Text
$sel:globalClusterArn:GlobalCluster' :: GlobalCluster -> Maybe Text
globalClusterArn} -> Maybe Text
globalClusterArn) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Text
a -> GlobalCluster
s {$sel:globalClusterArn:GlobalCluster' :: Maybe Text
globalClusterArn = Maybe Text
a} :: GlobalCluster)
globalCluster_databaseName :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Text)
globalCluster_databaseName :: (Maybe Text -> f (Maybe Text)) -> GlobalCluster -> f GlobalCluster
globalCluster_databaseName = (GlobalCluster -> Maybe Text)
-> (GlobalCluster -> Maybe Text -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:GlobalCluster' :: GlobalCluster -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Text
a -> GlobalCluster
s {$sel:databaseName:GlobalCluster' :: Maybe Text
databaseName = Maybe Text
a} :: GlobalCluster)
globalCluster_globalClusterMembers :: Lens.Lens' GlobalCluster (Prelude.Maybe [GlobalClusterMember])
globalCluster_globalClusterMembers :: (Maybe [GlobalClusterMember] -> f (Maybe [GlobalClusterMember]))
-> GlobalCluster -> f GlobalCluster
globalCluster_globalClusterMembers = (GlobalCluster -> Maybe [GlobalClusterMember])
-> (GlobalCluster -> Maybe [GlobalClusterMember] -> GlobalCluster)
-> Lens
GlobalCluster
GlobalCluster
(Maybe [GlobalClusterMember])
(Maybe [GlobalClusterMember])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe [GlobalClusterMember]
globalClusterMembers :: Maybe [GlobalClusterMember]
$sel:globalClusterMembers:GlobalCluster' :: GlobalCluster -> Maybe [GlobalClusterMember]
globalClusterMembers} -> Maybe [GlobalClusterMember]
globalClusterMembers) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe [GlobalClusterMember]
a -> GlobalCluster
s {$sel:globalClusterMembers:GlobalCluster' :: Maybe [GlobalClusterMember]
globalClusterMembers = Maybe [GlobalClusterMember]
a} :: GlobalCluster) ((Maybe [GlobalClusterMember] -> f (Maybe [GlobalClusterMember]))
-> GlobalCluster -> f GlobalCluster)
-> ((Maybe [GlobalClusterMember]
-> f (Maybe [GlobalClusterMember]))
-> Maybe [GlobalClusterMember] -> f (Maybe [GlobalClusterMember]))
-> (Maybe [GlobalClusterMember] -> f (Maybe [GlobalClusterMember]))
-> GlobalCluster
-> f GlobalCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[GlobalClusterMember]
[GlobalClusterMember]
[GlobalClusterMember]
[GlobalClusterMember]
-> Iso
(Maybe [GlobalClusterMember])
(Maybe [GlobalClusterMember])
(Maybe [GlobalClusterMember])
(Maybe [GlobalClusterMember])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[GlobalClusterMember]
[GlobalClusterMember]
[GlobalClusterMember]
[GlobalClusterMember]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
globalCluster_failoverState :: Lens.Lens' GlobalCluster (Prelude.Maybe FailoverState)
globalCluster_failoverState :: (Maybe FailoverState -> f (Maybe FailoverState))
-> GlobalCluster -> f GlobalCluster
globalCluster_failoverState = (GlobalCluster -> Maybe FailoverState)
-> (GlobalCluster -> Maybe FailoverState -> GlobalCluster)
-> Lens
GlobalCluster
GlobalCluster
(Maybe FailoverState)
(Maybe FailoverState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe FailoverState
failoverState :: Maybe FailoverState
$sel:failoverState:GlobalCluster' :: GlobalCluster -> Maybe FailoverState
failoverState} -> Maybe FailoverState
failoverState) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe FailoverState
a -> GlobalCluster
s {$sel:failoverState:GlobalCluster' :: Maybe FailoverState
failoverState = Maybe FailoverState
a} :: GlobalCluster)
globalCluster_globalClusterResourceId :: Lens.Lens' GlobalCluster (Prelude.Maybe Prelude.Text)
globalCluster_globalClusterResourceId :: (Maybe Text -> f (Maybe Text)) -> GlobalCluster -> f GlobalCluster
globalCluster_globalClusterResourceId = (GlobalCluster -> Maybe Text)
-> (GlobalCluster -> Maybe Text -> GlobalCluster)
-> Lens GlobalCluster GlobalCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalCluster' {Maybe Text
globalClusterResourceId :: Maybe Text
$sel:globalClusterResourceId:GlobalCluster' :: GlobalCluster -> Maybe Text
globalClusterResourceId} -> Maybe Text
globalClusterResourceId) (\s :: GlobalCluster
s@GlobalCluster' {} Maybe Text
a -> GlobalCluster
s {$sel:globalClusterResourceId:GlobalCluster' :: Maybe Text
globalClusterResourceId = Maybe Text
a} :: GlobalCluster)
instance Core.FromXML GlobalCluster where
parseXML :: [Node] -> Either String GlobalCluster
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster
GlobalCluster'
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
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
"EngineVersion")
Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
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
"Status")
Either
String
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
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
"DeletionProtection")
Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
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
"StorageEncrypted")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
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
"GlobalClusterIdentifier")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
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
"Engine")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
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
"GlobalClusterArn")
Either
String
(Maybe Text
-> Maybe [GlobalClusterMember]
-> Maybe FailoverState
-> Maybe Text
-> GlobalCluster)
-> Either String (Maybe Text)
-> Either
String
(Maybe [GlobalClusterMember]
-> Maybe FailoverState -> Maybe Text -> GlobalCluster)
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
"DatabaseName")
Either
String
(Maybe [GlobalClusterMember]
-> Maybe FailoverState -> Maybe Text -> GlobalCluster)
-> Either String (Maybe [GlobalClusterMember])
-> Either
String (Maybe FailoverState -> Maybe Text -> GlobalCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"GlobalClusterMembers"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [GlobalClusterMember]))
-> Either String (Maybe [GlobalClusterMember])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [GlobalClusterMember])
-> [Node] -> Either String (Maybe [GlobalClusterMember])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [GlobalClusterMember]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"GlobalClusterMember")
)
Either String (Maybe FailoverState -> Maybe Text -> GlobalCluster)
-> Either String (Maybe FailoverState)
-> Either String (Maybe Text -> GlobalCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe FailoverState)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"FailoverState")
Either String (Maybe Text -> GlobalCluster)
-> Either String (Maybe Text) -> Either String GlobalCluster
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
"GlobalClusterResourceId")
instance Prelude.Hashable GlobalCluster
instance Prelude.NFData GlobalCluster