{-# 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.NodeGroupMember where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.Endpoint
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NodeGroupMember = NodeGroupMember'
{
NodeGroupMember -> Maybe Text
cacheClusterId :: Prelude.Maybe Prelude.Text,
NodeGroupMember -> Maybe Text
cacheNodeId :: Prelude.Maybe Prelude.Text,
NodeGroupMember -> Maybe Text
preferredAvailabilityZone :: Prelude.Maybe Prelude.Text,
NodeGroupMember -> Maybe Text
currentRole :: Prelude.Maybe Prelude.Text,
NodeGroupMember -> Maybe Text
preferredOutpostArn :: Prelude.Maybe Prelude.Text,
NodeGroupMember -> Maybe Endpoint
readEndpoint :: Prelude.Maybe Endpoint
}
deriving (NodeGroupMember -> NodeGroupMember -> Bool
(NodeGroupMember -> NodeGroupMember -> Bool)
-> (NodeGroupMember -> NodeGroupMember -> Bool)
-> Eq NodeGroupMember
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeGroupMember -> NodeGroupMember -> Bool
$c/= :: NodeGroupMember -> NodeGroupMember -> Bool
== :: NodeGroupMember -> NodeGroupMember -> Bool
$c== :: NodeGroupMember -> NodeGroupMember -> Bool
Prelude.Eq, ReadPrec [NodeGroupMember]
ReadPrec NodeGroupMember
Int -> ReadS NodeGroupMember
ReadS [NodeGroupMember]
(Int -> ReadS NodeGroupMember)
-> ReadS [NodeGroupMember]
-> ReadPrec NodeGroupMember
-> ReadPrec [NodeGroupMember]
-> Read NodeGroupMember
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeGroupMember]
$creadListPrec :: ReadPrec [NodeGroupMember]
readPrec :: ReadPrec NodeGroupMember
$creadPrec :: ReadPrec NodeGroupMember
readList :: ReadS [NodeGroupMember]
$creadList :: ReadS [NodeGroupMember]
readsPrec :: Int -> ReadS NodeGroupMember
$creadsPrec :: Int -> ReadS NodeGroupMember
Prelude.Read, Int -> NodeGroupMember -> ShowS
[NodeGroupMember] -> ShowS
NodeGroupMember -> String
(Int -> NodeGroupMember -> ShowS)
-> (NodeGroupMember -> String)
-> ([NodeGroupMember] -> ShowS)
-> Show NodeGroupMember
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeGroupMember] -> ShowS
$cshowList :: [NodeGroupMember] -> ShowS
show :: NodeGroupMember -> String
$cshow :: NodeGroupMember -> String
showsPrec :: Int -> NodeGroupMember -> ShowS
$cshowsPrec :: Int -> NodeGroupMember -> ShowS
Prelude.Show, (forall x. NodeGroupMember -> Rep NodeGroupMember x)
-> (forall x. Rep NodeGroupMember x -> NodeGroupMember)
-> Generic NodeGroupMember
forall x. Rep NodeGroupMember x -> NodeGroupMember
forall x. NodeGroupMember -> Rep NodeGroupMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeGroupMember x -> NodeGroupMember
$cfrom :: forall x. NodeGroupMember -> Rep NodeGroupMember x
Prelude.Generic)
newNodeGroupMember ::
NodeGroupMember
newNodeGroupMember :: NodeGroupMember
newNodeGroupMember =
NodeGroupMember' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> NodeGroupMember
NodeGroupMember'
{ $sel:cacheClusterId:NodeGroupMember' :: Maybe Text
cacheClusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cacheNodeId:NodeGroupMember' :: Maybe Text
cacheNodeId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:preferredAvailabilityZone:NodeGroupMember' :: Maybe Text
preferredAvailabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:currentRole:NodeGroupMember' :: Maybe Text
currentRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:preferredOutpostArn:NodeGroupMember' :: Maybe Text
preferredOutpostArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:readEndpoint:NodeGroupMember' :: Maybe Endpoint
readEndpoint = Maybe Endpoint
forall a. Maybe a
Prelude.Nothing
}
nodeGroupMember_cacheClusterId :: Lens.Lens' NodeGroupMember (Prelude.Maybe Prelude.Text)
nodeGroupMember_cacheClusterId :: (Maybe Text -> f (Maybe Text))
-> NodeGroupMember -> f NodeGroupMember
nodeGroupMember_cacheClusterId = (NodeGroupMember -> Maybe Text)
-> (NodeGroupMember -> Maybe Text -> NodeGroupMember)
-> Lens NodeGroupMember NodeGroupMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeGroupMember' {Maybe Text
cacheClusterId :: Maybe Text
$sel:cacheClusterId:NodeGroupMember' :: NodeGroupMember -> Maybe Text
cacheClusterId} -> Maybe Text
cacheClusterId) (\s :: NodeGroupMember
s@NodeGroupMember' {} Maybe Text
a -> NodeGroupMember
s {$sel:cacheClusterId:NodeGroupMember' :: Maybe Text
cacheClusterId = Maybe Text
a} :: NodeGroupMember)
nodeGroupMember_cacheNodeId :: Lens.Lens' NodeGroupMember (Prelude.Maybe Prelude.Text)
nodeGroupMember_cacheNodeId :: (Maybe Text -> f (Maybe Text))
-> NodeGroupMember -> f NodeGroupMember
nodeGroupMember_cacheNodeId = (NodeGroupMember -> Maybe Text)
-> (NodeGroupMember -> Maybe Text -> NodeGroupMember)
-> Lens NodeGroupMember NodeGroupMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeGroupMember' {Maybe Text
cacheNodeId :: Maybe Text
$sel:cacheNodeId:NodeGroupMember' :: NodeGroupMember -> Maybe Text
cacheNodeId} -> Maybe Text
cacheNodeId) (\s :: NodeGroupMember
s@NodeGroupMember' {} Maybe Text
a -> NodeGroupMember
s {$sel:cacheNodeId:NodeGroupMember' :: Maybe Text
cacheNodeId = Maybe Text
a} :: NodeGroupMember)
nodeGroupMember_preferredAvailabilityZone :: Lens.Lens' NodeGroupMember (Prelude.Maybe Prelude.Text)
nodeGroupMember_preferredAvailabilityZone :: (Maybe Text -> f (Maybe Text))
-> NodeGroupMember -> f NodeGroupMember
nodeGroupMember_preferredAvailabilityZone = (NodeGroupMember -> Maybe Text)
-> (NodeGroupMember -> Maybe Text -> NodeGroupMember)
-> Lens NodeGroupMember NodeGroupMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeGroupMember' {Maybe Text
preferredAvailabilityZone :: Maybe Text
$sel:preferredAvailabilityZone:NodeGroupMember' :: NodeGroupMember -> Maybe Text
preferredAvailabilityZone} -> Maybe Text
preferredAvailabilityZone) (\s :: NodeGroupMember
s@NodeGroupMember' {} Maybe Text
a -> NodeGroupMember
s {$sel:preferredAvailabilityZone:NodeGroupMember' :: Maybe Text
preferredAvailabilityZone = Maybe Text
a} :: NodeGroupMember)
nodeGroupMember_currentRole :: Lens.Lens' NodeGroupMember (Prelude.Maybe Prelude.Text)
nodeGroupMember_currentRole :: (Maybe Text -> f (Maybe Text))
-> NodeGroupMember -> f NodeGroupMember
nodeGroupMember_currentRole = (NodeGroupMember -> Maybe Text)
-> (NodeGroupMember -> Maybe Text -> NodeGroupMember)
-> Lens NodeGroupMember NodeGroupMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeGroupMember' {Maybe Text
currentRole :: Maybe Text
$sel:currentRole:NodeGroupMember' :: NodeGroupMember -> Maybe Text
currentRole} -> Maybe Text
currentRole) (\s :: NodeGroupMember
s@NodeGroupMember' {} Maybe Text
a -> NodeGroupMember
s {$sel:currentRole:NodeGroupMember' :: Maybe Text
currentRole = Maybe Text
a} :: NodeGroupMember)
nodeGroupMember_preferredOutpostArn :: Lens.Lens' NodeGroupMember (Prelude.Maybe Prelude.Text)
nodeGroupMember_preferredOutpostArn :: (Maybe Text -> f (Maybe Text))
-> NodeGroupMember -> f NodeGroupMember
nodeGroupMember_preferredOutpostArn = (NodeGroupMember -> Maybe Text)
-> (NodeGroupMember -> Maybe Text -> NodeGroupMember)
-> Lens NodeGroupMember NodeGroupMember (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeGroupMember' {Maybe Text
preferredOutpostArn :: Maybe Text
$sel:preferredOutpostArn:NodeGroupMember' :: NodeGroupMember -> Maybe Text
preferredOutpostArn} -> Maybe Text
preferredOutpostArn) (\s :: NodeGroupMember
s@NodeGroupMember' {} Maybe Text
a -> NodeGroupMember
s {$sel:preferredOutpostArn:NodeGroupMember' :: Maybe Text
preferredOutpostArn = Maybe Text
a} :: NodeGroupMember)
nodeGroupMember_readEndpoint :: Lens.Lens' NodeGroupMember (Prelude.Maybe Endpoint)
nodeGroupMember_readEndpoint :: (Maybe Endpoint -> f (Maybe Endpoint))
-> NodeGroupMember -> f NodeGroupMember
nodeGroupMember_readEndpoint = (NodeGroupMember -> Maybe Endpoint)
-> (NodeGroupMember -> Maybe Endpoint -> NodeGroupMember)
-> Lens
NodeGroupMember NodeGroupMember (Maybe Endpoint) (Maybe Endpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeGroupMember' {Maybe Endpoint
readEndpoint :: Maybe Endpoint
$sel:readEndpoint:NodeGroupMember' :: NodeGroupMember -> Maybe Endpoint
readEndpoint} -> Maybe Endpoint
readEndpoint) (\s :: NodeGroupMember
s@NodeGroupMember' {} Maybe Endpoint
a -> NodeGroupMember
s {$sel:readEndpoint:NodeGroupMember' :: Maybe Endpoint
readEndpoint = Maybe Endpoint
a} :: NodeGroupMember)
instance Core.FromXML NodeGroupMember where
parseXML :: [Node] -> Either String NodeGroupMember
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> NodeGroupMember
NodeGroupMember'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> NodeGroupMember)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> NodeGroupMember)
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
"CacheClusterId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> NodeGroupMember)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Endpoint -> NodeGroupMember)
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
"CacheNodeId")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Endpoint -> NodeGroupMember)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe Text -> Maybe Endpoint -> NodeGroupMember)
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
"PreferredAvailabilityZone")
Either
String
(Maybe Text -> Maybe Text -> Maybe Endpoint -> NodeGroupMember)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Endpoint -> NodeGroupMember)
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
"CurrentRole")
Either String (Maybe Text -> Maybe Endpoint -> NodeGroupMember)
-> Either String (Maybe Text)
-> Either String (Maybe Endpoint -> NodeGroupMember)
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
"PreferredOutpostArn")
Either String (Maybe Endpoint -> NodeGroupMember)
-> Either String (Maybe Endpoint) -> Either String NodeGroupMember
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Endpoint)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReadEndpoint")
instance Prelude.Hashable NodeGroupMember
instance Prelude.NFData NodeGroupMember