{-# 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.GlobalReplicationGroupInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GlobalReplicationGroupInfo = GlobalReplicationGroupInfo'
{
GlobalReplicationGroupInfo -> Maybe Text
globalReplicationGroupMemberRole :: Prelude.Maybe Prelude.Text,
GlobalReplicationGroupInfo -> Maybe Text
globalReplicationGroupId :: Prelude.Maybe Prelude.Text
}
deriving (GlobalReplicationGroupInfo -> GlobalReplicationGroupInfo -> Bool
(GlobalReplicationGroupInfo -> GlobalReplicationGroupInfo -> Bool)
-> (GlobalReplicationGroupInfo
-> GlobalReplicationGroupInfo -> Bool)
-> Eq GlobalReplicationGroupInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlobalReplicationGroupInfo -> GlobalReplicationGroupInfo -> Bool
$c/= :: GlobalReplicationGroupInfo -> GlobalReplicationGroupInfo -> Bool
== :: GlobalReplicationGroupInfo -> GlobalReplicationGroupInfo -> Bool
$c== :: GlobalReplicationGroupInfo -> GlobalReplicationGroupInfo -> Bool
Prelude.Eq, ReadPrec [GlobalReplicationGroupInfo]
ReadPrec GlobalReplicationGroupInfo
Int -> ReadS GlobalReplicationGroupInfo
ReadS [GlobalReplicationGroupInfo]
(Int -> ReadS GlobalReplicationGroupInfo)
-> ReadS [GlobalReplicationGroupInfo]
-> ReadPrec GlobalReplicationGroupInfo
-> ReadPrec [GlobalReplicationGroupInfo]
-> Read GlobalReplicationGroupInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlobalReplicationGroupInfo]
$creadListPrec :: ReadPrec [GlobalReplicationGroupInfo]
readPrec :: ReadPrec GlobalReplicationGroupInfo
$creadPrec :: ReadPrec GlobalReplicationGroupInfo
readList :: ReadS [GlobalReplicationGroupInfo]
$creadList :: ReadS [GlobalReplicationGroupInfo]
readsPrec :: Int -> ReadS GlobalReplicationGroupInfo
$creadsPrec :: Int -> ReadS GlobalReplicationGroupInfo
Prelude.Read, Int -> GlobalReplicationGroupInfo -> ShowS
[GlobalReplicationGroupInfo] -> ShowS
GlobalReplicationGroupInfo -> String
(Int -> GlobalReplicationGroupInfo -> ShowS)
-> (GlobalReplicationGroupInfo -> String)
-> ([GlobalReplicationGroupInfo] -> ShowS)
-> Show GlobalReplicationGroupInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlobalReplicationGroupInfo] -> ShowS
$cshowList :: [GlobalReplicationGroupInfo] -> ShowS
show :: GlobalReplicationGroupInfo -> String
$cshow :: GlobalReplicationGroupInfo -> String
showsPrec :: Int -> GlobalReplicationGroupInfo -> ShowS
$cshowsPrec :: Int -> GlobalReplicationGroupInfo -> ShowS
Prelude.Show, (forall x.
GlobalReplicationGroupInfo -> Rep GlobalReplicationGroupInfo x)
-> (forall x.
Rep GlobalReplicationGroupInfo x -> GlobalReplicationGroupInfo)
-> Generic GlobalReplicationGroupInfo
forall x.
Rep GlobalReplicationGroupInfo x -> GlobalReplicationGroupInfo
forall x.
GlobalReplicationGroupInfo -> Rep GlobalReplicationGroupInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GlobalReplicationGroupInfo x -> GlobalReplicationGroupInfo
$cfrom :: forall x.
GlobalReplicationGroupInfo -> Rep GlobalReplicationGroupInfo x
Prelude.Generic)
newGlobalReplicationGroupInfo ::
GlobalReplicationGroupInfo
newGlobalReplicationGroupInfo :: GlobalReplicationGroupInfo
newGlobalReplicationGroupInfo =
GlobalReplicationGroupInfo' :: Maybe Text -> Maybe Text -> GlobalReplicationGroupInfo
GlobalReplicationGroupInfo'
{ $sel:globalReplicationGroupMemberRole:GlobalReplicationGroupInfo' :: Maybe Text
globalReplicationGroupMemberRole =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:globalReplicationGroupId:GlobalReplicationGroupInfo' :: Maybe Text
globalReplicationGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
globalReplicationGroupInfo_globalReplicationGroupMemberRole :: Lens.Lens' GlobalReplicationGroupInfo (Prelude.Maybe Prelude.Text)
globalReplicationGroupInfo_globalReplicationGroupMemberRole :: (Maybe Text -> f (Maybe Text))
-> GlobalReplicationGroupInfo -> f GlobalReplicationGroupInfo
globalReplicationGroupInfo_globalReplicationGroupMemberRole = (GlobalReplicationGroupInfo -> Maybe Text)
-> (GlobalReplicationGroupInfo
-> Maybe Text -> GlobalReplicationGroupInfo)
-> Lens
GlobalReplicationGroupInfo
GlobalReplicationGroupInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalReplicationGroupInfo' {Maybe Text
globalReplicationGroupMemberRole :: Maybe Text
$sel:globalReplicationGroupMemberRole:GlobalReplicationGroupInfo' :: GlobalReplicationGroupInfo -> Maybe Text
globalReplicationGroupMemberRole} -> Maybe Text
globalReplicationGroupMemberRole) (\s :: GlobalReplicationGroupInfo
s@GlobalReplicationGroupInfo' {} Maybe Text
a -> GlobalReplicationGroupInfo
s {$sel:globalReplicationGroupMemberRole:GlobalReplicationGroupInfo' :: Maybe Text
globalReplicationGroupMemberRole = Maybe Text
a} :: GlobalReplicationGroupInfo)
globalReplicationGroupInfo_globalReplicationGroupId :: Lens.Lens' GlobalReplicationGroupInfo (Prelude.Maybe Prelude.Text)
globalReplicationGroupInfo_globalReplicationGroupId :: (Maybe Text -> f (Maybe Text))
-> GlobalReplicationGroupInfo -> f GlobalReplicationGroupInfo
globalReplicationGroupInfo_globalReplicationGroupId = (GlobalReplicationGroupInfo -> Maybe Text)
-> (GlobalReplicationGroupInfo
-> Maybe Text -> GlobalReplicationGroupInfo)
-> Lens
GlobalReplicationGroupInfo
GlobalReplicationGroupInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalReplicationGroupInfo' {Maybe Text
globalReplicationGroupId :: Maybe Text
$sel:globalReplicationGroupId:GlobalReplicationGroupInfo' :: GlobalReplicationGroupInfo -> Maybe Text
globalReplicationGroupId} -> Maybe Text
globalReplicationGroupId) (\s :: GlobalReplicationGroupInfo
s@GlobalReplicationGroupInfo' {} Maybe Text
a -> GlobalReplicationGroupInfo
s {$sel:globalReplicationGroupId:GlobalReplicationGroupInfo' :: Maybe Text
globalReplicationGroupId = Maybe Text
a} :: GlobalReplicationGroupInfo)
instance Core.FromXML GlobalReplicationGroupInfo where
parseXML :: [Node] -> Either String GlobalReplicationGroupInfo
parseXML [Node]
x =
Maybe Text -> Maybe Text -> GlobalReplicationGroupInfo
GlobalReplicationGroupInfo'
(Maybe Text -> Maybe Text -> GlobalReplicationGroupInfo)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> GlobalReplicationGroupInfo)
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
"GlobalReplicationGroupMemberRole")
Either String (Maybe Text -> GlobalReplicationGroupInfo)
-> Either String (Maybe Text)
-> Either String GlobalReplicationGroupInfo
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
"GlobalReplicationGroupId")
instance Prelude.Hashable GlobalReplicationGroupInfo
instance Prelude.NFData GlobalReplicationGroupInfo