{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ElastiCache.DescribeCacheClusters
(
DescribeCacheClusters (..),
newDescribeCacheClusters,
describeCacheClusters_showCacheClustersNotInReplicationGroups,
describeCacheClusters_cacheClusterId,
describeCacheClusters_marker,
describeCacheClusters_maxRecords,
describeCacheClusters_showCacheNodeInfo,
DescribeCacheClustersResponse (..),
newDescribeCacheClustersResponse,
describeCacheClustersResponse_cacheClusters,
describeCacheClustersResponse_marker,
describeCacheClustersResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeCacheClusters = DescribeCacheClusters'
{
DescribeCacheClusters -> Maybe Bool
showCacheClustersNotInReplicationGroups :: Prelude.Maybe Prelude.Bool,
DescribeCacheClusters -> Maybe Text
cacheClusterId :: Prelude.Maybe Prelude.Text,
DescribeCacheClusters -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeCacheClusters -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
DescribeCacheClusters -> Maybe Bool
showCacheNodeInfo :: Prelude.Maybe Prelude.Bool
}
deriving (DescribeCacheClusters -> DescribeCacheClusters -> Bool
(DescribeCacheClusters -> DescribeCacheClusters -> Bool)
-> (DescribeCacheClusters -> DescribeCacheClusters -> Bool)
-> Eq DescribeCacheClusters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCacheClusters -> DescribeCacheClusters -> Bool
$c/= :: DescribeCacheClusters -> DescribeCacheClusters -> Bool
== :: DescribeCacheClusters -> DescribeCacheClusters -> Bool
$c== :: DescribeCacheClusters -> DescribeCacheClusters -> Bool
Prelude.Eq, ReadPrec [DescribeCacheClusters]
ReadPrec DescribeCacheClusters
Int -> ReadS DescribeCacheClusters
ReadS [DescribeCacheClusters]
(Int -> ReadS DescribeCacheClusters)
-> ReadS [DescribeCacheClusters]
-> ReadPrec DescribeCacheClusters
-> ReadPrec [DescribeCacheClusters]
-> Read DescribeCacheClusters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCacheClusters]
$creadListPrec :: ReadPrec [DescribeCacheClusters]
readPrec :: ReadPrec DescribeCacheClusters
$creadPrec :: ReadPrec DescribeCacheClusters
readList :: ReadS [DescribeCacheClusters]
$creadList :: ReadS [DescribeCacheClusters]
readsPrec :: Int -> ReadS DescribeCacheClusters
$creadsPrec :: Int -> ReadS DescribeCacheClusters
Prelude.Read, Int -> DescribeCacheClusters -> ShowS
[DescribeCacheClusters] -> ShowS
DescribeCacheClusters -> String
(Int -> DescribeCacheClusters -> ShowS)
-> (DescribeCacheClusters -> String)
-> ([DescribeCacheClusters] -> ShowS)
-> Show DescribeCacheClusters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCacheClusters] -> ShowS
$cshowList :: [DescribeCacheClusters] -> ShowS
show :: DescribeCacheClusters -> String
$cshow :: DescribeCacheClusters -> String
showsPrec :: Int -> DescribeCacheClusters -> ShowS
$cshowsPrec :: Int -> DescribeCacheClusters -> ShowS
Prelude.Show, (forall x. DescribeCacheClusters -> Rep DescribeCacheClusters x)
-> (forall x. Rep DescribeCacheClusters x -> DescribeCacheClusters)
-> Generic DescribeCacheClusters
forall x. Rep DescribeCacheClusters x -> DescribeCacheClusters
forall x. DescribeCacheClusters -> Rep DescribeCacheClusters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeCacheClusters x -> DescribeCacheClusters
$cfrom :: forall x. DescribeCacheClusters -> Rep DescribeCacheClusters x
Prelude.Generic)
newDescribeCacheClusters ::
DescribeCacheClusters
newDescribeCacheClusters :: DescribeCacheClusters
newDescribeCacheClusters =
DescribeCacheClusters' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> DescribeCacheClusters
DescribeCacheClusters'
{ $sel:showCacheClustersNotInReplicationGroups:DescribeCacheClusters' :: Maybe Bool
showCacheClustersNotInReplicationGroups =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:cacheClusterId:DescribeCacheClusters' :: Maybe Text
cacheClusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeCacheClusters' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeCacheClusters' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:showCacheNodeInfo:DescribeCacheClusters' :: Maybe Bool
showCacheNodeInfo = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
describeCacheClusters_showCacheClustersNotInReplicationGroups :: Lens.Lens' DescribeCacheClusters (Prelude.Maybe Prelude.Bool)
describeCacheClusters_showCacheClustersNotInReplicationGroups :: (Maybe Bool -> f (Maybe Bool))
-> DescribeCacheClusters -> f DescribeCacheClusters
describeCacheClusters_showCacheClustersNotInReplicationGroups = (DescribeCacheClusters -> Maybe Bool)
-> (DescribeCacheClusters -> Maybe Bool -> DescribeCacheClusters)
-> Lens
DescribeCacheClusters
DescribeCacheClusters
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheClusters' {Maybe Bool
showCacheClustersNotInReplicationGroups :: Maybe Bool
$sel:showCacheClustersNotInReplicationGroups:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Bool
showCacheClustersNotInReplicationGroups} -> Maybe Bool
showCacheClustersNotInReplicationGroups) (\s :: DescribeCacheClusters
s@DescribeCacheClusters' {} Maybe Bool
a -> DescribeCacheClusters
s {$sel:showCacheClustersNotInReplicationGroups:DescribeCacheClusters' :: Maybe Bool
showCacheClustersNotInReplicationGroups = Maybe Bool
a} :: DescribeCacheClusters)
describeCacheClusters_cacheClusterId :: Lens.Lens' DescribeCacheClusters (Prelude.Maybe Prelude.Text)
describeCacheClusters_cacheClusterId :: (Maybe Text -> f (Maybe Text))
-> DescribeCacheClusters -> f DescribeCacheClusters
describeCacheClusters_cacheClusterId = (DescribeCacheClusters -> Maybe Text)
-> (DescribeCacheClusters -> Maybe Text -> DescribeCacheClusters)
-> Lens
DescribeCacheClusters
DescribeCacheClusters
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheClusters' {Maybe Text
cacheClusterId :: Maybe Text
$sel:cacheClusterId:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Text
cacheClusterId} -> Maybe Text
cacheClusterId) (\s :: DescribeCacheClusters
s@DescribeCacheClusters' {} Maybe Text
a -> DescribeCacheClusters
s {$sel:cacheClusterId:DescribeCacheClusters' :: Maybe Text
cacheClusterId = Maybe Text
a} :: DescribeCacheClusters)
describeCacheClusters_marker :: Lens.Lens' DescribeCacheClusters (Prelude.Maybe Prelude.Text)
describeCacheClusters_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeCacheClusters -> f DescribeCacheClusters
describeCacheClusters_marker = (DescribeCacheClusters -> Maybe Text)
-> (DescribeCacheClusters -> Maybe Text -> DescribeCacheClusters)
-> Lens
DescribeCacheClusters
DescribeCacheClusters
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheClusters' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeCacheClusters
s@DescribeCacheClusters' {} Maybe Text
a -> DescribeCacheClusters
s {$sel:marker:DescribeCacheClusters' :: Maybe Text
marker = Maybe Text
a} :: DescribeCacheClusters)
describeCacheClusters_maxRecords :: Lens.Lens' DescribeCacheClusters (Prelude.Maybe Prelude.Int)
describeCacheClusters_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeCacheClusters -> f DescribeCacheClusters
describeCacheClusters_maxRecords = (DescribeCacheClusters -> Maybe Int)
-> (DescribeCacheClusters -> Maybe Int -> DescribeCacheClusters)
-> Lens
DescribeCacheClusters DescribeCacheClusters (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheClusters' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeCacheClusters
s@DescribeCacheClusters' {} Maybe Int
a -> DescribeCacheClusters
s {$sel:maxRecords:DescribeCacheClusters' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeCacheClusters)
describeCacheClusters_showCacheNodeInfo :: Lens.Lens' DescribeCacheClusters (Prelude.Maybe Prelude.Bool)
describeCacheClusters_showCacheNodeInfo :: (Maybe Bool -> f (Maybe Bool))
-> DescribeCacheClusters -> f DescribeCacheClusters
describeCacheClusters_showCacheNodeInfo = (DescribeCacheClusters -> Maybe Bool)
-> (DescribeCacheClusters -> Maybe Bool -> DescribeCacheClusters)
-> Lens
DescribeCacheClusters
DescribeCacheClusters
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheClusters' {Maybe Bool
showCacheNodeInfo :: Maybe Bool
$sel:showCacheNodeInfo:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Bool
showCacheNodeInfo} -> Maybe Bool
showCacheNodeInfo) (\s :: DescribeCacheClusters
s@DescribeCacheClusters' {} Maybe Bool
a -> DescribeCacheClusters
s {$sel:showCacheNodeInfo:DescribeCacheClusters' :: Maybe Bool
showCacheNodeInfo = Maybe Bool
a} :: DescribeCacheClusters)
instance Core.AWSPager DescribeCacheClusters where
page :: DescribeCacheClusters
-> AWSResponse DescribeCacheClusters -> Maybe DescribeCacheClusters
page DescribeCacheClusters
rq AWSResponse DescribeCacheClusters
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeCacheClusters
DescribeCacheClustersResponse
rs
DescribeCacheClustersResponse
-> Getting (First Text) DescribeCacheClustersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeCacheClustersResponse
-> Const (First Text) DescribeCacheClustersResponse
Lens' DescribeCacheClustersResponse (Maybe Text)
describeCacheClustersResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeCacheClustersResponse
-> Const (First Text) DescribeCacheClustersResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeCacheClustersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeCacheClusters
forall a. Maybe a
Prelude.Nothing
| Maybe [CacheCluster] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeCacheClusters
DescribeCacheClustersResponse
rs
DescribeCacheClustersResponse
-> Getting
(First [CacheCluster]) DescribeCacheClustersResponse [CacheCluster]
-> Maybe [CacheCluster]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [CacheCluster]
-> Const (First [CacheCluster]) (Maybe [CacheCluster]))
-> DescribeCacheClustersResponse
-> Const (First [CacheCluster]) DescribeCacheClustersResponse
Lens' DescribeCacheClustersResponse (Maybe [CacheCluster])
describeCacheClustersResponse_cacheClusters
((Maybe [CacheCluster]
-> Const (First [CacheCluster]) (Maybe [CacheCluster]))
-> DescribeCacheClustersResponse
-> Const (First [CacheCluster]) DescribeCacheClustersResponse)
-> (([CacheCluster] -> Const (First [CacheCluster]) [CacheCluster])
-> Maybe [CacheCluster]
-> Const (First [CacheCluster]) (Maybe [CacheCluster]))
-> Getting
(First [CacheCluster]) DescribeCacheClustersResponse [CacheCluster]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([CacheCluster] -> Const (First [CacheCluster]) [CacheCluster])
-> Maybe [CacheCluster]
-> Const (First [CacheCluster]) (Maybe [CacheCluster])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeCacheClusters
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeCacheClusters -> Maybe DescribeCacheClusters
forall a. a -> Maybe a
Prelude.Just (DescribeCacheClusters -> Maybe DescribeCacheClusters)
-> DescribeCacheClusters -> Maybe DescribeCacheClusters
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeCacheClusters
rq
DescribeCacheClusters
-> (DescribeCacheClusters -> DescribeCacheClusters)
-> DescribeCacheClusters
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeCacheClusters -> Identity DescribeCacheClusters
Lens
DescribeCacheClusters
DescribeCacheClusters
(Maybe Text)
(Maybe Text)
describeCacheClusters_marker
((Maybe Text -> Identity (Maybe Text))
-> DescribeCacheClusters -> Identity DescribeCacheClusters)
-> Maybe Text -> DescribeCacheClusters -> DescribeCacheClusters
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeCacheClusters
DescribeCacheClustersResponse
rs
DescribeCacheClustersResponse
-> Getting (First Text) DescribeCacheClustersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeCacheClustersResponse
-> Const (First Text) DescribeCacheClustersResponse
Lens' DescribeCacheClustersResponse (Maybe Text)
describeCacheClustersResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeCacheClustersResponse
-> Const (First Text) DescribeCacheClustersResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeCacheClustersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeCacheClusters where
type
AWSResponse DescribeCacheClusters =
DescribeCacheClustersResponse
request :: DescribeCacheClusters -> Request DescribeCacheClusters
request = Service -> DescribeCacheClusters -> Request DescribeCacheClusters
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeCacheClusters
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeCacheClusters)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeCacheClusters))
-> Logger
-> Service
-> Proxy DescribeCacheClusters
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeCacheClusters)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeCacheClustersResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [CacheCluster]
-> Maybe Text -> Int -> DescribeCacheClustersResponse
DescribeCacheClustersResponse'
(Maybe [CacheCluster]
-> Maybe Text -> Int -> DescribeCacheClustersResponse)
-> Either String (Maybe [CacheCluster])
-> Either
String (Maybe Text -> Int -> DescribeCacheClustersResponse)
forall (f :: * -> *) a b. Functor 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
"CacheClusters" 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 [CacheCluster]))
-> Either String (Maybe [CacheCluster])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [CacheCluster])
-> [Node] -> Either String (Maybe [CacheCluster])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [CacheCluster]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"CacheCluster")
)
Either String (Maybe Text -> Int -> DescribeCacheClustersResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeCacheClustersResponse)
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
"Marker")
Either String (Int -> DescribeCacheClustersResponse)
-> Either String Int -> Either String DescribeCacheClustersResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DescribeCacheClusters
instance Prelude.NFData DescribeCacheClusters
instance Core.ToHeaders DescribeCacheClusters where
toHeaders :: DescribeCacheClusters -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeCacheClusters -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeCacheClusters where
toPath :: DescribeCacheClusters -> ByteString
toPath = ByteString -> DescribeCacheClusters -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeCacheClusters where
toQuery :: DescribeCacheClusters -> QueryString
toQuery DescribeCacheClusters' {Maybe Bool
Maybe Int
Maybe Text
showCacheNodeInfo :: Maybe Bool
maxRecords :: Maybe Int
marker :: Maybe Text
cacheClusterId :: Maybe Text
showCacheClustersNotInReplicationGroups :: Maybe Bool
$sel:showCacheNodeInfo:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Bool
$sel:maxRecords:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Int
$sel:marker:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Text
$sel:cacheClusterId:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Text
$sel:showCacheClustersNotInReplicationGroups:DescribeCacheClusters' :: DescribeCacheClusters -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeCacheClusters" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
ByteString
"ShowCacheClustersNotInReplicationGroups"
ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
showCacheClustersNotInReplicationGroups,
ByteString
"CacheClusterId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheClusterId,
ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords,
ByteString
"ShowCacheNodeInfo" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
showCacheNodeInfo
]
data DescribeCacheClustersResponse = DescribeCacheClustersResponse'
{
DescribeCacheClustersResponse -> Maybe [CacheCluster]
cacheClusters :: Prelude.Maybe [CacheCluster],
DescribeCacheClustersResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeCacheClustersResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeCacheClustersResponse
-> DescribeCacheClustersResponse -> Bool
(DescribeCacheClustersResponse
-> DescribeCacheClustersResponse -> Bool)
-> (DescribeCacheClustersResponse
-> DescribeCacheClustersResponse -> Bool)
-> Eq DescribeCacheClustersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCacheClustersResponse
-> DescribeCacheClustersResponse -> Bool
$c/= :: DescribeCacheClustersResponse
-> DescribeCacheClustersResponse -> Bool
== :: DescribeCacheClustersResponse
-> DescribeCacheClustersResponse -> Bool
$c== :: DescribeCacheClustersResponse
-> DescribeCacheClustersResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCacheClustersResponse]
ReadPrec DescribeCacheClustersResponse
Int -> ReadS DescribeCacheClustersResponse
ReadS [DescribeCacheClustersResponse]
(Int -> ReadS DescribeCacheClustersResponse)
-> ReadS [DescribeCacheClustersResponse]
-> ReadPrec DescribeCacheClustersResponse
-> ReadPrec [DescribeCacheClustersResponse]
-> Read DescribeCacheClustersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCacheClustersResponse]
$creadListPrec :: ReadPrec [DescribeCacheClustersResponse]
readPrec :: ReadPrec DescribeCacheClustersResponse
$creadPrec :: ReadPrec DescribeCacheClustersResponse
readList :: ReadS [DescribeCacheClustersResponse]
$creadList :: ReadS [DescribeCacheClustersResponse]
readsPrec :: Int -> ReadS DescribeCacheClustersResponse
$creadsPrec :: Int -> ReadS DescribeCacheClustersResponse
Prelude.Read, Int -> DescribeCacheClustersResponse -> ShowS
[DescribeCacheClustersResponse] -> ShowS
DescribeCacheClustersResponse -> String
(Int -> DescribeCacheClustersResponse -> ShowS)
-> (DescribeCacheClustersResponse -> String)
-> ([DescribeCacheClustersResponse] -> ShowS)
-> Show DescribeCacheClustersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCacheClustersResponse] -> ShowS
$cshowList :: [DescribeCacheClustersResponse] -> ShowS
show :: DescribeCacheClustersResponse -> String
$cshow :: DescribeCacheClustersResponse -> String
showsPrec :: Int -> DescribeCacheClustersResponse -> ShowS
$cshowsPrec :: Int -> DescribeCacheClustersResponse -> ShowS
Prelude.Show, (forall x.
DescribeCacheClustersResponse
-> Rep DescribeCacheClustersResponse x)
-> (forall x.
Rep DescribeCacheClustersResponse x
-> DescribeCacheClustersResponse)
-> Generic DescribeCacheClustersResponse
forall x.
Rep DescribeCacheClustersResponse x
-> DescribeCacheClustersResponse
forall x.
DescribeCacheClustersResponse
-> Rep DescribeCacheClustersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCacheClustersResponse x
-> DescribeCacheClustersResponse
$cfrom :: forall x.
DescribeCacheClustersResponse
-> Rep DescribeCacheClustersResponse x
Prelude.Generic)
newDescribeCacheClustersResponse ::
Prelude.Int ->
DescribeCacheClustersResponse
newDescribeCacheClustersResponse :: Int -> DescribeCacheClustersResponse
newDescribeCacheClustersResponse Int
pHttpStatus_ =
DescribeCacheClustersResponse' :: Maybe [CacheCluster]
-> Maybe Text -> Int -> DescribeCacheClustersResponse
DescribeCacheClustersResponse'
{ $sel:cacheClusters:DescribeCacheClustersResponse' :: Maybe [CacheCluster]
cacheClusters =
Maybe [CacheCluster]
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeCacheClustersResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeCacheClustersResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeCacheClustersResponse_cacheClusters :: Lens.Lens' DescribeCacheClustersResponse (Prelude.Maybe [CacheCluster])
describeCacheClustersResponse_cacheClusters :: (Maybe [CacheCluster] -> f (Maybe [CacheCluster]))
-> DescribeCacheClustersResponse -> f DescribeCacheClustersResponse
describeCacheClustersResponse_cacheClusters = (DescribeCacheClustersResponse -> Maybe [CacheCluster])
-> (DescribeCacheClustersResponse
-> Maybe [CacheCluster] -> DescribeCacheClustersResponse)
-> Lens' DescribeCacheClustersResponse (Maybe [CacheCluster])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheClustersResponse' {Maybe [CacheCluster]
cacheClusters :: Maybe [CacheCluster]
$sel:cacheClusters:DescribeCacheClustersResponse' :: DescribeCacheClustersResponse -> Maybe [CacheCluster]
cacheClusters} -> Maybe [CacheCluster]
cacheClusters) (\s :: DescribeCacheClustersResponse
s@DescribeCacheClustersResponse' {} Maybe [CacheCluster]
a -> DescribeCacheClustersResponse
s {$sel:cacheClusters:DescribeCacheClustersResponse' :: Maybe [CacheCluster]
cacheClusters = Maybe [CacheCluster]
a} :: DescribeCacheClustersResponse) ((Maybe [CacheCluster] -> f (Maybe [CacheCluster]))
-> DescribeCacheClustersResponse
-> f DescribeCacheClustersResponse)
-> ((Maybe [CacheCluster] -> f (Maybe [CacheCluster]))
-> Maybe [CacheCluster] -> f (Maybe [CacheCluster]))
-> (Maybe [CacheCluster] -> f (Maybe [CacheCluster]))
-> DescribeCacheClustersResponse
-> f DescribeCacheClustersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [CacheCluster] [CacheCluster] [CacheCluster] [CacheCluster]
-> Iso
(Maybe [CacheCluster])
(Maybe [CacheCluster])
(Maybe [CacheCluster])
(Maybe [CacheCluster])
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 [CacheCluster] [CacheCluster] [CacheCluster] [CacheCluster]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeCacheClustersResponse_marker :: Lens.Lens' DescribeCacheClustersResponse (Prelude.Maybe Prelude.Text)
describeCacheClustersResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeCacheClustersResponse -> f DescribeCacheClustersResponse
describeCacheClustersResponse_marker = (DescribeCacheClustersResponse -> Maybe Text)
-> (DescribeCacheClustersResponse
-> Maybe Text -> DescribeCacheClustersResponse)
-> Lens' DescribeCacheClustersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheClustersResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeCacheClustersResponse' :: DescribeCacheClustersResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeCacheClustersResponse
s@DescribeCacheClustersResponse' {} Maybe Text
a -> DescribeCacheClustersResponse
s {$sel:marker:DescribeCacheClustersResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeCacheClustersResponse)
describeCacheClustersResponse_httpStatus :: Lens.Lens' DescribeCacheClustersResponse Prelude.Int
describeCacheClustersResponse_httpStatus :: (Int -> f Int)
-> DescribeCacheClustersResponse -> f DescribeCacheClustersResponse
describeCacheClustersResponse_httpStatus = (DescribeCacheClustersResponse -> Int)
-> (DescribeCacheClustersResponse
-> Int -> DescribeCacheClustersResponse)
-> Lens
DescribeCacheClustersResponse DescribeCacheClustersResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCacheClustersResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeCacheClustersResponse' :: DescribeCacheClustersResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeCacheClustersResponse
s@DescribeCacheClustersResponse' {} Int
a -> DescribeCacheClustersResponse
s {$sel:httpStatus:DescribeCacheClustersResponse' :: Int
httpStatus = Int
a} :: DescribeCacheClustersResponse)
instance Prelude.NFData DescribeCacheClustersResponse