{-# 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.DescribeReservedCacheNodesOfferings
(
DescribeReservedCacheNodesOfferings (..),
newDescribeReservedCacheNodesOfferings,
describeReservedCacheNodesOfferings_cacheNodeType,
describeReservedCacheNodesOfferings_productDescription,
describeReservedCacheNodesOfferings_marker,
describeReservedCacheNodesOfferings_maxRecords,
describeReservedCacheNodesOfferings_offeringType,
describeReservedCacheNodesOfferings_duration,
describeReservedCacheNodesOfferings_reservedCacheNodesOfferingId,
DescribeReservedCacheNodesOfferingsResponse (..),
newDescribeReservedCacheNodesOfferingsResponse,
describeReservedCacheNodesOfferingsResponse_marker,
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings,
describeReservedCacheNodesOfferingsResponse_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 DescribeReservedCacheNodesOfferings = DescribeReservedCacheNodesOfferings'
{
DescribeReservedCacheNodesOfferings -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodesOfferings -> Maybe Text
productDescription :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodesOfferings -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodesOfferings -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
DescribeReservedCacheNodesOfferings -> Maybe Text
offeringType :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodesOfferings -> Maybe Text
duration :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodesOfferings -> Maybe Text
reservedCacheNodesOfferingId :: Prelude.Maybe Prelude.Text
}
deriving (DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
(DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool)
-> (DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool)
-> Eq DescribeReservedCacheNodesOfferings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
$c/= :: DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
== :: DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
$c== :: DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings -> Bool
Prelude.Eq, ReadPrec [DescribeReservedCacheNodesOfferings]
ReadPrec DescribeReservedCacheNodesOfferings
Int -> ReadS DescribeReservedCacheNodesOfferings
ReadS [DescribeReservedCacheNodesOfferings]
(Int -> ReadS DescribeReservedCacheNodesOfferings)
-> ReadS [DescribeReservedCacheNodesOfferings]
-> ReadPrec DescribeReservedCacheNodesOfferings
-> ReadPrec [DescribeReservedCacheNodesOfferings]
-> Read DescribeReservedCacheNodesOfferings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedCacheNodesOfferings]
$creadListPrec :: ReadPrec [DescribeReservedCacheNodesOfferings]
readPrec :: ReadPrec DescribeReservedCacheNodesOfferings
$creadPrec :: ReadPrec DescribeReservedCacheNodesOfferings
readList :: ReadS [DescribeReservedCacheNodesOfferings]
$creadList :: ReadS [DescribeReservedCacheNodesOfferings]
readsPrec :: Int -> ReadS DescribeReservedCacheNodesOfferings
$creadsPrec :: Int -> ReadS DescribeReservedCacheNodesOfferings
Prelude.Read, Int -> DescribeReservedCacheNodesOfferings -> ShowS
[DescribeReservedCacheNodesOfferings] -> ShowS
DescribeReservedCacheNodesOfferings -> String
(Int -> DescribeReservedCacheNodesOfferings -> ShowS)
-> (DescribeReservedCacheNodesOfferings -> String)
-> ([DescribeReservedCacheNodesOfferings] -> ShowS)
-> Show DescribeReservedCacheNodesOfferings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedCacheNodesOfferings] -> ShowS
$cshowList :: [DescribeReservedCacheNodesOfferings] -> ShowS
show :: DescribeReservedCacheNodesOfferings -> String
$cshow :: DescribeReservedCacheNodesOfferings -> String
showsPrec :: Int -> DescribeReservedCacheNodesOfferings -> ShowS
$cshowsPrec :: Int -> DescribeReservedCacheNodesOfferings -> ShowS
Prelude.Show, (forall x.
DescribeReservedCacheNodesOfferings
-> Rep DescribeReservedCacheNodesOfferings x)
-> (forall x.
Rep DescribeReservedCacheNodesOfferings x
-> DescribeReservedCacheNodesOfferings)
-> Generic DescribeReservedCacheNodesOfferings
forall x.
Rep DescribeReservedCacheNodesOfferings x
-> DescribeReservedCacheNodesOfferings
forall x.
DescribeReservedCacheNodesOfferings
-> Rep DescribeReservedCacheNodesOfferings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedCacheNodesOfferings x
-> DescribeReservedCacheNodesOfferings
$cfrom :: forall x.
DescribeReservedCacheNodesOfferings
-> Rep DescribeReservedCacheNodesOfferings x
Prelude.Generic)
newDescribeReservedCacheNodesOfferings ::
DescribeReservedCacheNodesOfferings
newDescribeReservedCacheNodesOfferings :: DescribeReservedCacheNodesOfferings
newDescribeReservedCacheNodesOfferings =
DescribeReservedCacheNodesOfferings' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings'
{ $sel:cacheNodeType:DescribeReservedCacheNodesOfferings' :: Maybe Text
cacheNodeType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:productDescription:DescribeReservedCacheNodesOfferings' :: Maybe Text
productDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeReservedCacheNodesOfferings' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeReservedCacheNodesOfferings' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:offeringType:DescribeReservedCacheNodesOfferings' :: Maybe Text
offeringType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:duration:DescribeReservedCacheNodesOfferings' :: Maybe Text
duration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodesOfferings' :: Maybe Text
reservedCacheNodesOfferingId =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describeReservedCacheNodesOfferings_cacheNodeType :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_cacheNodeType :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_cacheNodeType = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
-> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:cacheNodeType:DescribeReservedCacheNodesOfferings' :: Maybe Text
cacheNodeType = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)
describeReservedCacheNodesOfferings_productDescription :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_productDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_productDescription = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
-> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
productDescription :: Maybe Text
$sel:productDescription:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
productDescription} -> Maybe Text
productDescription) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:productDescription:DescribeReservedCacheNodesOfferings' :: Maybe Text
productDescription = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)
describeReservedCacheNodesOfferings_marker :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_marker = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
-> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:marker:DescribeReservedCacheNodesOfferings' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)
describeReservedCacheNodesOfferings_maxRecords :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Int)
describeReservedCacheNodesOfferings_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_maxRecords = (DescribeReservedCacheNodesOfferings -> Maybe Int)
-> (DescribeReservedCacheNodesOfferings
-> Maybe Int -> DescribeReservedCacheNodesOfferings)
-> Lens
DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Int
a -> DescribeReservedCacheNodesOfferings
s {$sel:maxRecords:DescribeReservedCacheNodesOfferings' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeReservedCacheNodesOfferings)
describeReservedCacheNodesOfferings_offeringType :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_offeringType :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_offeringType = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
-> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
offeringType :: Maybe Text
$sel:offeringType:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
offeringType} -> Maybe Text
offeringType) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:offeringType:DescribeReservedCacheNodesOfferings' :: Maybe Text
offeringType = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)
describeReservedCacheNodesOfferings_duration :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_duration :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_duration = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
-> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
duration :: Maybe Text
$sel:duration:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
duration} -> Maybe Text
duration) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:duration:DescribeReservedCacheNodesOfferings' :: Maybe Text
duration = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)
describeReservedCacheNodesOfferings_reservedCacheNodesOfferingId :: Lens.Lens' DescribeReservedCacheNodesOfferings (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferings_reservedCacheNodesOfferingId :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> f DescribeReservedCacheNodesOfferings
describeReservedCacheNodesOfferings_reservedCacheNodesOfferingId = (DescribeReservedCacheNodesOfferings -> Maybe Text)
-> (DescribeReservedCacheNodesOfferings
-> Maybe Text -> DescribeReservedCacheNodesOfferings)
-> Lens
DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferings' {Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
reservedCacheNodesOfferingId} -> Maybe Text
reservedCacheNodesOfferingId) (\s :: DescribeReservedCacheNodesOfferings
s@DescribeReservedCacheNodesOfferings' {} Maybe Text
a -> DescribeReservedCacheNodesOfferings
s {$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodesOfferings' :: Maybe Text
reservedCacheNodesOfferingId = Maybe Text
a} :: DescribeReservedCacheNodesOfferings)
instance
Core.AWSPager
DescribeReservedCacheNodesOfferings
where
page :: DescribeReservedCacheNodesOfferings
-> AWSResponse DescribeReservedCacheNodesOfferings
-> Maybe DescribeReservedCacheNodesOfferings
page DescribeReservedCacheNodesOfferings
rq AWSResponse DescribeReservedCacheNodesOfferings
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferingsResponse
rs
DescribeReservedCacheNodesOfferingsResponse
-> Getting
(First Text) DescribeReservedCacheNodesOfferingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const (First Text) DescribeReservedCacheNodesOfferingsResponse
Lens' DescribeReservedCacheNodesOfferingsResponse (Maybe Text)
describeReservedCacheNodesOfferingsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const (First Text) DescribeReservedCacheNodesOfferingsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeReservedCacheNodesOfferingsResponse 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 DescribeReservedCacheNodesOfferings
forall a. Maybe a
Prelude.Nothing
| Maybe [ReservedCacheNodesOffering] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferingsResponse
rs
DescribeReservedCacheNodesOfferingsResponse
-> Getting
(First [ReservedCacheNodesOffering])
DescribeReservedCacheNodesOfferingsResponse
[ReservedCacheNodesOffering]
-> Maybe [ReservedCacheNodesOffering]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ReservedCacheNodesOffering]
-> Const
(First [ReservedCacheNodesOffering])
(Maybe [ReservedCacheNodesOffering]))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const
(First [ReservedCacheNodesOffering])
DescribeReservedCacheNodesOfferingsResponse
Lens'
DescribeReservedCacheNodesOfferingsResponse
(Maybe [ReservedCacheNodesOffering])
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings
((Maybe [ReservedCacheNodesOffering]
-> Const
(First [ReservedCacheNodesOffering])
(Maybe [ReservedCacheNodesOffering]))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const
(First [ReservedCacheNodesOffering])
DescribeReservedCacheNodesOfferingsResponse)
-> (([ReservedCacheNodesOffering]
-> Const
(First [ReservedCacheNodesOffering]) [ReservedCacheNodesOffering])
-> Maybe [ReservedCacheNodesOffering]
-> Const
(First [ReservedCacheNodesOffering])
(Maybe [ReservedCacheNodesOffering]))
-> Getting
(First [ReservedCacheNodesOffering])
DescribeReservedCacheNodesOfferingsResponse
[ReservedCacheNodesOffering]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ReservedCacheNodesOffering]
-> Const
(First [ReservedCacheNodesOffering]) [ReservedCacheNodesOffering])
-> Maybe [ReservedCacheNodesOffering]
-> Const
(First [ReservedCacheNodesOffering])
(Maybe [ReservedCacheNodesOffering])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeReservedCacheNodesOfferings
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeReservedCacheNodesOfferings
-> Maybe DescribeReservedCacheNodesOfferings
forall a. a -> Maybe a
Prelude.Just (DescribeReservedCacheNodesOfferings
-> Maybe DescribeReservedCacheNodesOfferings)
-> DescribeReservedCacheNodesOfferings
-> Maybe DescribeReservedCacheNodesOfferings
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeReservedCacheNodesOfferings
rq
DescribeReservedCacheNodesOfferings
-> (DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings)
-> DescribeReservedCacheNodesOfferings
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> Identity DescribeReservedCacheNodesOfferings
Lens
DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferings
(Maybe Text)
(Maybe Text)
describeReservedCacheNodesOfferings_marker
((Maybe Text -> Identity (Maybe Text))
-> DescribeReservedCacheNodesOfferings
-> Identity DescribeReservedCacheNodesOfferings)
-> Maybe Text
-> DescribeReservedCacheNodesOfferings
-> DescribeReservedCacheNodesOfferings
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeReservedCacheNodesOfferings
DescribeReservedCacheNodesOfferingsResponse
rs
DescribeReservedCacheNodesOfferingsResponse
-> Getting
(First Text) DescribeReservedCacheNodesOfferingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const (First Text) DescribeReservedCacheNodesOfferingsResponse
Lens' DescribeReservedCacheNodesOfferingsResponse (Maybe Text)
describeReservedCacheNodesOfferingsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeReservedCacheNodesOfferingsResponse
-> Const (First Text) DescribeReservedCacheNodesOfferingsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) DescribeReservedCacheNodesOfferingsResponse 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
DescribeReservedCacheNodesOfferings
where
type
AWSResponse DescribeReservedCacheNodesOfferings =
DescribeReservedCacheNodesOfferingsResponse
request :: DescribeReservedCacheNodesOfferings
-> Request DescribeReservedCacheNodesOfferings
request = Service
-> DescribeReservedCacheNodesOfferings
-> Request DescribeReservedCacheNodesOfferings
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeReservedCacheNodesOfferings
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeReservedCacheNodesOfferings)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeReservedCacheNodesOfferings))
-> Logger
-> Service
-> Proxy DescribeReservedCacheNodesOfferings
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeReservedCacheNodesOfferings)))
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
"DescribeReservedCacheNodesOfferingsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe [ReservedCacheNodesOffering]
-> Int
-> DescribeReservedCacheNodesOfferingsResponse
DescribeReservedCacheNodesOfferingsResponse'
(Maybe Text
-> Maybe [ReservedCacheNodesOffering]
-> Int
-> DescribeReservedCacheNodesOfferingsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [ReservedCacheNodesOffering]
-> Int -> DescribeReservedCacheNodesOfferingsResponse)
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
"Marker")
Either
String
(Maybe [ReservedCacheNodesOffering]
-> Int -> DescribeReservedCacheNodesOfferingsResponse)
-> Either String (Maybe [ReservedCacheNodesOffering])
-> Either
String (Int -> DescribeReservedCacheNodesOfferingsResponse)
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
"ReservedCacheNodesOfferings"
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 [ReservedCacheNodesOffering]))
-> Either String (Maybe [ReservedCacheNodesOffering])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ReservedCacheNodesOffering])
-> [Node] -> Either String (Maybe [ReservedCacheNodesOffering])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
(Text -> [Node] -> Either String [ReservedCacheNodesOffering]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"ReservedCacheNodesOffering")
)
Either String (Int -> DescribeReservedCacheNodesOfferingsResponse)
-> Either String Int
-> Either String DescribeReservedCacheNodesOfferingsResponse
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
DescribeReservedCacheNodesOfferings
instance
Prelude.NFData
DescribeReservedCacheNodesOfferings
instance
Core.ToHeaders
DescribeReservedCacheNodesOfferings
where
toHeaders :: DescribeReservedCacheNodesOfferings -> ResponseHeaders
toHeaders = ResponseHeaders
-> DescribeReservedCacheNodesOfferings -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
DescribeReservedCacheNodesOfferings
where
toPath :: DescribeReservedCacheNodesOfferings -> ByteString
toPath = ByteString -> DescribeReservedCacheNodesOfferings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DescribeReservedCacheNodesOfferings
where
toQuery :: DescribeReservedCacheNodesOfferings -> QueryString
toQuery DescribeReservedCacheNodesOfferings' {Maybe Int
Maybe Text
reservedCacheNodesOfferingId :: Maybe Text
duration :: Maybe Text
offeringType :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
productDescription :: Maybe Text
cacheNodeType :: Maybe Text
$sel:reservedCacheNodesOfferingId:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:duration:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:offeringType:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:maxRecords:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Int
$sel:marker:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:productDescription:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
$sel:cacheNodeType:DescribeReservedCacheNodesOfferings' :: DescribeReservedCacheNodesOfferings -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeReservedCacheNodesOfferings" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
ByteString
"CacheNodeType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
cacheNodeType,
ByteString
"ProductDescription" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
productDescription,
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
"OfferingType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
offeringType,
ByteString
"Duration" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
duration,
ByteString
"ReservedCacheNodesOfferingId"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
reservedCacheNodesOfferingId
]
data DescribeReservedCacheNodesOfferingsResponse = DescribeReservedCacheNodesOfferingsResponse'
{
DescribeReservedCacheNodesOfferingsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeReservedCacheNodesOfferingsResponse
-> Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings :: Prelude.Maybe [ReservedCacheNodesOffering],
DescribeReservedCacheNodesOfferingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
(DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool)
-> (DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool)
-> Eq DescribeReservedCacheNodesOfferingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
$c/= :: DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
== :: DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
$c== :: DescribeReservedCacheNodesOfferingsResponse
-> DescribeReservedCacheNodesOfferingsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeReservedCacheNodesOfferingsResponse]
ReadPrec DescribeReservedCacheNodesOfferingsResponse
Int -> ReadS DescribeReservedCacheNodesOfferingsResponse
ReadS [DescribeReservedCacheNodesOfferingsResponse]
(Int -> ReadS DescribeReservedCacheNodesOfferingsResponse)
-> ReadS [DescribeReservedCacheNodesOfferingsResponse]
-> ReadPrec DescribeReservedCacheNodesOfferingsResponse
-> ReadPrec [DescribeReservedCacheNodesOfferingsResponse]
-> Read DescribeReservedCacheNodesOfferingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeReservedCacheNodesOfferingsResponse]
$creadListPrec :: ReadPrec [DescribeReservedCacheNodesOfferingsResponse]
readPrec :: ReadPrec DescribeReservedCacheNodesOfferingsResponse
$creadPrec :: ReadPrec DescribeReservedCacheNodesOfferingsResponse
readList :: ReadS [DescribeReservedCacheNodesOfferingsResponse]
$creadList :: ReadS [DescribeReservedCacheNodesOfferingsResponse]
readsPrec :: Int -> ReadS DescribeReservedCacheNodesOfferingsResponse
$creadsPrec :: Int -> ReadS DescribeReservedCacheNodesOfferingsResponse
Prelude.Read, Int -> DescribeReservedCacheNodesOfferingsResponse -> ShowS
[DescribeReservedCacheNodesOfferingsResponse] -> ShowS
DescribeReservedCacheNodesOfferingsResponse -> String
(Int -> DescribeReservedCacheNodesOfferingsResponse -> ShowS)
-> (DescribeReservedCacheNodesOfferingsResponse -> String)
-> ([DescribeReservedCacheNodesOfferingsResponse] -> ShowS)
-> Show DescribeReservedCacheNodesOfferingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeReservedCacheNodesOfferingsResponse] -> ShowS
$cshowList :: [DescribeReservedCacheNodesOfferingsResponse] -> ShowS
show :: DescribeReservedCacheNodesOfferingsResponse -> String
$cshow :: DescribeReservedCacheNodesOfferingsResponse -> String
showsPrec :: Int -> DescribeReservedCacheNodesOfferingsResponse -> ShowS
$cshowsPrec :: Int -> DescribeReservedCacheNodesOfferingsResponse -> ShowS
Prelude.Show, (forall x.
DescribeReservedCacheNodesOfferingsResponse
-> Rep DescribeReservedCacheNodesOfferingsResponse x)
-> (forall x.
Rep DescribeReservedCacheNodesOfferingsResponse x
-> DescribeReservedCacheNodesOfferingsResponse)
-> Generic DescribeReservedCacheNodesOfferingsResponse
forall x.
Rep DescribeReservedCacheNodesOfferingsResponse x
-> DescribeReservedCacheNodesOfferingsResponse
forall x.
DescribeReservedCacheNodesOfferingsResponse
-> Rep DescribeReservedCacheNodesOfferingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeReservedCacheNodesOfferingsResponse x
-> DescribeReservedCacheNodesOfferingsResponse
$cfrom :: forall x.
DescribeReservedCacheNodesOfferingsResponse
-> Rep DescribeReservedCacheNodesOfferingsResponse x
Prelude.Generic)
newDescribeReservedCacheNodesOfferingsResponse ::
Prelude.Int ->
DescribeReservedCacheNodesOfferingsResponse
newDescribeReservedCacheNodesOfferingsResponse :: Int -> DescribeReservedCacheNodesOfferingsResponse
newDescribeReservedCacheNodesOfferingsResponse
Int
pHttpStatus_ =
DescribeReservedCacheNodesOfferingsResponse' :: Maybe Text
-> Maybe [ReservedCacheNodesOffering]
-> Int
-> DescribeReservedCacheNodesOfferingsResponse
DescribeReservedCacheNodesOfferingsResponse'
{ $sel:marker:DescribeReservedCacheNodesOfferingsResponse' :: Maybe Text
marker =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservedCacheNodesOfferings:DescribeReservedCacheNodesOfferingsResponse' :: Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings =
Maybe [ReservedCacheNodesOffering]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeReservedCacheNodesOfferingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeReservedCacheNodesOfferingsResponse_marker :: Lens.Lens' DescribeReservedCacheNodesOfferingsResponse (Prelude.Maybe Prelude.Text)
describeReservedCacheNodesOfferingsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeReservedCacheNodesOfferingsResponse
-> f DescribeReservedCacheNodesOfferingsResponse
describeReservedCacheNodesOfferingsResponse_marker = (DescribeReservedCacheNodesOfferingsResponse -> Maybe Text)
-> (DescribeReservedCacheNodesOfferingsResponse
-> Maybe Text -> DescribeReservedCacheNodesOfferingsResponse)
-> Lens' DescribeReservedCacheNodesOfferingsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferingsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeReservedCacheNodesOfferingsResponse' :: DescribeReservedCacheNodesOfferingsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeReservedCacheNodesOfferingsResponse
s@DescribeReservedCacheNodesOfferingsResponse' {} Maybe Text
a -> DescribeReservedCacheNodesOfferingsResponse
s {$sel:marker:DescribeReservedCacheNodesOfferingsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeReservedCacheNodesOfferingsResponse)
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings :: Lens.Lens' DescribeReservedCacheNodesOfferingsResponse (Prelude.Maybe [ReservedCacheNodesOffering])
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings :: (Maybe [ReservedCacheNodesOffering]
-> f (Maybe [ReservedCacheNodesOffering]))
-> DescribeReservedCacheNodesOfferingsResponse
-> f DescribeReservedCacheNodesOfferingsResponse
describeReservedCacheNodesOfferingsResponse_reservedCacheNodesOfferings = (DescribeReservedCacheNodesOfferingsResponse
-> Maybe [ReservedCacheNodesOffering])
-> (DescribeReservedCacheNodesOfferingsResponse
-> Maybe [ReservedCacheNodesOffering]
-> DescribeReservedCacheNodesOfferingsResponse)
-> Lens'
DescribeReservedCacheNodesOfferingsResponse
(Maybe [ReservedCacheNodesOffering])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferingsResponse' {Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings :: Maybe [ReservedCacheNodesOffering]
$sel:reservedCacheNodesOfferings:DescribeReservedCacheNodesOfferingsResponse' :: DescribeReservedCacheNodesOfferingsResponse
-> Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings} -> Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings) (\s :: DescribeReservedCacheNodesOfferingsResponse
s@DescribeReservedCacheNodesOfferingsResponse' {} Maybe [ReservedCacheNodesOffering]
a -> DescribeReservedCacheNodesOfferingsResponse
s {$sel:reservedCacheNodesOfferings:DescribeReservedCacheNodesOfferingsResponse' :: Maybe [ReservedCacheNodesOffering]
reservedCacheNodesOfferings = Maybe [ReservedCacheNodesOffering]
a} :: DescribeReservedCacheNodesOfferingsResponse) ((Maybe [ReservedCacheNodesOffering]
-> f (Maybe [ReservedCacheNodesOffering]))
-> DescribeReservedCacheNodesOfferingsResponse
-> f DescribeReservedCacheNodesOfferingsResponse)
-> ((Maybe [ReservedCacheNodesOffering]
-> f (Maybe [ReservedCacheNodesOffering]))
-> Maybe [ReservedCacheNodesOffering]
-> f (Maybe [ReservedCacheNodesOffering]))
-> (Maybe [ReservedCacheNodesOffering]
-> f (Maybe [ReservedCacheNodesOffering]))
-> DescribeReservedCacheNodesOfferingsResponse
-> f DescribeReservedCacheNodesOfferingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ReservedCacheNodesOffering]
[ReservedCacheNodesOffering]
[ReservedCacheNodesOffering]
[ReservedCacheNodesOffering]
-> Iso
(Maybe [ReservedCacheNodesOffering])
(Maybe [ReservedCacheNodesOffering])
(Maybe [ReservedCacheNodesOffering])
(Maybe [ReservedCacheNodesOffering])
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
[ReservedCacheNodesOffering]
[ReservedCacheNodesOffering]
[ReservedCacheNodesOffering]
[ReservedCacheNodesOffering]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeReservedCacheNodesOfferingsResponse_httpStatus :: Lens.Lens' DescribeReservedCacheNodesOfferingsResponse Prelude.Int
describeReservedCacheNodesOfferingsResponse_httpStatus :: (Int -> f Int)
-> DescribeReservedCacheNodesOfferingsResponse
-> f DescribeReservedCacheNodesOfferingsResponse
describeReservedCacheNodesOfferingsResponse_httpStatus = (DescribeReservedCacheNodesOfferingsResponse -> Int)
-> (DescribeReservedCacheNodesOfferingsResponse
-> Int -> DescribeReservedCacheNodesOfferingsResponse)
-> Lens
DescribeReservedCacheNodesOfferingsResponse
DescribeReservedCacheNodesOfferingsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeReservedCacheNodesOfferingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeReservedCacheNodesOfferingsResponse' :: DescribeReservedCacheNodesOfferingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeReservedCacheNodesOfferingsResponse
s@DescribeReservedCacheNodesOfferingsResponse' {} Int
a -> DescribeReservedCacheNodesOfferingsResponse
s {$sel:httpStatus:DescribeReservedCacheNodesOfferingsResponse' :: Int
httpStatus = Int
a} :: DescribeReservedCacheNodesOfferingsResponse)
instance
Prelude.NFData
DescribeReservedCacheNodesOfferingsResponse