{-# 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.DescribeReservedCacheNodes
(
DescribeReservedCacheNodes (..),
newDescribeReservedCacheNodes,
describeReservedCacheNodes_cacheNodeType,
describeReservedCacheNodes_duration,
describeReservedCacheNodes_marker,
describeReservedCacheNodes_maxRecords,
describeReservedCacheNodes_offeringType,
describeReservedCacheNodes_productDescription,
describeReservedCacheNodes_reservedCacheNodeId,
describeReservedCacheNodes_reservedCacheNodesOfferingId,
DescribeReservedCacheNodesResponse (..),
newDescribeReservedCacheNodesResponse,
describeReservedCacheNodesResponse_marker,
describeReservedCacheNodesResponse_reservedCacheNodes,
describeReservedCacheNodesResponse_httpStatus,
)
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
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeReservedCacheNodes = DescribeReservedCacheNodes'
{
DescribeReservedCacheNodes -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodes -> Maybe Text
duration :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodes -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodes -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
DescribeReservedCacheNodes -> Maybe Text
offeringType :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodes -> Maybe Text
productDescription :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodes -> Maybe Text
reservedCacheNodeId :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodes -> Maybe Text
reservedCacheNodesOfferingId :: Prelude.Maybe Prelude.Text
}
deriving (DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
$c/= :: DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
== :: DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
$c== :: DescribeReservedCacheNodes -> DescribeReservedCacheNodes -> Bool
Prelude.Eq, ReadPrec [DescribeReservedCacheNodes]
ReadPrec DescribeReservedCacheNodes
Int -> ReadS DescribeReservedCacheNodes
ReadS [DescribeReservedCacheNodes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedCacheNodes]
$creadListPrec :: ReadPrec [DescribeReservedCacheNodes]
readPrec :: ReadPrec DescribeReservedCacheNodes
$creadPrec :: ReadPrec DescribeReservedCacheNodes
readList :: ReadS [DescribeReservedCacheNodes]
$creadList :: ReadS [DescribeReservedCacheNodes]
readsPrec :: Int -> ReadS DescribeReservedCacheNodes
$creadsPrec :: Int -> ReadS DescribeReservedCacheNodes
Prelude.Read, Int -> DescribeReservedCacheNodes -> ShowS
[DescribeReservedCacheNodes] -> ShowS
DescribeReservedCacheNodes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedCacheNodes] -> ShowS
$cshowList :: [DescribeReservedCacheNodes] -> ShowS
show :: DescribeReservedCacheNodes -> String
$cshow :: DescribeReservedCacheNodes -> String
showsPrec :: Int -> DescribeReservedCacheNodes -> ShowS
$cshowsPrec :: Int -> DescribeReservedCacheNodes -> ShowS
Prelude.Show, forall x.
Rep DescribeReservedCacheNodes x -> DescribeReservedCacheNodes
forall x.
DescribeReservedCacheNodes -> Rep DescribeReservedCacheNodes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedCacheNodes x -> DescribeReservedCacheNodes
$cfrom :: forall x.
DescribeReservedCacheNodes -> Rep DescribeReservedCacheNodes x
Prelude.Generic)
newDescribeReservedCacheNodes ::
DescribeReservedCacheNodes
newDescribeReservedCacheNodes :: DescribeReservedCacheNodes
newDescribeReservedCacheNodes =
DescribeReservedCacheNodes'
{ $sel:cacheNodeType:DescribeReservedCacheNodes' :: Maybe Text
cacheNodeType =
forall a. Maybe a
Prelude.Nothing,
$sel:duration:DescribeReservedCacheNodes' :: Maybe Text
duration = forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeReservedCacheNodes' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeReservedCacheNodes' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing,
$sel:offeringType:DescribeReservedCacheNodes' :: Maybe Text
offeringType = forall a. Maybe a
Prelude.Nothing,
$sel:productDescription:DescribeReservedCacheNodes' :: Maybe Text
productDescription = forall a. Maybe a
Prelude.Nothing,
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodeId = forall a. Maybe a
Prelude.Nothing,
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodesOfferingId = forall a. Maybe a
Prelude.Nothing
}
describeReservedCacheNodes_cacheNodeType :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_cacheNodeType :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_cacheNodeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:cacheNodeType:DescribeReservedCacheNodes' :: Maybe Text
cacheNodeType = Maybe Text
a} :: DescribeReservedCacheNodes)
describeReservedCacheNodes_duration :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_duration :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_duration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
duration :: Maybe Text
$sel:duration:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
duration} -> Maybe Text
duration) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:duration:DescribeReservedCacheNodes' :: Maybe Text
duration = Maybe Text
a} :: DescribeReservedCacheNodes)
describeReservedCacheNodes_marker :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_marker :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:marker:DescribeReservedCacheNodes' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedCacheNodes)
describeReservedCacheNodes_maxRecords :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Int)
describeReservedCacheNodes_maxRecords :: Lens' DescribeReservedCacheNodes (Maybe Int)
describeReservedCacheNodes_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Int
a -> DescribeReservedCacheNodes
s {$sel:maxRecords:DescribeReservedCacheNodes' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeReservedCacheNodes)
describeReservedCacheNodes_offeringType :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_offeringType :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_offeringType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
offeringType :: Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
offeringType} -> Maybe Text
offeringType) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:offeringType:DescribeReservedCacheNodes' :: Maybe Text
offeringType = Maybe Text
a} :: DescribeReservedCacheNodes)
describeReservedCacheNodes_productDescription :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_productDescription :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_productDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
productDescription :: Maybe Text
$sel:productDescription:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
productDescription} -> Maybe Text
productDescription) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:productDescription:DescribeReservedCacheNodes' :: Maybe Text
productDescription = Maybe Text
a} :: DescribeReservedCacheNodes)
describeReservedCacheNodes_reservedCacheNodeId :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_reservedCacheNodeId :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_reservedCacheNodeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
reservedCacheNodeId :: Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
reservedCacheNodeId} -> Maybe Text
reservedCacheNodeId) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodeId = Maybe Text
a} :: DescribeReservedCacheNodes)
describeReservedCacheNodes_reservedCacheNodesOfferingId :: Lens.Lens' DescribeReservedCacheNodes (Prelude.Maybe Prelude.Text)
describeReservedCacheNodes_reservedCacheNodesOfferingId :: Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_reservedCacheNodesOfferingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodes' {Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
reservedCacheNodesOfferingId} -> Maybe Text
reservedCacheNodesOfferingId) (\s :: DescribeReservedCacheNodes
s@DescribeReservedCacheNodes' {} Maybe Text
a -> DescribeReservedCacheNodes
s {$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: Maybe Text
reservedCacheNodesOfferingId = Maybe Text
a} :: DescribeReservedCacheNodes)
instance Core.AWSPager DescribeReservedCacheNodes where
page :: DescribeReservedCacheNodes
-> AWSResponse DescribeReservedCacheNodes
-> Maybe DescribeReservedCacheNodes
page DescribeReservedCacheNodes
rq AWSResponse DescribeReservedCacheNodes
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeReservedCacheNodes
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReservedCacheNodesResponse (Maybe Text)
describeReservedCacheNodesResponse_marker
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeReservedCacheNodes
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
DescribeReservedCacheNodesResponse (Maybe [ReservedCacheNode])
describeReservedCacheNodesResponse_reservedCacheNodes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
forall a. a -> Maybe a
Prelude.Just
forall a b. (a -> b) -> a -> b
Prelude.$ DescribeReservedCacheNodes
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeReservedCacheNodes (Maybe Text)
describeReservedCacheNodes_marker
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeReservedCacheNodes
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeReservedCacheNodesResponse (Maybe Text)
describeReservedCacheNodesResponse_marker
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeReservedCacheNodes where
type
AWSResponse DescribeReservedCacheNodes =
DescribeReservedCacheNodesResponse
request :: (Service -> Service)
-> DescribeReservedCacheNodes -> Request DescribeReservedCacheNodes
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeReservedCacheNodes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeReservedCacheNodes)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeReservedCacheNodesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe [ReservedCacheNode]
-> Int
-> DescribeReservedCacheNodesResponse
DescribeReservedCacheNodesResponse'
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
"Marker")
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
"ReservedCacheNodes"
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
"ReservedCacheNode")
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DescribeReservedCacheNodes where
hashWithSalt :: Int -> DescribeReservedCacheNodes -> Int
hashWithSalt Int
_salt DescribeReservedCacheNodes' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
reservedCacheNodeId :: Maybe Text
productDescription :: Maybe Text
offeringType :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
duration :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:duration:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cacheNodeType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
duration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
offeringType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
productDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reservedCacheNodeId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reservedCacheNodesOfferingId
instance Prelude.NFData DescribeReservedCacheNodes where
rnf :: DescribeReservedCacheNodes -> ()
rnf DescribeReservedCacheNodes' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
reservedCacheNodeId :: Maybe Text
productDescription :: Maybe Text
offeringType :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
duration :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:duration:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cacheNodeType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
duration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
offeringType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
productDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reservedCacheNodeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reservedCacheNodesOfferingId
instance Data.ToHeaders DescribeReservedCacheNodes where
toHeaders :: DescribeReservedCacheNodes -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DescribeReservedCacheNodes where
toPath :: DescribeReservedCacheNodes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DescribeReservedCacheNodes where
toQuery :: DescribeReservedCacheNodes -> QueryString
toQuery DescribeReservedCacheNodes' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
reservedCacheNodeId :: Maybe Text
productDescription :: Maybe Text
offeringType :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
duration :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:reservedCacheNodeId:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Int
$sel:marker:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:duration:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodes' :: DescribeReservedCacheNodes -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeReservedCacheNodes" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
ByteString
"CacheNodeType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cacheNodeType,
ByteString
"Duration" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
duration,
ByteString
"Marker" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
marker,
ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxRecords,
ByteString
"OfferingType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
offeringType,
ByteString
"ProductDescription" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
productDescription,
ByteString
"ReservedCacheNodeId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
reservedCacheNodeId,
ByteString
"ReservedCacheNodesOfferingId"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
reservedCacheNodesOfferingId
]
data DescribeReservedCacheNodesResponse = DescribeReservedCacheNodesResponse'
{
DescribeReservedCacheNodesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodesResponse -> Maybe [ReservedCacheNode]
reservedCacheNodes :: Prelude.Maybe [ReservedCacheNode],
DescribeReservedCacheNodesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
$c/= :: DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
== :: DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
$c== :: DescribeReservedCacheNodesResponse
-> DescribeReservedCacheNodesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeReservedCacheNodesResponse]
ReadPrec DescribeReservedCacheNodesResponse
Int -> ReadS DescribeReservedCacheNodesResponse
ReadS [DescribeReservedCacheNodesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedCacheNodesResponse]
$creadListPrec :: ReadPrec [DescribeReservedCacheNodesResponse]
readPrec :: ReadPrec DescribeReservedCacheNodesResponse
$creadPrec :: ReadPrec DescribeReservedCacheNodesResponse
readList :: ReadS [DescribeReservedCacheNodesResponse]
$creadList :: ReadS [DescribeReservedCacheNodesResponse]
readsPrec :: Int -> ReadS DescribeReservedCacheNodesResponse
$creadsPrec :: Int -> ReadS DescribeReservedCacheNodesResponse
Prelude.Read, Int -> DescribeReservedCacheNodesResponse -> ShowS
[DescribeReservedCacheNodesResponse] -> ShowS
DescribeReservedCacheNodesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedCacheNodesResponse] -> ShowS
$cshowList :: [DescribeReservedCacheNodesResponse] -> ShowS
show :: DescribeReservedCacheNodesResponse -> String
$cshow :: DescribeReservedCacheNodesResponse -> String
showsPrec :: Int -> DescribeReservedCacheNodesResponse -> ShowS
$cshowsPrec :: Int -> DescribeReservedCacheNodesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeReservedCacheNodesResponse x
-> DescribeReservedCacheNodesResponse
forall x.
DescribeReservedCacheNodesResponse
-> Rep DescribeReservedCacheNodesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedCacheNodesResponse x
-> DescribeReservedCacheNodesResponse
$cfrom :: forall x.
DescribeReservedCacheNodesResponse
-> Rep DescribeReservedCacheNodesResponse x
Prelude.Generic)
newDescribeReservedCacheNodesResponse ::
Prelude.Int ->
DescribeReservedCacheNodesResponse
newDescribeReservedCacheNodesResponse :: Int -> DescribeReservedCacheNodesResponse
newDescribeReservedCacheNodesResponse Int
pHttpStatus_ =
DescribeReservedCacheNodesResponse'
{ $sel:marker:DescribeReservedCacheNodesResponse' :: Maybe Text
marker =
forall a. Maybe a
Prelude.Nothing,
$sel:reservedCacheNodes:DescribeReservedCacheNodesResponse' :: Maybe [ReservedCacheNode]
reservedCacheNodes = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeReservedCacheNodesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeReservedCacheNodesResponse_marker :: Lens.Lens' DescribeReservedCacheNodesResponse (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesResponse_marker :: Lens' DescribeReservedCacheNodesResponse (Maybe Text)
describeReservedCacheNodesResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedCacheNodesResponse
s@DescribeReservedCacheNodesResponse' {} Maybe Text
a -> DescribeReservedCacheNodesResponse
s {$sel:marker:DescribeReservedCacheNodesResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedCacheNodesResponse)
describeReservedCacheNodesResponse_reservedCacheNodes :: Lens.Lens' DescribeReservedCacheNodesResponse (Prelude.Maybe [ReservedCacheNode])
describeReservedCacheNodesResponse_reservedCacheNodes :: Lens'
DescribeReservedCacheNodesResponse (Maybe [ReservedCacheNode])
describeReservedCacheNodesResponse_reservedCacheNodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesResponse' {Maybe [ReservedCacheNode]
reservedCacheNodes :: Maybe [ReservedCacheNode]
$sel:reservedCacheNodes:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Maybe [ReservedCacheNode]
reservedCacheNodes} -> Maybe [ReservedCacheNode]
reservedCacheNodes) (\s :: DescribeReservedCacheNodesResponse
s@DescribeReservedCacheNodesResponse' {} Maybe [ReservedCacheNode]
a -> DescribeReservedCacheNodesResponse
s {$sel:reservedCacheNodes:DescribeReservedCacheNodesResponse' :: Maybe [ReservedCacheNode]
reservedCacheNodes = Maybe [ReservedCacheNode]
a} :: DescribeReservedCacheNodesResponse) 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
describeReservedCacheNodesResponse_httpStatus :: Lens.Lens' DescribeReservedCacheNodesResponse Prelude.Int
describeReservedCacheNodesResponse_httpStatus :: Lens' DescribeReservedCacheNodesResponse Int
describeReservedCacheNodesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeReservedCacheNodesResponse
s@DescribeReservedCacheNodesResponse' {} Int
a -> DescribeReservedCacheNodesResponse
s {$sel:httpStatus:DescribeReservedCacheNodesResponse' :: Int
httpStatus = Int
a} :: DescribeReservedCacheNodesResponse)
instance
Prelude.NFData
DescribeReservedCacheNodesResponse
where
rnf :: DescribeReservedCacheNodesResponse -> ()
rnf DescribeReservedCacheNodesResponse' {Int
Maybe [ReservedCacheNode]
Maybe Text
httpStatus :: Int
reservedCacheNodes :: Maybe [ReservedCacheNode]
marker :: Maybe Text
$sel:httpStatus:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Int
$sel:reservedCacheNodes:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Maybe [ReservedCacheNode]
$sel:marker:DescribeReservedCacheNodesResponse' :: DescribeReservedCacheNodesResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ReservedCacheNode]
reservedCacheNodes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus