{-# 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.ElastiCache.Types.GlobalReplicationGroupMember where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.AutomaticFailoverStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GlobalReplicationGroupMember = GlobalReplicationGroupMember'
{
GlobalReplicationGroupMember -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
GlobalReplicationGroupMember -> Maybe Text
replicationGroupRegion :: Prelude.Maybe Prelude.Text,
GlobalReplicationGroupMember -> Maybe Text
role' :: Prelude.Maybe Prelude.Text,
GlobalReplicationGroupMember -> Maybe Text
replicationGroupId :: Prelude.Maybe Prelude.Text,
GlobalReplicationGroupMember -> Maybe AutomaticFailoverStatus
automaticFailover :: Prelude.Maybe AutomaticFailoverStatus
}
deriving (GlobalReplicationGroupMember
-> GlobalReplicationGroupMember -> Bool
(GlobalReplicationGroupMember
-> GlobalReplicationGroupMember -> Bool)
-> (GlobalReplicationGroupMember
-> GlobalReplicationGroupMember -> Bool)
-> Eq GlobalReplicationGroupMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlobalReplicationGroupMember
-> GlobalReplicationGroupMember -> Bool
$c/= :: GlobalReplicationGroupMember
-> GlobalReplicationGroupMember -> Bool
== :: GlobalReplicationGroupMember
-> GlobalReplicationGroupMember -> Bool
$c== :: GlobalReplicationGroupMember
-> GlobalReplicationGroupMember -> Bool
Prelude.Eq, ReadPrec [GlobalReplicationGroupMember]
ReadPrec GlobalReplicationGroupMember
Int -> ReadS GlobalReplicationGroupMember
ReadS [GlobalReplicationGroupMember]
(Int -> ReadS GlobalReplicationGroupMember)
-> ReadS [GlobalReplicationGroupMember]
-> ReadPrec GlobalReplicationGroupMember
-> ReadPrec [GlobalReplicationGroupMember]
-> Read GlobalReplicationGroupMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlobalReplicationGroupMember]
$creadListPrec :: ReadPrec [GlobalReplicationGroupMember]
readPrec :: ReadPrec GlobalReplicationGroupMember
$creadPrec :: ReadPrec GlobalReplicationGroupMember
readList :: ReadS [GlobalReplicationGroupMember]
$creadList :: ReadS [GlobalReplicationGroupMember]
readsPrec :: Int -> ReadS GlobalReplicationGroupMember
$creadsPrec :: Int -> ReadS GlobalReplicationGroupMember
Prelude.Read, Int -> GlobalReplicationGroupMember -> ShowS
[GlobalReplicationGroupMember] -> ShowS
GlobalReplicationGroupMember -> String
(Int -> GlobalReplicationGroupMember -> ShowS)
-> (GlobalReplicationGroupMember -> String)
-> ([GlobalReplicationGroupMember] -> ShowS)
-> Show GlobalReplicationGroupMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlobalReplicationGroupMember] -> ShowS
$cshowList :: [GlobalReplicationGroupMember] -> ShowS
show :: GlobalReplicationGroupMember -> String
$cshow :: GlobalReplicationGroupMember -> String
showsPrec :: Int -> GlobalReplicationGroupMember -> ShowS
$cshowsPrec :: Int -> GlobalReplicationGroupMember -> ShowS
Prelude.Show, (forall x.
GlobalReplicationGroupMember -> Rep GlobalReplicationGroupMember x)
-> (forall x.
Rep GlobalReplicationGroupMember x -> GlobalReplicationGroupMember)
-> Generic GlobalReplicationGroupMember
forall x.
Rep GlobalReplicationGroupMember x -> GlobalReplicationGroupMember
forall x.
GlobalReplicationGroupMember -> Rep GlobalReplicationGroupMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GlobalReplicationGroupMember x -> GlobalReplicationGroupMember
$cfrom :: forall x.
GlobalReplicationGroupMember -> Rep GlobalReplicationGroupMember x
Prelude.Generic)
newGlobalReplicationGroupMember ::
GlobalReplicationGroupMember
newGlobalReplicationGroupMember :: GlobalReplicationGroupMember
newGlobalReplicationGroupMember =
GlobalReplicationGroupMember' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AutomaticFailoverStatus
-> GlobalReplicationGroupMember
GlobalReplicationGroupMember'
{ $sel:status:GlobalReplicationGroupMember' :: Maybe Text
status =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replicationGroupRegion:GlobalReplicationGroupMember' :: Maybe Text
replicationGroupRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:role':GlobalReplicationGroupMember' :: Maybe Text
role' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replicationGroupId:GlobalReplicationGroupMember' :: Maybe Text
replicationGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:automaticFailover:GlobalReplicationGroupMember' :: Maybe AutomaticFailoverStatus
automaticFailover = Maybe AutomaticFailoverStatus
forall a. Maybe a
Prelude.Nothing
}
globalReplicationGroupMember_status :: Lens.Lens' GlobalReplicationGroupMember (Prelude.Maybe Prelude.Text)
globalReplicationGroupMember_status :: (Maybe Text -> f (Maybe Text))
-> GlobalReplicationGroupMember -> f GlobalReplicationGroupMember
globalReplicationGroupMember_status = (GlobalReplicationGroupMember -> Maybe Text)
-> (GlobalReplicationGroupMember
-> Maybe Text -> GlobalReplicationGroupMember)
-> Lens
GlobalReplicationGroupMember
GlobalReplicationGroupMember
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalReplicationGroupMember' {Maybe Text
status :: Maybe Text
$sel:status:GlobalReplicationGroupMember' :: GlobalReplicationGroupMember -> Maybe Text
status} -> Maybe Text
status) (\s :: GlobalReplicationGroupMember
s@GlobalReplicationGroupMember' {} Maybe Text
a -> GlobalReplicationGroupMember
s {$sel:status:GlobalReplicationGroupMember' :: Maybe Text
status = Maybe Text
a} :: GlobalReplicationGroupMember)
globalReplicationGroupMember_replicationGroupRegion :: Lens.Lens' GlobalReplicationGroupMember (Prelude.Maybe Prelude.Text)
globalReplicationGroupMember_replicationGroupRegion :: (Maybe Text -> f (Maybe Text))
-> GlobalReplicationGroupMember -> f GlobalReplicationGroupMember
globalReplicationGroupMember_replicationGroupRegion = (GlobalReplicationGroupMember -> Maybe Text)
-> (GlobalReplicationGroupMember
-> Maybe Text -> GlobalReplicationGroupMember)
-> Lens
GlobalReplicationGroupMember
GlobalReplicationGroupMember
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalReplicationGroupMember' {Maybe Text
replicationGroupRegion :: Maybe Text
$sel:replicationGroupRegion:GlobalReplicationGroupMember' :: GlobalReplicationGroupMember -> Maybe Text
replicationGroupRegion} -> Maybe Text
replicationGroupRegion) (\s :: GlobalReplicationGroupMember
s@GlobalReplicationGroupMember' {} Maybe Text
a -> GlobalReplicationGroupMember
s {$sel:replicationGroupRegion:GlobalReplicationGroupMember' :: Maybe Text
replicationGroupRegion = Maybe Text
a} :: GlobalReplicationGroupMember)
globalReplicationGroupMember_role :: Lens.Lens' GlobalReplicationGroupMember (Prelude.Maybe Prelude.Text)
globalReplicationGroupMember_role :: (Maybe Text -> f (Maybe Text))
-> GlobalReplicationGroupMember -> f GlobalReplicationGroupMember
globalReplicationGroupMember_role = (GlobalReplicationGroupMember -> Maybe Text)
-> (GlobalReplicationGroupMember
-> Maybe Text -> GlobalReplicationGroupMember)
-> Lens
GlobalReplicationGroupMember
GlobalReplicationGroupMember
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalReplicationGroupMember' {Maybe Text
role' :: Maybe Text
$sel:role':GlobalReplicationGroupMember' :: GlobalReplicationGroupMember -> Maybe Text
role'} -> Maybe Text
role') (\s :: GlobalReplicationGroupMember
s@GlobalReplicationGroupMember' {} Maybe Text
a -> GlobalReplicationGroupMember
s {$sel:role':GlobalReplicationGroupMember' :: Maybe Text
role' = Maybe Text
a} :: GlobalReplicationGroupMember)
globalReplicationGroupMember_replicationGroupId :: Lens.Lens' GlobalReplicationGroupMember (Prelude.Maybe Prelude.Text)
globalReplicationGroupMember_replicationGroupId :: (Maybe Text -> f (Maybe Text))
-> GlobalReplicationGroupMember -> f GlobalReplicationGroupMember
globalReplicationGroupMember_replicationGroupId = (GlobalReplicationGroupMember -> Maybe Text)
-> (GlobalReplicationGroupMember
-> Maybe Text -> GlobalReplicationGroupMember)
-> Lens
GlobalReplicationGroupMember
GlobalReplicationGroupMember
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalReplicationGroupMember' {Maybe Text
replicationGroupId :: Maybe Text
$sel:replicationGroupId:GlobalReplicationGroupMember' :: GlobalReplicationGroupMember -> Maybe Text
replicationGroupId} -> Maybe Text
replicationGroupId) (\s :: GlobalReplicationGroupMember
s@GlobalReplicationGroupMember' {} Maybe Text
a -> GlobalReplicationGroupMember
s {$sel:replicationGroupId:GlobalReplicationGroupMember' :: Maybe Text
replicationGroupId = Maybe Text
a} :: GlobalReplicationGroupMember)
globalReplicationGroupMember_automaticFailover :: Lens.Lens' GlobalReplicationGroupMember (Prelude.Maybe AutomaticFailoverStatus)
globalReplicationGroupMember_automaticFailover :: (Maybe AutomaticFailoverStatus
-> f (Maybe AutomaticFailoverStatus))
-> GlobalReplicationGroupMember -> f GlobalReplicationGroupMember
globalReplicationGroupMember_automaticFailover = (GlobalReplicationGroupMember -> Maybe AutomaticFailoverStatus)
-> (GlobalReplicationGroupMember
-> Maybe AutomaticFailoverStatus -> GlobalReplicationGroupMember)
-> Lens
GlobalReplicationGroupMember
GlobalReplicationGroupMember
(Maybe AutomaticFailoverStatus)
(Maybe AutomaticFailoverStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalReplicationGroupMember' {Maybe AutomaticFailoverStatus
automaticFailover :: Maybe AutomaticFailoverStatus
$sel:automaticFailover:GlobalReplicationGroupMember' :: GlobalReplicationGroupMember -> Maybe AutomaticFailoverStatus
automaticFailover} -> Maybe AutomaticFailoverStatus
automaticFailover) (\s :: GlobalReplicationGroupMember
s@GlobalReplicationGroupMember' {} Maybe AutomaticFailoverStatus
a -> GlobalReplicationGroupMember
s {$sel:automaticFailover:GlobalReplicationGroupMember' :: Maybe AutomaticFailoverStatus
automaticFailover = Maybe AutomaticFailoverStatus
a} :: GlobalReplicationGroupMember)
instance Core.FromXML GlobalReplicationGroupMember where
parseXML :: [Node] -> Either String GlobalReplicationGroupMember
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AutomaticFailoverStatus
-> GlobalReplicationGroupMember
GlobalReplicationGroupMember'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AutomaticFailoverStatus
-> GlobalReplicationGroupMember)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AutomaticFailoverStatus
-> GlobalReplicationGroupMember)
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
-> Maybe Text
-> Maybe Text
-> Maybe AutomaticFailoverStatus
-> GlobalReplicationGroupMember)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe AutomaticFailoverStatus
-> GlobalReplicationGroupMember)
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
"ReplicationGroupRegion")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe AutomaticFailoverStatus
-> GlobalReplicationGroupMember)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe AutomaticFailoverStatus -> GlobalReplicationGroupMember)
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
"Role")
Either
String
(Maybe Text
-> Maybe AutomaticFailoverStatus -> GlobalReplicationGroupMember)
-> Either String (Maybe Text)
-> Either
String
(Maybe AutomaticFailoverStatus -> GlobalReplicationGroupMember)
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
"ReplicationGroupId")
Either
String
(Maybe AutomaticFailoverStatus -> GlobalReplicationGroupMember)
-> Either String (Maybe AutomaticFailoverStatus)
-> Either String GlobalReplicationGroupMember
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe AutomaticFailoverStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutomaticFailover")
instance
Prelude.Hashable
GlobalReplicationGroupMember
instance Prelude.NFData GlobalReplicationGroupMember