{-# 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.CacheParameterGroupStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CacheParameterGroupStatus = CacheParameterGroupStatus'
{
CacheParameterGroupStatus -> Maybe [Text]
cacheNodeIdsToReboot :: Prelude.Maybe [Prelude.Text],
CacheParameterGroupStatus -> Maybe Text
cacheParameterGroupName :: Prelude.Maybe Prelude.Text,
CacheParameterGroupStatus -> Maybe Text
parameterApplyStatus :: Prelude.Maybe Prelude.Text
}
deriving (CacheParameterGroupStatus -> CacheParameterGroupStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheParameterGroupStatus -> CacheParameterGroupStatus -> Bool
$c/= :: CacheParameterGroupStatus -> CacheParameterGroupStatus -> Bool
== :: CacheParameterGroupStatus -> CacheParameterGroupStatus -> Bool
$c== :: CacheParameterGroupStatus -> CacheParameterGroupStatus -> Bool
Prelude.Eq, ReadPrec [CacheParameterGroupStatus]
ReadPrec CacheParameterGroupStatus
Int -> ReadS CacheParameterGroupStatus
ReadS [CacheParameterGroupStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CacheParameterGroupStatus]
$creadListPrec :: ReadPrec [CacheParameterGroupStatus]
readPrec :: ReadPrec CacheParameterGroupStatus
$creadPrec :: ReadPrec CacheParameterGroupStatus
readList :: ReadS [CacheParameterGroupStatus]
$creadList :: ReadS [CacheParameterGroupStatus]
readsPrec :: Int -> ReadS CacheParameterGroupStatus
$creadsPrec :: Int -> ReadS CacheParameterGroupStatus
Prelude.Read, Int -> CacheParameterGroupStatus -> ShowS
[CacheParameterGroupStatus] -> ShowS
CacheParameterGroupStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheParameterGroupStatus] -> ShowS
$cshowList :: [CacheParameterGroupStatus] -> ShowS
show :: CacheParameterGroupStatus -> String
$cshow :: CacheParameterGroupStatus -> String
showsPrec :: Int -> CacheParameterGroupStatus -> ShowS
$cshowsPrec :: Int -> CacheParameterGroupStatus -> ShowS
Prelude.Show, forall x.
Rep CacheParameterGroupStatus x -> CacheParameterGroupStatus
forall x.
CacheParameterGroupStatus -> Rep CacheParameterGroupStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CacheParameterGroupStatus x -> CacheParameterGroupStatus
$cfrom :: forall x.
CacheParameterGroupStatus -> Rep CacheParameterGroupStatus x
Prelude.Generic)
newCacheParameterGroupStatus ::
CacheParameterGroupStatus
newCacheParameterGroupStatus :: CacheParameterGroupStatus
newCacheParameterGroupStatus =
CacheParameterGroupStatus'
{ $sel:cacheNodeIdsToReboot:CacheParameterGroupStatus' :: Maybe [Text]
cacheNodeIdsToReboot =
forall a. Maybe a
Prelude.Nothing,
$sel:cacheParameterGroupName:CacheParameterGroupStatus' :: Maybe Text
cacheParameterGroupName = forall a. Maybe a
Prelude.Nothing,
$sel:parameterApplyStatus:CacheParameterGroupStatus' :: Maybe Text
parameterApplyStatus = forall a. Maybe a
Prelude.Nothing
}
cacheParameterGroupStatus_cacheNodeIdsToReboot :: Lens.Lens' CacheParameterGroupStatus (Prelude.Maybe [Prelude.Text])
cacheParameterGroupStatus_cacheNodeIdsToReboot :: Lens' CacheParameterGroupStatus (Maybe [Text])
cacheParameterGroupStatus_cacheNodeIdsToReboot = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheParameterGroupStatus' {Maybe [Text]
cacheNodeIdsToReboot :: Maybe [Text]
$sel:cacheNodeIdsToReboot:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe [Text]
cacheNodeIdsToReboot} -> Maybe [Text]
cacheNodeIdsToReboot) (\s :: CacheParameterGroupStatus
s@CacheParameterGroupStatus' {} Maybe [Text]
a -> CacheParameterGroupStatus
s {$sel:cacheNodeIdsToReboot:CacheParameterGroupStatus' :: Maybe [Text]
cacheNodeIdsToReboot = Maybe [Text]
a} :: CacheParameterGroupStatus) 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
cacheParameterGroupStatus_cacheParameterGroupName :: Lens.Lens' CacheParameterGroupStatus (Prelude.Maybe Prelude.Text)
cacheParameterGroupStatus_cacheParameterGroupName :: Lens' CacheParameterGroupStatus (Maybe Text)
cacheParameterGroupStatus_cacheParameterGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheParameterGroupStatus' {Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:cacheParameterGroupName:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe Text
cacheParameterGroupName} -> Maybe Text
cacheParameterGroupName) (\s :: CacheParameterGroupStatus
s@CacheParameterGroupStatus' {} Maybe Text
a -> CacheParameterGroupStatus
s {$sel:cacheParameterGroupName:CacheParameterGroupStatus' :: Maybe Text
cacheParameterGroupName = Maybe Text
a} :: CacheParameterGroupStatus)
cacheParameterGroupStatus_parameterApplyStatus :: Lens.Lens' CacheParameterGroupStatus (Prelude.Maybe Prelude.Text)
cacheParameterGroupStatus_parameterApplyStatus :: Lens' CacheParameterGroupStatus (Maybe Text)
cacheParameterGroupStatus_parameterApplyStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheParameterGroupStatus' {Maybe Text
parameterApplyStatus :: Maybe Text
$sel:parameterApplyStatus:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe Text
parameterApplyStatus} -> Maybe Text
parameterApplyStatus) (\s :: CacheParameterGroupStatus
s@CacheParameterGroupStatus' {} Maybe Text
a -> CacheParameterGroupStatus
s {$sel:parameterApplyStatus:CacheParameterGroupStatus' :: Maybe Text
parameterApplyStatus = Maybe Text
a} :: CacheParameterGroupStatus)
instance Data.FromXML CacheParameterGroupStatus where
parseXML :: [Node] -> Either String CacheParameterGroupStatus
parseXML [Node]
x =
Maybe [Text]
-> Maybe Text -> Maybe Text -> CacheParameterGroupStatus
CacheParameterGroupStatus'
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
"CacheNodeIdsToReboot"
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
"CacheNodeId")
)
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
"CacheParameterGroupName")
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
"ParameterApplyStatus")
instance Prelude.Hashable CacheParameterGroupStatus where
hashWithSalt :: Int -> CacheParameterGroupStatus -> Int
hashWithSalt Int
_salt CacheParameterGroupStatus' {Maybe [Text]
Maybe Text
parameterApplyStatus :: Maybe Text
cacheParameterGroupName :: Maybe Text
cacheNodeIdsToReboot :: Maybe [Text]
$sel:parameterApplyStatus:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe Text
$sel:cacheParameterGroupName:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe Text
$sel:cacheNodeIdsToReboot:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
cacheNodeIdsToReboot
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheParameterGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parameterApplyStatus
instance Prelude.NFData CacheParameterGroupStatus where
rnf :: CacheParameterGroupStatus -> ()
rnf CacheParameterGroupStatus' {Maybe [Text]
Maybe Text
parameterApplyStatus :: Maybe Text
cacheParameterGroupName :: Maybe Text
cacheNodeIdsToReboot :: Maybe [Text]
$sel:parameterApplyStatus:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe Text
$sel:cacheParameterGroupName:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe Text
$sel:cacheNodeIdsToReboot:CacheParameterGroupStatus' :: CacheParameterGroupStatus -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
cacheNodeIdsToReboot
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheParameterGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parameterApplyStatus