{-# 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.PendingModifiedValues where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.AuthTokenUpdateStatus
import Amazonka.ElastiCache.Types.PendingLogDeliveryConfiguration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PendingModifiedValues = PendingModifiedValues'
{
PendingModifiedValues -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
PendingModifiedValues -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
PendingModifiedValues -> Maybe AuthTokenUpdateStatus
authTokenStatus :: Prelude.Maybe AuthTokenUpdateStatus,
PendingModifiedValues -> Maybe [PendingLogDeliveryConfiguration]
logDeliveryConfigurations :: Prelude.Maybe [PendingLogDeliveryConfiguration],
PendingModifiedValues -> Maybe [Text]
cacheNodeIdsToRemove :: Prelude.Maybe [Prelude.Text],
PendingModifiedValues -> Maybe Int
numCacheNodes :: Prelude.Maybe Prelude.Int
}
deriving (PendingModifiedValues -> PendingModifiedValues -> Bool
(PendingModifiedValues -> PendingModifiedValues -> Bool)
-> (PendingModifiedValues -> PendingModifiedValues -> Bool)
-> Eq PendingModifiedValues
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PendingModifiedValues -> PendingModifiedValues -> Bool
$c/= :: PendingModifiedValues -> PendingModifiedValues -> Bool
== :: PendingModifiedValues -> PendingModifiedValues -> Bool
$c== :: PendingModifiedValues -> PendingModifiedValues -> Bool
Prelude.Eq, ReadPrec [PendingModifiedValues]
ReadPrec PendingModifiedValues
Int -> ReadS PendingModifiedValues
ReadS [PendingModifiedValues]
(Int -> ReadS PendingModifiedValues)
-> ReadS [PendingModifiedValues]
-> ReadPrec PendingModifiedValues
-> ReadPrec [PendingModifiedValues]
-> Read PendingModifiedValues
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PendingModifiedValues]
$creadListPrec :: ReadPrec [PendingModifiedValues]
readPrec :: ReadPrec PendingModifiedValues
$creadPrec :: ReadPrec PendingModifiedValues
readList :: ReadS [PendingModifiedValues]
$creadList :: ReadS [PendingModifiedValues]
readsPrec :: Int -> ReadS PendingModifiedValues
$creadsPrec :: Int -> ReadS PendingModifiedValues
Prelude.Read, Int -> PendingModifiedValues -> ShowS
[PendingModifiedValues] -> ShowS
PendingModifiedValues -> String
(Int -> PendingModifiedValues -> ShowS)
-> (PendingModifiedValues -> String)
-> ([PendingModifiedValues] -> ShowS)
-> Show PendingModifiedValues
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PendingModifiedValues] -> ShowS
$cshowList :: [PendingModifiedValues] -> ShowS
show :: PendingModifiedValues -> String
$cshow :: PendingModifiedValues -> String
showsPrec :: Int -> PendingModifiedValues -> ShowS
$cshowsPrec :: Int -> PendingModifiedValues -> ShowS
Prelude.Show, (forall x. PendingModifiedValues -> Rep PendingModifiedValues x)
-> (forall x. Rep PendingModifiedValues x -> PendingModifiedValues)
-> Generic PendingModifiedValues
forall x. Rep PendingModifiedValues x -> PendingModifiedValues
forall x. PendingModifiedValues -> Rep PendingModifiedValues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PendingModifiedValues x -> PendingModifiedValues
$cfrom :: forall x. PendingModifiedValues -> Rep PendingModifiedValues x
Prelude.Generic)
newPendingModifiedValues ::
PendingModifiedValues
newPendingModifiedValues :: PendingModifiedValues
newPendingModifiedValues =
PendingModifiedValues' :: Maybe Text
-> Maybe Text
-> Maybe AuthTokenUpdateStatus
-> Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text]
-> Maybe Int
-> PendingModifiedValues
PendingModifiedValues'
{ $sel:engineVersion:PendingModifiedValues' :: Maybe Text
engineVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cacheNodeType:PendingModifiedValues' :: Maybe Text
cacheNodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authTokenStatus:PendingModifiedValues' :: Maybe AuthTokenUpdateStatus
authTokenStatus = Maybe AuthTokenUpdateStatus
forall a. Maybe a
Prelude.Nothing,
$sel:logDeliveryConfigurations:PendingModifiedValues' :: Maybe [PendingLogDeliveryConfiguration]
logDeliveryConfigurations = Maybe [PendingLogDeliveryConfiguration]
forall a. Maybe a
Prelude.Nothing,
$sel:cacheNodeIdsToRemove:PendingModifiedValues' :: Maybe [Text]
cacheNodeIdsToRemove = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:numCacheNodes:PendingModifiedValues' :: Maybe Int
numCacheNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
pendingModifiedValues_engineVersion :: Lens.Lens' PendingModifiedValues (Prelude.Maybe Prelude.Text)
pendingModifiedValues_engineVersion :: (Maybe Text -> f (Maybe Text))
-> PendingModifiedValues -> f PendingModifiedValues
pendingModifiedValues_engineVersion = (PendingModifiedValues -> Maybe Text)
-> (PendingModifiedValues -> Maybe Text -> PendingModifiedValues)
-> Lens
PendingModifiedValues
PendingModifiedValues
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingModifiedValues' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:PendingModifiedValues' :: PendingModifiedValues -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: PendingModifiedValues
s@PendingModifiedValues' {} Maybe Text
a -> PendingModifiedValues
s {$sel:engineVersion:PendingModifiedValues' :: Maybe Text
engineVersion = Maybe Text
a} :: PendingModifiedValues)
pendingModifiedValues_cacheNodeType :: Lens.Lens' PendingModifiedValues (Prelude.Maybe Prelude.Text)
pendingModifiedValues_cacheNodeType :: (Maybe Text -> f (Maybe Text))
-> PendingModifiedValues -> f PendingModifiedValues
pendingModifiedValues_cacheNodeType = (PendingModifiedValues -> Maybe Text)
-> (PendingModifiedValues -> Maybe Text -> PendingModifiedValues)
-> Lens
PendingModifiedValues
PendingModifiedValues
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingModifiedValues' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:PendingModifiedValues' :: PendingModifiedValues -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: PendingModifiedValues
s@PendingModifiedValues' {} Maybe Text
a -> PendingModifiedValues
s {$sel:cacheNodeType:PendingModifiedValues' :: Maybe Text
cacheNodeType = Maybe Text
a} :: PendingModifiedValues)
pendingModifiedValues_authTokenStatus :: Lens.Lens' PendingModifiedValues (Prelude.Maybe AuthTokenUpdateStatus)
pendingModifiedValues_authTokenStatus :: (Maybe AuthTokenUpdateStatus -> f (Maybe AuthTokenUpdateStatus))
-> PendingModifiedValues -> f PendingModifiedValues
pendingModifiedValues_authTokenStatus = (PendingModifiedValues -> Maybe AuthTokenUpdateStatus)
-> (PendingModifiedValues
-> Maybe AuthTokenUpdateStatus -> PendingModifiedValues)
-> Lens
PendingModifiedValues
PendingModifiedValues
(Maybe AuthTokenUpdateStatus)
(Maybe AuthTokenUpdateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingModifiedValues' {Maybe AuthTokenUpdateStatus
authTokenStatus :: Maybe AuthTokenUpdateStatus
$sel:authTokenStatus:PendingModifiedValues' :: PendingModifiedValues -> Maybe AuthTokenUpdateStatus
authTokenStatus} -> Maybe AuthTokenUpdateStatus
authTokenStatus) (\s :: PendingModifiedValues
s@PendingModifiedValues' {} Maybe AuthTokenUpdateStatus
a -> PendingModifiedValues
s {$sel:authTokenStatus:PendingModifiedValues' :: Maybe AuthTokenUpdateStatus
authTokenStatus = Maybe AuthTokenUpdateStatus
a} :: PendingModifiedValues)
pendingModifiedValues_logDeliveryConfigurations :: Lens.Lens' PendingModifiedValues (Prelude.Maybe [PendingLogDeliveryConfiguration])
pendingModifiedValues_logDeliveryConfigurations :: (Maybe [PendingLogDeliveryConfiguration]
-> f (Maybe [PendingLogDeliveryConfiguration]))
-> PendingModifiedValues -> f PendingModifiedValues
pendingModifiedValues_logDeliveryConfigurations = (PendingModifiedValues -> Maybe [PendingLogDeliveryConfiguration])
-> (PendingModifiedValues
-> Maybe [PendingLogDeliveryConfiguration]
-> PendingModifiedValues)
-> Lens
PendingModifiedValues
PendingModifiedValues
(Maybe [PendingLogDeliveryConfiguration])
(Maybe [PendingLogDeliveryConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingModifiedValues' {Maybe [PendingLogDeliveryConfiguration]
logDeliveryConfigurations :: Maybe [PendingLogDeliveryConfiguration]
$sel:logDeliveryConfigurations:PendingModifiedValues' :: PendingModifiedValues -> Maybe [PendingLogDeliveryConfiguration]
logDeliveryConfigurations} -> Maybe [PendingLogDeliveryConfiguration]
logDeliveryConfigurations) (\s :: PendingModifiedValues
s@PendingModifiedValues' {} Maybe [PendingLogDeliveryConfiguration]
a -> PendingModifiedValues
s {$sel:logDeliveryConfigurations:PendingModifiedValues' :: Maybe [PendingLogDeliveryConfiguration]
logDeliveryConfigurations = Maybe [PendingLogDeliveryConfiguration]
a} :: PendingModifiedValues) ((Maybe [PendingLogDeliveryConfiguration]
-> f (Maybe [PendingLogDeliveryConfiguration]))
-> PendingModifiedValues -> f PendingModifiedValues)
-> ((Maybe [PendingLogDeliveryConfiguration]
-> f (Maybe [PendingLogDeliveryConfiguration]))
-> Maybe [PendingLogDeliveryConfiguration]
-> f (Maybe [PendingLogDeliveryConfiguration]))
-> (Maybe [PendingLogDeliveryConfiguration]
-> f (Maybe [PendingLogDeliveryConfiguration]))
-> PendingModifiedValues
-> f PendingModifiedValues
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PendingLogDeliveryConfiguration]
[PendingLogDeliveryConfiguration]
[PendingLogDeliveryConfiguration]
[PendingLogDeliveryConfiguration]
-> Iso
(Maybe [PendingLogDeliveryConfiguration])
(Maybe [PendingLogDeliveryConfiguration])
(Maybe [PendingLogDeliveryConfiguration])
(Maybe [PendingLogDeliveryConfiguration])
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
[PendingLogDeliveryConfiguration]
[PendingLogDeliveryConfiguration]
[PendingLogDeliveryConfiguration]
[PendingLogDeliveryConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
pendingModifiedValues_cacheNodeIdsToRemove :: Lens.Lens' PendingModifiedValues (Prelude.Maybe [Prelude.Text])
pendingModifiedValues_cacheNodeIdsToRemove :: (Maybe [Text] -> f (Maybe [Text]))
-> PendingModifiedValues -> f PendingModifiedValues
pendingModifiedValues_cacheNodeIdsToRemove = (PendingModifiedValues -> Maybe [Text])
-> (PendingModifiedValues -> Maybe [Text] -> PendingModifiedValues)
-> Lens
PendingModifiedValues
PendingModifiedValues
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingModifiedValues' {Maybe [Text]
cacheNodeIdsToRemove :: Maybe [Text]
$sel:cacheNodeIdsToRemove:PendingModifiedValues' :: PendingModifiedValues -> Maybe [Text]
cacheNodeIdsToRemove} -> Maybe [Text]
cacheNodeIdsToRemove) (\s :: PendingModifiedValues
s@PendingModifiedValues' {} Maybe [Text]
a -> PendingModifiedValues
s {$sel:cacheNodeIdsToRemove:PendingModifiedValues' :: Maybe [Text]
cacheNodeIdsToRemove = Maybe [Text]
a} :: PendingModifiedValues) ((Maybe [Text] -> f (Maybe [Text]))
-> PendingModifiedValues -> f PendingModifiedValues)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PendingModifiedValues
-> f PendingModifiedValues
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
pendingModifiedValues_numCacheNodes :: Lens.Lens' PendingModifiedValues (Prelude.Maybe Prelude.Int)
pendingModifiedValues_numCacheNodes :: (Maybe Int -> f (Maybe Int))
-> PendingModifiedValues -> f PendingModifiedValues
pendingModifiedValues_numCacheNodes = (PendingModifiedValues -> Maybe Int)
-> (PendingModifiedValues -> Maybe Int -> PendingModifiedValues)
-> Lens
PendingModifiedValues PendingModifiedValues (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PendingModifiedValues' {Maybe Int
numCacheNodes :: Maybe Int
$sel:numCacheNodes:PendingModifiedValues' :: PendingModifiedValues -> Maybe Int
numCacheNodes} -> Maybe Int
numCacheNodes) (\s :: PendingModifiedValues
s@PendingModifiedValues' {} Maybe Int
a -> PendingModifiedValues
s {$sel:numCacheNodes:PendingModifiedValues' :: Maybe Int
numCacheNodes = Maybe Int
a} :: PendingModifiedValues)
instance Core.FromXML PendingModifiedValues where
parseXML :: [Node] -> Either String PendingModifiedValues
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe AuthTokenUpdateStatus
-> Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text]
-> Maybe Int
-> PendingModifiedValues
PendingModifiedValues'
(Maybe Text
-> Maybe Text
-> Maybe AuthTokenUpdateStatus
-> Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text]
-> Maybe Int
-> PendingModifiedValues)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe AuthTokenUpdateStatus
-> Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text]
-> Maybe Int
-> PendingModifiedValues)
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 AuthTokenUpdateStatus
-> Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text]
-> Maybe Int
-> PendingModifiedValues)
-> Either String (Maybe Text)
-> Either
String
(Maybe AuthTokenUpdateStatus
-> Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text]
-> Maybe Int
-> PendingModifiedValues)
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
"CacheNodeType")
Either
String
(Maybe AuthTokenUpdateStatus
-> Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text]
-> Maybe Int
-> PendingModifiedValues)
-> Either String (Maybe AuthTokenUpdateStatus)
-> Either
String
(Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text] -> Maybe Int -> PendingModifiedValues)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe AuthTokenUpdateStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AuthTokenStatus")
Either
String
(Maybe [PendingLogDeliveryConfiguration]
-> Maybe [Text] -> Maybe Int -> PendingModifiedValues)
-> Either String (Maybe [PendingLogDeliveryConfiguration])
-> Either
String (Maybe [Text] -> Maybe Int -> PendingModifiedValues)
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
"LogDeliveryConfigurations"
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 [PendingLogDeliveryConfiguration]))
-> Either String (Maybe [PendingLogDeliveryConfiguration])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [PendingLogDeliveryConfiguration])
-> [Node]
-> Either String (Maybe [PendingLogDeliveryConfiguration])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [PendingLogDeliveryConfiguration]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Maybe [Text] -> Maybe Int -> PendingModifiedValues)
-> Either String (Maybe [Text])
-> Either String (Maybe Int -> PendingModifiedValues)
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
"CacheNodeIdsToRemove"
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 [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"CacheNodeId")
)
Either String (Maybe Int -> PendingModifiedValues)
-> Either String (Maybe Int) -> Either String PendingModifiedValues
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NumCacheNodes")
instance Prelude.Hashable PendingModifiedValues
instance Prelude.NFData PendingModifiedValues