{-# 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.NodeGroupUpdateStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElastiCache.Types.NodeGroupMemberUpdateStatus
import qualified Amazonka.Prelude as Prelude
data NodeGroupUpdateStatus = NodeGroupUpdateStatus'
{
NodeGroupUpdateStatus -> Maybe Text
nodeGroupId :: Prelude.Maybe Prelude.Text,
NodeGroupUpdateStatus -> Maybe [NodeGroupMemberUpdateStatus]
nodeGroupMemberUpdateStatus :: Prelude.Maybe [NodeGroupMemberUpdateStatus]
}
deriving (NodeGroupUpdateStatus -> NodeGroupUpdateStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NodeGroupUpdateStatus -> NodeGroupUpdateStatus -> Bool
$c/= :: NodeGroupUpdateStatus -> NodeGroupUpdateStatus -> Bool
== :: NodeGroupUpdateStatus -> NodeGroupUpdateStatus -> Bool
$c== :: NodeGroupUpdateStatus -> NodeGroupUpdateStatus -> Bool
Prelude.Eq, ReadPrec [NodeGroupUpdateStatus]
ReadPrec NodeGroupUpdateStatus
Int -> ReadS NodeGroupUpdateStatus
ReadS [NodeGroupUpdateStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NodeGroupUpdateStatus]
$creadListPrec :: ReadPrec [NodeGroupUpdateStatus]
readPrec :: ReadPrec NodeGroupUpdateStatus
$creadPrec :: ReadPrec NodeGroupUpdateStatus
readList :: ReadS [NodeGroupUpdateStatus]
$creadList :: ReadS [NodeGroupUpdateStatus]
readsPrec :: Int -> ReadS NodeGroupUpdateStatus
$creadsPrec :: Int -> ReadS NodeGroupUpdateStatus
Prelude.Read, Int -> NodeGroupUpdateStatus -> ShowS
[NodeGroupUpdateStatus] -> ShowS
NodeGroupUpdateStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NodeGroupUpdateStatus] -> ShowS
$cshowList :: [NodeGroupUpdateStatus] -> ShowS
show :: NodeGroupUpdateStatus -> String
$cshow :: NodeGroupUpdateStatus -> String
showsPrec :: Int -> NodeGroupUpdateStatus -> ShowS
$cshowsPrec :: Int -> NodeGroupUpdateStatus -> ShowS
Prelude.Show, forall x. Rep NodeGroupUpdateStatus x -> NodeGroupUpdateStatus
forall x. NodeGroupUpdateStatus -> Rep NodeGroupUpdateStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NodeGroupUpdateStatus x -> NodeGroupUpdateStatus
$cfrom :: forall x. NodeGroupUpdateStatus -> Rep NodeGroupUpdateStatus x
Prelude.Generic)
newNodeGroupUpdateStatus ::
NodeGroupUpdateStatus
newNodeGroupUpdateStatus :: NodeGroupUpdateStatus
newNodeGroupUpdateStatus =
NodeGroupUpdateStatus'
{ $sel:nodeGroupId:NodeGroupUpdateStatus' :: Maybe Text
nodeGroupId =
forall a. Maybe a
Prelude.Nothing,
$sel:nodeGroupMemberUpdateStatus:NodeGroupUpdateStatus' :: Maybe [NodeGroupMemberUpdateStatus]
nodeGroupMemberUpdateStatus = forall a. Maybe a
Prelude.Nothing
}
nodeGroupUpdateStatus_nodeGroupId :: Lens.Lens' NodeGroupUpdateStatus (Prelude.Maybe Prelude.Text)
nodeGroupUpdateStatus_nodeGroupId :: Lens' NodeGroupUpdateStatus (Maybe Text)
nodeGroupUpdateStatus_nodeGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeGroupUpdateStatus' {Maybe Text
nodeGroupId :: Maybe Text
$sel:nodeGroupId:NodeGroupUpdateStatus' :: NodeGroupUpdateStatus -> Maybe Text
nodeGroupId} -> Maybe Text
nodeGroupId) (\s :: NodeGroupUpdateStatus
s@NodeGroupUpdateStatus' {} Maybe Text
a -> NodeGroupUpdateStatus
s {$sel:nodeGroupId:NodeGroupUpdateStatus' :: Maybe Text
nodeGroupId = Maybe Text
a} :: NodeGroupUpdateStatus)
nodeGroupUpdateStatus_nodeGroupMemberUpdateStatus :: Lens.Lens' NodeGroupUpdateStatus (Prelude.Maybe [NodeGroupMemberUpdateStatus])
nodeGroupUpdateStatus_nodeGroupMemberUpdateStatus :: Lens' NodeGroupUpdateStatus (Maybe [NodeGroupMemberUpdateStatus])
nodeGroupUpdateStatus_nodeGroupMemberUpdateStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NodeGroupUpdateStatus' {Maybe [NodeGroupMemberUpdateStatus]
nodeGroupMemberUpdateStatus :: Maybe [NodeGroupMemberUpdateStatus]
$sel:nodeGroupMemberUpdateStatus:NodeGroupUpdateStatus' :: NodeGroupUpdateStatus -> Maybe [NodeGroupMemberUpdateStatus]
nodeGroupMemberUpdateStatus} -> Maybe [NodeGroupMemberUpdateStatus]
nodeGroupMemberUpdateStatus) (\s :: NodeGroupUpdateStatus
s@NodeGroupUpdateStatus' {} Maybe [NodeGroupMemberUpdateStatus]
a -> NodeGroupUpdateStatus
s {$sel:nodeGroupMemberUpdateStatus:NodeGroupUpdateStatus' :: Maybe [NodeGroupMemberUpdateStatus]
nodeGroupMemberUpdateStatus = Maybe [NodeGroupMemberUpdateStatus]
a} :: NodeGroupUpdateStatus) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromXML NodeGroupUpdateStatus where
parseXML :: [Node] -> Either String NodeGroupUpdateStatus
parseXML [Node]
x =
Maybe Text
-> Maybe [NodeGroupMemberUpdateStatus] -> NodeGroupUpdateStatus
NodeGroupUpdateStatus'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NodeGroupId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NodeGroupMemberUpdateStatus"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
(forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"NodeGroupMemberUpdateStatus")
)
instance Prelude.Hashable NodeGroupUpdateStatus where
hashWithSalt :: Int -> NodeGroupUpdateStatus -> Int
hashWithSalt Int
_salt NodeGroupUpdateStatus' {Maybe [NodeGroupMemberUpdateStatus]
Maybe Text
nodeGroupMemberUpdateStatus :: Maybe [NodeGroupMemberUpdateStatus]
nodeGroupId :: Maybe Text
$sel:nodeGroupMemberUpdateStatus:NodeGroupUpdateStatus' :: NodeGroupUpdateStatus -> Maybe [NodeGroupMemberUpdateStatus]
$sel:nodeGroupId:NodeGroupUpdateStatus' :: NodeGroupUpdateStatus -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nodeGroupId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [NodeGroupMemberUpdateStatus]
nodeGroupMemberUpdateStatus
instance Prelude.NFData NodeGroupUpdateStatus where
rnf :: NodeGroupUpdateStatus -> ()
rnf NodeGroupUpdateStatus' {Maybe [NodeGroupMemberUpdateStatus]
Maybe Text
nodeGroupMemberUpdateStatus :: Maybe [NodeGroupMemberUpdateStatus]
nodeGroupId :: Maybe Text
$sel:nodeGroupMemberUpdateStatus:NodeGroupUpdateStatus' :: NodeGroupUpdateStatus -> Maybe [NodeGroupMemberUpdateStatus]
$sel:nodeGroupId:NodeGroupUpdateStatus' :: NodeGroupUpdateStatus -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nodeGroupId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [NodeGroupMemberUpdateStatus]
nodeGroupMemberUpdateStatus