{-# 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.SavingsPlans.DescribeSavingsPlanRates
(
DescribeSavingsPlanRates (..),
newDescribeSavingsPlanRates,
describeSavingsPlanRates_filters,
describeSavingsPlanRates_nextToken,
describeSavingsPlanRates_maxResults,
describeSavingsPlanRates_savingsPlanId,
DescribeSavingsPlanRatesResponse (..),
newDescribeSavingsPlanRatesResponse,
describeSavingsPlanRatesResponse_searchResults,
describeSavingsPlanRatesResponse_savingsPlanId,
describeSavingsPlanRatesResponse_nextToken,
describeSavingsPlanRatesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SavingsPlans.Types
data DescribeSavingsPlanRates = DescribeSavingsPlanRates'
{
DescribeSavingsPlanRates -> Maybe [SavingsPlanRateFilter]
filters :: Prelude.Maybe [SavingsPlanRateFilter],
DescribeSavingsPlanRates -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeSavingsPlanRates -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeSavingsPlanRates -> Text
savingsPlanId :: Prelude.Text
}
deriving (DescribeSavingsPlanRates -> DescribeSavingsPlanRates -> Bool
(DescribeSavingsPlanRates -> DescribeSavingsPlanRates -> Bool)
-> (DescribeSavingsPlanRates -> DescribeSavingsPlanRates -> Bool)
-> Eq DescribeSavingsPlanRates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSavingsPlanRates -> DescribeSavingsPlanRates -> Bool
$c/= :: DescribeSavingsPlanRates -> DescribeSavingsPlanRates -> Bool
== :: DescribeSavingsPlanRates -> DescribeSavingsPlanRates -> Bool
$c== :: DescribeSavingsPlanRates -> DescribeSavingsPlanRates -> Bool
Prelude.Eq, ReadPrec [DescribeSavingsPlanRates]
ReadPrec DescribeSavingsPlanRates
Int -> ReadS DescribeSavingsPlanRates
ReadS [DescribeSavingsPlanRates]
(Int -> ReadS DescribeSavingsPlanRates)
-> ReadS [DescribeSavingsPlanRates]
-> ReadPrec DescribeSavingsPlanRates
-> ReadPrec [DescribeSavingsPlanRates]
-> Read DescribeSavingsPlanRates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSavingsPlanRates]
$creadListPrec :: ReadPrec [DescribeSavingsPlanRates]
readPrec :: ReadPrec DescribeSavingsPlanRates
$creadPrec :: ReadPrec DescribeSavingsPlanRates
readList :: ReadS [DescribeSavingsPlanRates]
$creadList :: ReadS [DescribeSavingsPlanRates]
readsPrec :: Int -> ReadS DescribeSavingsPlanRates
$creadsPrec :: Int -> ReadS DescribeSavingsPlanRates
Prelude.Read, Int -> DescribeSavingsPlanRates -> ShowS
[DescribeSavingsPlanRates] -> ShowS
DescribeSavingsPlanRates -> String
(Int -> DescribeSavingsPlanRates -> ShowS)
-> (DescribeSavingsPlanRates -> String)
-> ([DescribeSavingsPlanRates] -> ShowS)
-> Show DescribeSavingsPlanRates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSavingsPlanRates] -> ShowS
$cshowList :: [DescribeSavingsPlanRates] -> ShowS
show :: DescribeSavingsPlanRates -> String
$cshow :: DescribeSavingsPlanRates -> String
showsPrec :: Int -> DescribeSavingsPlanRates -> ShowS
$cshowsPrec :: Int -> DescribeSavingsPlanRates -> ShowS
Prelude.Show, (forall x.
DescribeSavingsPlanRates -> Rep DescribeSavingsPlanRates x)
-> (forall x.
Rep DescribeSavingsPlanRates x -> DescribeSavingsPlanRates)
-> Generic DescribeSavingsPlanRates
forall x.
Rep DescribeSavingsPlanRates x -> DescribeSavingsPlanRates
forall x.
DescribeSavingsPlanRates -> Rep DescribeSavingsPlanRates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSavingsPlanRates x -> DescribeSavingsPlanRates
$cfrom :: forall x.
DescribeSavingsPlanRates -> Rep DescribeSavingsPlanRates x
Prelude.Generic)
newDescribeSavingsPlanRates ::
Prelude.Text ->
DescribeSavingsPlanRates
newDescribeSavingsPlanRates :: Text -> DescribeSavingsPlanRates
newDescribeSavingsPlanRates Text
pSavingsPlanId_ =
DescribeSavingsPlanRates' :: Maybe [SavingsPlanRateFilter]
-> Maybe Text -> Maybe Natural -> Text -> DescribeSavingsPlanRates
DescribeSavingsPlanRates'
{ $sel:filters:DescribeSavingsPlanRates' :: Maybe [SavingsPlanRateFilter]
filters =
Maybe [SavingsPlanRateFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeSavingsPlanRates' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeSavingsPlanRates' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:savingsPlanId:DescribeSavingsPlanRates' :: Text
savingsPlanId = Text
pSavingsPlanId_
}
describeSavingsPlanRates_filters :: Lens.Lens' DescribeSavingsPlanRates (Prelude.Maybe [SavingsPlanRateFilter])
describeSavingsPlanRates_filters :: (Maybe [SavingsPlanRateFilter]
-> f (Maybe [SavingsPlanRateFilter]))
-> DescribeSavingsPlanRates -> f DescribeSavingsPlanRates
describeSavingsPlanRates_filters = (DescribeSavingsPlanRates -> Maybe [SavingsPlanRateFilter])
-> (DescribeSavingsPlanRates
-> Maybe [SavingsPlanRateFilter] -> DescribeSavingsPlanRates)
-> Lens
DescribeSavingsPlanRates
DescribeSavingsPlanRates
(Maybe [SavingsPlanRateFilter])
(Maybe [SavingsPlanRateFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlanRates' {Maybe [SavingsPlanRateFilter]
filters :: Maybe [SavingsPlanRateFilter]
$sel:filters:DescribeSavingsPlanRates' :: DescribeSavingsPlanRates -> Maybe [SavingsPlanRateFilter]
filters} -> Maybe [SavingsPlanRateFilter]
filters) (\s :: DescribeSavingsPlanRates
s@DescribeSavingsPlanRates' {} Maybe [SavingsPlanRateFilter]
a -> DescribeSavingsPlanRates
s {$sel:filters:DescribeSavingsPlanRates' :: Maybe [SavingsPlanRateFilter]
filters = Maybe [SavingsPlanRateFilter]
a} :: DescribeSavingsPlanRates) ((Maybe [SavingsPlanRateFilter]
-> f (Maybe [SavingsPlanRateFilter]))
-> DescribeSavingsPlanRates -> f DescribeSavingsPlanRates)
-> ((Maybe [SavingsPlanRateFilter]
-> f (Maybe [SavingsPlanRateFilter]))
-> Maybe [SavingsPlanRateFilter]
-> f (Maybe [SavingsPlanRateFilter]))
-> (Maybe [SavingsPlanRateFilter]
-> f (Maybe [SavingsPlanRateFilter]))
-> DescribeSavingsPlanRates
-> f DescribeSavingsPlanRates
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SavingsPlanRateFilter]
[SavingsPlanRateFilter]
[SavingsPlanRateFilter]
[SavingsPlanRateFilter]
-> Iso
(Maybe [SavingsPlanRateFilter])
(Maybe [SavingsPlanRateFilter])
(Maybe [SavingsPlanRateFilter])
(Maybe [SavingsPlanRateFilter])
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
[SavingsPlanRateFilter]
[SavingsPlanRateFilter]
[SavingsPlanRateFilter]
[SavingsPlanRateFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeSavingsPlanRates_nextToken :: Lens.Lens' DescribeSavingsPlanRates (Prelude.Maybe Prelude.Text)
describeSavingsPlanRates_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeSavingsPlanRates -> f DescribeSavingsPlanRates
describeSavingsPlanRates_nextToken = (DescribeSavingsPlanRates -> Maybe Text)
-> (DescribeSavingsPlanRates
-> Maybe Text -> DescribeSavingsPlanRates)
-> Lens
DescribeSavingsPlanRates
DescribeSavingsPlanRates
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlanRates' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeSavingsPlanRates' :: DescribeSavingsPlanRates -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeSavingsPlanRates
s@DescribeSavingsPlanRates' {} Maybe Text
a -> DescribeSavingsPlanRates
s {$sel:nextToken:DescribeSavingsPlanRates' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeSavingsPlanRates)
describeSavingsPlanRates_maxResults :: Lens.Lens' DescribeSavingsPlanRates (Prelude.Maybe Prelude.Natural)
describeSavingsPlanRates_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeSavingsPlanRates -> f DescribeSavingsPlanRates
describeSavingsPlanRates_maxResults = (DescribeSavingsPlanRates -> Maybe Natural)
-> (DescribeSavingsPlanRates
-> Maybe Natural -> DescribeSavingsPlanRates)
-> Lens
DescribeSavingsPlanRates
DescribeSavingsPlanRates
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlanRates' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeSavingsPlanRates' :: DescribeSavingsPlanRates -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeSavingsPlanRates
s@DescribeSavingsPlanRates' {} Maybe Natural
a -> DescribeSavingsPlanRates
s {$sel:maxResults:DescribeSavingsPlanRates' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeSavingsPlanRates)
describeSavingsPlanRates_savingsPlanId :: Lens.Lens' DescribeSavingsPlanRates Prelude.Text
describeSavingsPlanRates_savingsPlanId :: (Text -> f Text)
-> DescribeSavingsPlanRates -> f DescribeSavingsPlanRates
describeSavingsPlanRates_savingsPlanId = (DescribeSavingsPlanRates -> Text)
-> (DescribeSavingsPlanRates -> Text -> DescribeSavingsPlanRates)
-> Lens DescribeSavingsPlanRates DescribeSavingsPlanRates Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlanRates' {Text
savingsPlanId :: Text
$sel:savingsPlanId:DescribeSavingsPlanRates' :: DescribeSavingsPlanRates -> Text
savingsPlanId} -> Text
savingsPlanId) (\s :: DescribeSavingsPlanRates
s@DescribeSavingsPlanRates' {} Text
a -> DescribeSavingsPlanRates
s {$sel:savingsPlanId:DescribeSavingsPlanRates' :: Text
savingsPlanId = Text
a} :: DescribeSavingsPlanRates)
instance Core.AWSRequest DescribeSavingsPlanRates where
type
AWSResponse DescribeSavingsPlanRates =
DescribeSavingsPlanRatesResponse
request :: DescribeSavingsPlanRates -> Request DescribeSavingsPlanRates
request = Service
-> DescribeSavingsPlanRates -> Request DescribeSavingsPlanRates
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeSavingsPlanRates
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeSavingsPlanRates)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeSavingsPlanRates))
-> Logger
-> Service
-> Proxy DescribeSavingsPlanRates
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeSavingsPlanRates)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [SavingsPlanRate]
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeSavingsPlanRatesResponse
DescribeSavingsPlanRatesResponse'
(Maybe [SavingsPlanRate]
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeSavingsPlanRatesResponse)
-> Either String (Maybe [SavingsPlanRate])
-> Either
String
(Maybe Text
-> Maybe Text -> Int -> DescribeSavingsPlanRatesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [SavingsPlanRate]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"searchResults" Either String (Maybe (Maybe [SavingsPlanRate]))
-> Maybe [SavingsPlanRate]
-> Either String (Maybe [SavingsPlanRate])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SavingsPlanRate]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text
-> Maybe Text -> Int -> DescribeSavingsPlanRatesResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> DescribeSavingsPlanRatesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"savingsPlanId")
Either
String (Maybe Text -> Int -> DescribeSavingsPlanRatesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeSavingsPlanRatesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
Either String (Int -> DescribeSavingsPlanRatesResponse)
-> Either String Int
-> Either String DescribeSavingsPlanRatesResponse
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 DescribeSavingsPlanRates
instance Prelude.NFData DescribeSavingsPlanRates
instance Core.ToHeaders DescribeSavingsPlanRates where
toHeaders :: DescribeSavingsPlanRates -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeSavingsPlanRates -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DescribeSavingsPlanRates where
toJSON :: DescribeSavingsPlanRates -> Value
toJSON DescribeSavingsPlanRates' {Maybe Natural
Maybe [SavingsPlanRateFilter]
Maybe Text
Text
savingsPlanId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [SavingsPlanRateFilter]
$sel:savingsPlanId:DescribeSavingsPlanRates' :: DescribeSavingsPlanRates -> Text
$sel:maxResults:DescribeSavingsPlanRates' :: DescribeSavingsPlanRates -> Maybe Natural
$sel:nextToken:DescribeSavingsPlanRates' :: DescribeSavingsPlanRates -> Maybe Text
$sel:filters:DescribeSavingsPlanRates' :: DescribeSavingsPlanRates -> Maybe [SavingsPlanRateFilter]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"filters" Text -> [SavingsPlanRateFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([SavingsPlanRateFilter] -> Pair)
-> Maybe [SavingsPlanRateFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SavingsPlanRateFilter]
filters,
(Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"savingsPlanId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
savingsPlanId)
]
)
instance Core.ToPath DescribeSavingsPlanRates where
toPath :: DescribeSavingsPlanRates -> ByteString
toPath = ByteString -> DescribeSavingsPlanRates -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/DescribeSavingsPlanRates"
instance Core.ToQuery DescribeSavingsPlanRates where
toQuery :: DescribeSavingsPlanRates -> QueryString
toQuery = QueryString -> DescribeSavingsPlanRates -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeSavingsPlanRatesResponse = DescribeSavingsPlanRatesResponse'
{
DescribeSavingsPlanRatesResponse -> Maybe [SavingsPlanRate]
searchResults :: Prelude.Maybe [SavingsPlanRate],
DescribeSavingsPlanRatesResponse -> Maybe Text
savingsPlanId :: Prelude.Maybe Prelude.Text,
DescribeSavingsPlanRatesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeSavingsPlanRatesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeSavingsPlanRatesResponse
-> DescribeSavingsPlanRatesResponse -> Bool
(DescribeSavingsPlanRatesResponse
-> DescribeSavingsPlanRatesResponse -> Bool)
-> (DescribeSavingsPlanRatesResponse
-> DescribeSavingsPlanRatesResponse -> Bool)
-> Eq DescribeSavingsPlanRatesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSavingsPlanRatesResponse
-> DescribeSavingsPlanRatesResponse -> Bool
$c/= :: DescribeSavingsPlanRatesResponse
-> DescribeSavingsPlanRatesResponse -> Bool
== :: DescribeSavingsPlanRatesResponse
-> DescribeSavingsPlanRatesResponse -> Bool
$c== :: DescribeSavingsPlanRatesResponse
-> DescribeSavingsPlanRatesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSavingsPlanRatesResponse]
ReadPrec DescribeSavingsPlanRatesResponse
Int -> ReadS DescribeSavingsPlanRatesResponse
ReadS [DescribeSavingsPlanRatesResponse]
(Int -> ReadS DescribeSavingsPlanRatesResponse)
-> ReadS [DescribeSavingsPlanRatesResponse]
-> ReadPrec DescribeSavingsPlanRatesResponse
-> ReadPrec [DescribeSavingsPlanRatesResponse]
-> Read DescribeSavingsPlanRatesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSavingsPlanRatesResponse]
$creadListPrec :: ReadPrec [DescribeSavingsPlanRatesResponse]
readPrec :: ReadPrec DescribeSavingsPlanRatesResponse
$creadPrec :: ReadPrec DescribeSavingsPlanRatesResponse
readList :: ReadS [DescribeSavingsPlanRatesResponse]
$creadList :: ReadS [DescribeSavingsPlanRatesResponse]
readsPrec :: Int -> ReadS DescribeSavingsPlanRatesResponse
$creadsPrec :: Int -> ReadS DescribeSavingsPlanRatesResponse
Prelude.Read, Int -> DescribeSavingsPlanRatesResponse -> ShowS
[DescribeSavingsPlanRatesResponse] -> ShowS
DescribeSavingsPlanRatesResponse -> String
(Int -> DescribeSavingsPlanRatesResponse -> ShowS)
-> (DescribeSavingsPlanRatesResponse -> String)
-> ([DescribeSavingsPlanRatesResponse] -> ShowS)
-> Show DescribeSavingsPlanRatesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSavingsPlanRatesResponse] -> ShowS
$cshowList :: [DescribeSavingsPlanRatesResponse] -> ShowS
show :: DescribeSavingsPlanRatesResponse -> String
$cshow :: DescribeSavingsPlanRatesResponse -> String
showsPrec :: Int -> DescribeSavingsPlanRatesResponse -> ShowS
$cshowsPrec :: Int -> DescribeSavingsPlanRatesResponse -> ShowS
Prelude.Show, (forall x.
DescribeSavingsPlanRatesResponse
-> Rep DescribeSavingsPlanRatesResponse x)
-> (forall x.
Rep DescribeSavingsPlanRatesResponse x
-> DescribeSavingsPlanRatesResponse)
-> Generic DescribeSavingsPlanRatesResponse
forall x.
Rep DescribeSavingsPlanRatesResponse x
-> DescribeSavingsPlanRatesResponse
forall x.
DescribeSavingsPlanRatesResponse
-> Rep DescribeSavingsPlanRatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSavingsPlanRatesResponse x
-> DescribeSavingsPlanRatesResponse
$cfrom :: forall x.
DescribeSavingsPlanRatesResponse
-> Rep DescribeSavingsPlanRatesResponse x
Prelude.Generic)
newDescribeSavingsPlanRatesResponse ::
Prelude.Int ->
DescribeSavingsPlanRatesResponse
newDescribeSavingsPlanRatesResponse :: Int -> DescribeSavingsPlanRatesResponse
newDescribeSavingsPlanRatesResponse Int
pHttpStatus_ =
DescribeSavingsPlanRatesResponse' :: Maybe [SavingsPlanRate]
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeSavingsPlanRatesResponse
DescribeSavingsPlanRatesResponse'
{ $sel:searchResults:DescribeSavingsPlanRatesResponse' :: Maybe [SavingsPlanRate]
searchResults =
Maybe [SavingsPlanRate]
forall a. Maybe a
Prelude.Nothing,
$sel:savingsPlanId:DescribeSavingsPlanRatesResponse' :: Maybe Text
savingsPlanId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeSavingsPlanRatesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeSavingsPlanRatesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeSavingsPlanRatesResponse_searchResults :: Lens.Lens' DescribeSavingsPlanRatesResponse (Prelude.Maybe [SavingsPlanRate])
describeSavingsPlanRatesResponse_searchResults :: (Maybe [SavingsPlanRate] -> f (Maybe [SavingsPlanRate]))
-> DescribeSavingsPlanRatesResponse
-> f DescribeSavingsPlanRatesResponse
describeSavingsPlanRatesResponse_searchResults = (DescribeSavingsPlanRatesResponse -> Maybe [SavingsPlanRate])
-> (DescribeSavingsPlanRatesResponse
-> Maybe [SavingsPlanRate] -> DescribeSavingsPlanRatesResponse)
-> Lens
DescribeSavingsPlanRatesResponse
DescribeSavingsPlanRatesResponse
(Maybe [SavingsPlanRate])
(Maybe [SavingsPlanRate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlanRatesResponse' {Maybe [SavingsPlanRate]
searchResults :: Maybe [SavingsPlanRate]
$sel:searchResults:DescribeSavingsPlanRatesResponse' :: DescribeSavingsPlanRatesResponse -> Maybe [SavingsPlanRate]
searchResults} -> Maybe [SavingsPlanRate]
searchResults) (\s :: DescribeSavingsPlanRatesResponse
s@DescribeSavingsPlanRatesResponse' {} Maybe [SavingsPlanRate]
a -> DescribeSavingsPlanRatesResponse
s {$sel:searchResults:DescribeSavingsPlanRatesResponse' :: Maybe [SavingsPlanRate]
searchResults = Maybe [SavingsPlanRate]
a} :: DescribeSavingsPlanRatesResponse) ((Maybe [SavingsPlanRate] -> f (Maybe [SavingsPlanRate]))
-> DescribeSavingsPlanRatesResponse
-> f DescribeSavingsPlanRatesResponse)
-> ((Maybe [SavingsPlanRate] -> f (Maybe [SavingsPlanRate]))
-> Maybe [SavingsPlanRate] -> f (Maybe [SavingsPlanRate]))
-> (Maybe [SavingsPlanRate] -> f (Maybe [SavingsPlanRate]))
-> DescribeSavingsPlanRatesResponse
-> f DescribeSavingsPlanRatesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SavingsPlanRate]
[SavingsPlanRate]
[SavingsPlanRate]
[SavingsPlanRate]
-> Iso
(Maybe [SavingsPlanRate])
(Maybe [SavingsPlanRate])
(Maybe [SavingsPlanRate])
(Maybe [SavingsPlanRate])
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
[SavingsPlanRate]
[SavingsPlanRate]
[SavingsPlanRate]
[SavingsPlanRate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeSavingsPlanRatesResponse_savingsPlanId :: Lens.Lens' DescribeSavingsPlanRatesResponse (Prelude.Maybe Prelude.Text)
describeSavingsPlanRatesResponse_savingsPlanId :: (Maybe Text -> f (Maybe Text))
-> DescribeSavingsPlanRatesResponse
-> f DescribeSavingsPlanRatesResponse
describeSavingsPlanRatesResponse_savingsPlanId = (DescribeSavingsPlanRatesResponse -> Maybe Text)
-> (DescribeSavingsPlanRatesResponse
-> Maybe Text -> DescribeSavingsPlanRatesResponse)
-> Lens
DescribeSavingsPlanRatesResponse
DescribeSavingsPlanRatesResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlanRatesResponse' {Maybe Text
savingsPlanId :: Maybe Text
$sel:savingsPlanId:DescribeSavingsPlanRatesResponse' :: DescribeSavingsPlanRatesResponse -> Maybe Text
savingsPlanId} -> Maybe Text
savingsPlanId) (\s :: DescribeSavingsPlanRatesResponse
s@DescribeSavingsPlanRatesResponse' {} Maybe Text
a -> DescribeSavingsPlanRatesResponse
s {$sel:savingsPlanId:DescribeSavingsPlanRatesResponse' :: Maybe Text
savingsPlanId = Maybe Text
a} :: DescribeSavingsPlanRatesResponse)
describeSavingsPlanRatesResponse_nextToken :: Lens.Lens' DescribeSavingsPlanRatesResponse (Prelude.Maybe Prelude.Text)
describeSavingsPlanRatesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeSavingsPlanRatesResponse
-> f DescribeSavingsPlanRatesResponse
describeSavingsPlanRatesResponse_nextToken = (DescribeSavingsPlanRatesResponse -> Maybe Text)
-> (DescribeSavingsPlanRatesResponse
-> Maybe Text -> DescribeSavingsPlanRatesResponse)
-> Lens
DescribeSavingsPlanRatesResponse
DescribeSavingsPlanRatesResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlanRatesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeSavingsPlanRatesResponse' :: DescribeSavingsPlanRatesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeSavingsPlanRatesResponse
s@DescribeSavingsPlanRatesResponse' {} Maybe Text
a -> DescribeSavingsPlanRatesResponse
s {$sel:nextToken:DescribeSavingsPlanRatesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeSavingsPlanRatesResponse)
describeSavingsPlanRatesResponse_httpStatus :: Lens.Lens' DescribeSavingsPlanRatesResponse Prelude.Int
describeSavingsPlanRatesResponse_httpStatus :: (Int -> f Int)
-> DescribeSavingsPlanRatesResponse
-> f DescribeSavingsPlanRatesResponse
describeSavingsPlanRatesResponse_httpStatus = (DescribeSavingsPlanRatesResponse -> Int)
-> (DescribeSavingsPlanRatesResponse
-> Int -> DescribeSavingsPlanRatesResponse)
-> Lens
DescribeSavingsPlanRatesResponse
DescribeSavingsPlanRatesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSavingsPlanRatesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeSavingsPlanRatesResponse' :: DescribeSavingsPlanRatesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeSavingsPlanRatesResponse
s@DescribeSavingsPlanRatesResponse' {} Int
a -> DescribeSavingsPlanRatesResponse
s {$sel:httpStatus:DescribeSavingsPlanRatesResponse' :: Int
httpStatus = Int
a} :: DescribeSavingsPlanRatesResponse)
instance
Prelude.NFData
DescribeSavingsPlanRatesResponse