{-# 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.ComputeOptimizer.GetLambdaFunctionRecommendations
(
GetLambdaFunctionRecommendations (..),
newGetLambdaFunctionRecommendations,
getLambdaFunctionRecommendations_functionArns,
getLambdaFunctionRecommendations_accountIds,
getLambdaFunctionRecommendations_filters,
getLambdaFunctionRecommendations_nextToken,
getLambdaFunctionRecommendations_maxResults,
GetLambdaFunctionRecommendationsResponse (..),
newGetLambdaFunctionRecommendationsResponse,
getLambdaFunctionRecommendationsResponse_nextToken,
getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations,
getLambdaFunctionRecommendationsResponse_httpStatus,
)
where
import Amazonka.ComputeOptimizer.Types
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
data GetLambdaFunctionRecommendations = GetLambdaFunctionRecommendations'
{
GetLambdaFunctionRecommendations -> Maybe [Text]
functionArns :: Prelude.Maybe [Prelude.Text],
GetLambdaFunctionRecommendations -> Maybe [Text]
accountIds :: Prelude.Maybe [Prelude.Text],
GetLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
filters :: Prelude.Maybe [LambdaFunctionRecommendationFilter],
GetLambdaFunctionRecommendations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetLambdaFunctionRecommendations -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
}
deriving (GetLambdaFunctionRecommendations
-> GetLambdaFunctionRecommendations -> Bool
(GetLambdaFunctionRecommendations
-> GetLambdaFunctionRecommendations -> Bool)
-> (GetLambdaFunctionRecommendations
-> GetLambdaFunctionRecommendations -> Bool)
-> Eq GetLambdaFunctionRecommendations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLambdaFunctionRecommendations
-> GetLambdaFunctionRecommendations -> Bool
$c/= :: GetLambdaFunctionRecommendations
-> GetLambdaFunctionRecommendations -> Bool
== :: GetLambdaFunctionRecommendations
-> GetLambdaFunctionRecommendations -> Bool
$c== :: GetLambdaFunctionRecommendations
-> GetLambdaFunctionRecommendations -> Bool
Prelude.Eq, ReadPrec [GetLambdaFunctionRecommendations]
ReadPrec GetLambdaFunctionRecommendations
Int -> ReadS GetLambdaFunctionRecommendations
ReadS [GetLambdaFunctionRecommendations]
(Int -> ReadS GetLambdaFunctionRecommendations)
-> ReadS [GetLambdaFunctionRecommendations]
-> ReadPrec GetLambdaFunctionRecommendations
-> ReadPrec [GetLambdaFunctionRecommendations]
-> Read GetLambdaFunctionRecommendations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLambdaFunctionRecommendations]
$creadListPrec :: ReadPrec [GetLambdaFunctionRecommendations]
readPrec :: ReadPrec GetLambdaFunctionRecommendations
$creadPrec :: ReadPrec GetLambdaFunctionRecommendations
readList :: ReadS [GetLambdaFunctionRecommendations]
$creadList :: ReadS [GetLambdaFunctionRecommendations]
readsPrec :: Int -> ReadS GetLambdaFunctionRecommendations
$creadsPrec :: Int -> ReadS GetLambdaFunctionRecommendations
Prelude.Read, Int -> GetLambdaFunctionRecommendations -> ShowS
[GetLambdaFunctionRecommendations] -> ShowS
GetLambdaFunctionRecommendations -> String
(Int -> GetLambdaFunctionRecommendations -> ShowS)
-> (GetLambdaFunctionRecommendations -> String)
-> ([GetLambdaFunctionRecommendations] -> ShowS)
-> Show GetLambdaFunctionRecommendations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLambdaFunctionRecommendations] -> ShowS
$cshowList :: [GetLambdaFunctionRecommendations] -> ShowS
show :: GetLambdaFunctionRecommendations -> String
$cshow :: GetLambdaFunctionRecommendations -> String
showsPrec :: Int -> GetLambdaFunctionRecommendations -> ShowS
$cshowsPrec :: Int -> GetLambdaFunctionRecommendations -> ShowS
Prelude.Show, (forall x.
GetLambdaFunctionRecommendations
-> Rep GetLambdaFunctionRecommendations x)
-> (forall x.
Rep GetLambdaFunctionRecommendations x
-> GetLambdaFunctionRecommendations)
-> Generic GetLambdaFunctionRecommendations
forall x.
Rep GetLambdaFunctionRecommendations x
-> GetLambdaFunctionRecommendations
forall x.
GetLambdaFunctionRecommendations
-> Rep GetLambdaFunctionRecommendations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLambdaFunctionRecommendations x
-> GetLambdaFunctionRecommendations
$cfrom :: forall x.
GetLambdaFunctionRecommendations
-> Rep GetLambdaFunctionRecommendations x
Prelude.Generic)
newGetLambdaFunctionRecommendations ::
GetLambdaFunctionRecommendations
newGetLambdaFunctionRecommendations :: GetLambdaFunctionRecommendations
newGetLambdaFunctionRecommendations =
GetLambdaFunctionRecommendations' :: Maybe [Text]
-> Maybe [Text]
-> Maybe [LambdaFunctionRecommendationFilter]
-> Maybe Text
-> Maybe Int
-> GetLambdaFunctionRecommendations
GetLambdaFunctionRecommendations'
{ $sel:functionArns:GetLambdaFunctionRecommendations' :: Maybe [Text]
functionArns =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:accountIds:GetLambdaFunctionRecommendations' :: Maybe [Text]
accountIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:filters:GetLambdaFunctionRecommendations' :: Maybe [LambdaFunctionRecommendationFilter]
filters = Maybe [LambdaFunctionRecommendationFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetLambdaFunctionRecommendations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetLambdaFunctionRecommendations' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
getLambdaFunctionRecommendations_functionArns :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe [Prelude.Text])
getLambdaFunctionRecommendations_functionArns :: (Maybe [Text] -> f (Maybe [Text]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations
getLambdaFunctionRecommendations_functionArns = (GetLambdaFunctionRecommendations -> Maybe [Text])
-> (GetLambdaFunctionRecommendations
-> Maybe [Text] -> GetLambdaFunctionRecommendations)
-> Lens
GetLambdaFunctionRecommendations
GetLambdaFunctionRecommendations
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLambdaFunctionRecommendations' {Maybe [Text]
functionArns :: Maybe [Text]
$sel:functionArns:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations -> Maybe [Text]
functionArns} -> Maybe [Text]
functionArns) (\s :: GetLambdaFunctionRecommendations
s@GetLambdaFunctionRecommendations' {} Maybe [Text]
a -> GetLambdaFunctionRecommendations
s {$sel:functionArns:GetLambdaFunctionRecommendations' :: Maybe [Text]
functionArns = Maybe [Text]
a} :: GetLambdaFunctionRecommendations) ((Maybe [Text] -> f (Maybe [Text]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getLambdaFunctionRecommendations_accountIds :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe [Prelude.Text])
getLambdaFunctionRecommendations_accountIds :: (Maybe [Text] -> f (Maybe [Text]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations
getLambdaFunctionRecommendations_accountIds = (GetLambdaFunctionRecommendations -> Maybe [Text])
-> (GetLambdaFunctionRecommendations
-> Maybe [Text] -> GetLambdaFunctionRecommendations)
-> Lens
GetLambdaFunctionRecommendations
GetLambdaFunctionRecommendations
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLambdaFunctionRecommendations' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations -> Maybe [Text]
accountIds} -> Maybe [Text]
accountIds) (\s :: GetLambdaFunctionRecommendations
s@GetLambdaFunctionRecommendations' {} Maybe [Text]
a -> GetLambdaFunctionRecommendations
s {$sel:accountIds:GetLambdaFunctionRecommendations' :: Maybe [Text]
accountIds = Maybe [Text]
a} :: GetLambdaFunctionRecommendations) ((Maybe [Text] -> f (Maybe [Text]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getLambdaFunctionRecommendations_filters :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe [LambdaFunctionRecommendationFilter])
getLambdaFunctionRecommendations_filters :: (Maybe [LambdaFunctionRecommendationFilter]
-> f (Maybe [LambdaFunctionRecommendationFilter]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations
getLambdaFunctionRecommendations_filters = (GetLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter])
-> (GetLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
-> GetLambdaFunctionRecommendations)
-> Lens
GetLambdaFunctionRecommendations
GetLambdaFunctionRecommendations
(Maybe [LambdaFunctionRecommendationFilter])
(Maybe [LambdaFunctionRecommendationFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLambdaFunctionRecommendations' {Maybe [LambdaFunctionRecommendationFilter]
filters :: Maybe [LambdaFunctionRecommendationFilter]
$sel:filters:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
filters} -> Maybe [LambdaFunctionRecommendationFilter]
filters) (\s :: GetLambdaFunctionRecommendations
s@GetLambdaFunctionRecommendations' {} Maybe [LambdaFunctionRecommendationFilter]
a -> GetLambdaFunctionRecommendations
s {$sel:filters:GetLambdaFunctionRecommendations' :: Maybe [LambdaFunctionRecommendationFilter]
filters = Maybe [LambdaFunctionRecommendationFilter]
a} :: GetLambdaFunctionRecommendations) ((Maybe [LambdaFunctionRecommendationFilter]
-> f (Maybe [LambdaFunctionRecommendationFilter]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations)
-> ((Maybe [LambdaFunctionRecommendationFilter]
-> f (Maybe [LambdaFunctionRecommendationFilter]))
-> Maybe [LambdaFunctionRecommendationFilter]
-> f (Maybe [LambdaFunctionRecommendationFilter]))
-> (Maybe [LambdaFunctionRecommendationFilter]
-> f (Maybe [LambdaFunctionRecommendationFilter]))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LambdaFunctionRecommendationFilter]
[LambdaFunctionRecommendationFilter]
[LambdaFunctionRecommendationFilter]
[LambdaFunctionRecommendationFilter]
-> Iso
(Maybe [LambdaFunctionRecommendationFilter])
(Maybe [LambdaFunctionRecommendationFilter])
(Maybe [LambdaFunctionRecommendationFilter])
(Maybe [LambdaFunctionRecommendationFilter])
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
[LambdaFunctionRecommendationFilter]
[LambdaFunctionRecommendationFilter]
[LambdaFunctionRecommendationFilter]
[LambdaFunctionRecommendationFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getLambdaFunctionRecommendations_nextToken :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe Prelude.Text)
getLambdaFunctionRecommendations_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations
getLambdaFunctionRecommendations_nextToken = (GetLambdaFunctionRecommendations -> Maybe Text)
-> (GetLambdaFunctionRecommendations
-> Maybe Text -> GetLambdaFunctionRecommendations)
-> Lens
GetLambdaFunctionRecommendations
GetLambdaFunctionRecommendations
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLambdaFunctionRecommendations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetLambdaFunctionRecommendations
s@GetLambdaFunctionRecommendations' {} Maybe Text
a -> GetLambdaFunctionRecommendations
s {$sel:nextToken:GetLambdaFunctionRecommendations' :: Maybe Text
nextToken = Maybe Text
a} :: GetLambdaFunctionRecommendations)
getLambdaFunctionRecommendations_maxResults :: Lens.Lens' GetLambdaFunctionRecommendations (Prelude.Maybe Prelude.Int)
getLambdaFunctionRecommendations_maxResults :: (Maybe Int -> f (Maybe Int))
-> GetLambdaFunctionRecommendations
-> f GetLambdaFunctionRecommendations
getLambdaFunctionRecommendations_maxResults = (GetLambdaFunctionRecommendations -> Maybe Int)
-> (GetLambdaFunctionRecommendations
-> Maybe Int -> GetLambdaFunctionRecommendations)
-> Lens
GetLambdaFunctionRecommendations
GetLambdaFunctionRecommendations
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLambdaFunctionRecommendations' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetLambdaFunctionRecommendations
s@GetLambdaFunctionRecommendations' {} Maybe Int
a -> GetLambdaFunctionRecommendations
s {$sel:maxResults:GetLambdaFunctionRecommendations' :: Maybe Int
maxResults = Maybe Int
a} :: GetLambdaFunctionRecommendations)
instance
Core.AWSRequest
GetLambdaFunctionRecommendations
where
type
AWSResponse GetLambdaFunctionRecommendations =
GetLambdaFunctionRecommendationsResponse
request :: GetLambdaFunctionRecommendations
-> Request GetLambdaFunctionRecommendations
request = Service
-> GetLambdaFunctionRecommendations
-> Request GetLambdaFunctionRecommendations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetLambdaFunctionRecommendations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetLambdaFunctionRecommendations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetLambdaFunctionRecommendations))
-> Logger
-> Service
-> Proxy GetLambdaFunctionRecommendations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetLambdaFunctionRecommendations)))
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 Text
-> Maybe [LambdaFunctionRecommendation]
-> Int
-> GetLambdaFunctionRecommendationsResponse
GetLambdaFunctionRecommendationsResponse'
(Maybe Text
-> Maybe [LambdaFunctionRecommendation]
-> Int
-> GetLambdaFunctionRecommendationsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [LambdaFunctionRecommendation]
-> Int -> GetLambdaFunctionRecommendationsResponse)
forall (f :: * -> *) a b. Functor 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
(Maybe [LambdaFunctionRecommendation]
-> Int -> GetLambdaFunctionRecommendationsResponse)
-> Either String (Maybe [LambdaFunctionRecommendation])
-> Either String (Int -> GetLambdaFunctionRecommendationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [LambdaFunctionRecommendation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lambdaFunctionRecommendations"
Either String (Maybe (Maybe [LambdaFunctionRecommendation]))
-> Maybe [LambdaFunctionRecommendation]
-> Either String (Maybe [LambdaFunctionRecommendation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [LambdaFunctionRecommendation]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> GetLambdaFunctionRecommendationsResponse)
-> Either String Int
-> Either String GetLambdaFunctionRecommendationsResponse
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
GetLambdaFunctionRecommendations
instance
Prelude.NFData
GetLambdaFunctionRecommendations
instance
Core.ToHeaders
GetLambdaFunctionRecommendations
where
toHeaders :: GetLambdaFunctionRecommendations -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetLambdaFunctionRecommendations -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"ComputeOptimizerService.GetLambdaFunctionRecommendations" ::
Prelude.ByteString
),
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 GetLambdaFunctionRecommendations where
toJSON :: GetLambdaFunctionRecommendations -> Value
toJSON GetLambdaFunctionRecommendations' {Maybe Int
Maybe [Text]
Maybe [LambdaFunctionRecommendationFilter]
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
filters :: Maybe [LambdaFunctionRecommendationFilter]
accountIds :: Maybe [Text]
functionArns :: Maybe [Text]
$sel:maxResults:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations -> Maybe Int
$sel:nextToken:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations -> Maybe Text
$sel:filters:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
$sel:accountIds:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations -> Maybe [Text]
$sel:functionArns:GetLambdaFunctionRecommendations' :: GetLambdaFunctionRecommendations -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"functionArns" 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]
functionArns,
(Text
"accountIds" 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]
accountIds,
(Text
"filters" Text -> [LambdaFunctionRecommendationFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([LambdaFunctionRecommendationFilter] -> Pair)
-> Maybe [LambdaFunctionRecommendationFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LambdaFunctionRecommendationFilter]
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 -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
]
)
instance Core.ToPath GetLambdaFunctionRecommendations where
toPath :: GetLambdaFunctionRecommendations -> ByteString
toPath = ByteString -> GetLambdaFunctionRecommendations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
GetLambdaFunctionRecommendations
where
toQuery :: GetLambdaFunctionRecommendations -> QueryString
toQuery = QueryString -> GetLambdaFunctionRecommendations -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetLambdaFunctionRecommendationsResponse = GetLambdaFunctionRecommendationsResponse'
{
GetLambdaFunctionRecommendationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetLambdaFunctionRecommendationsResponse
-> Maybe [LambdaFunctionRecommendation]
lambdaFunctionRecommendations :: Prelude.Maybe [LambdaFunctionRecommendation],
GetLambdaFunctionRecommendationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLambdaFunctionRecommendationsResponse
-> GetLambdaFunctionRecommendationsResponse -> Bool
(GetLambdaFunctionRecommendationsResponse
-> GetLambdaFunctionRecommendationsResponse -> Bool)
-> (GetLambdaFunctionRecommendationsResponse
-> GetLambdaFunctionRecommendationsResponse -> Bool)
-> Eq GetLambdaFunctionRecommendationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLambdaFunctionRecommendationsResponse
-> GetLambdaFunctionRecommendationsResponse -> Bool
$c/= :: GetLambdaFunctionRecommendationsResponse
-> GetLambdaFunctionRecommendationsResponse -> Bool
== :: GetLambdaFunctionRecommendationsResponse
-> GetLambdaFunctionRecommendationsResponse -> Bool
$c== :: GetLambdaFunctionRecommendationsResponse
-> GetLambdaFunctionRecommendationsResponse -> Bool
Prelude.Eq, ReadPrec [GetLambdaFunctionRecommendationsResponse]
ReadPrec GetLambdaFunctionRecommendationsResponse
Int -> ReadS GetLambdaFunctionRecommendationsResponse
ReadS [GetLambdaFunctionRecommendationsResponse]
(Int -> ReadS GetLambdaFunctionRecommendationsResponse)
-> ReadS [GetLambdaFunctionRecommendationsResponse]
-> ReadPrec GetLambdaFunctionRecommendationsResponse
-> ReadPrec [GetLambdaFunctionRecommendationsResponse]
-> Read GetLambdaFunctionRecommendationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLambdaFunctionRecommendationsResponse]
$creadListPrec :: ReadPrec [GetLambdaFunctionRecommendationsResponse]
readPrec :: ReadPrec GetLambdaFunctionRecommendationsResponse
$creadPrec :: ReadPrec GetLambdaFunctionRecommendationsResponse
readList :: ReadS [GetLambdaFunctionRecommendationsResponse]
$creadList :: ReadS [GetLambdaFunctionRecommendationsResponse]
readsPrec :: Int -> ReadS GetLambdaFunctionRecommendationsResponse
$creadsPrec :: Int -> ReadS GetLambdaFunctionRecommendationsResponse
Prelude.Read, Int -> GetLambdaFunctionRecommendationsResponse -> ShowS
[GetLambdaFunctionRecommendationsResponse] -> ShowS
GetLambdaFunctionRecommendationsResponse -> String
(Int -> GetLambdaFunctionRecommendationsResponse -> ShowS)
-> (GetLambdaFunctionRecommendationsResponse -> String)
-> ([GetLambdaFunctionRecommendationsResponse] -> ShowS)
-> Show GetLambdaFunctionRecommendationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLambdaFunctionRecommendationsResponse] -> ShowS
$cshowList :: [GetLambdaFunctionRecommendationsResponse] -> ShowS
show :: GetLambdaFunctionRecommendationsResponse -> String
$cshow :: GetLambdaFunctionRecommendationsResponse -> String
showsPrec :: Int -> GetLambdaFunctionRecommendationsResponse -> ShowS
$cshowsPrec :: Int -> GetLambdaFunctionRecommendationsResponse -> ShowS
Prelude.Show, (forall x.
GetLambdaFunctionRecommendationsResponse
-> Rep GetLambdaFunctionRecommendationsResponse x)
-> (forall x.
Rep GetLambdaFunctionRecommendationsResponse x
-> GetLambdaFunctionRecommendationsResponse)
-> Generic GetLambdaFunctionRecommendationsResponse
forall x.
Rep GetLambdaFunctionRecommendationsResponse x
-> GetLambdaFunctionRecommendationsResponse
forall x.
GetLambdaFunctionRecommendationsResponse
-> Rep GetLambdaFunctionRecommendationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLambdaFunctionRecommendationsResponse x
-> GetLambdaFunctionRecommendationsResponse
$cfrom :: forall x.
GetLambdaFunctionRecommendationsResponse
-> Rep GetLambdaFunctionRecommendationsResponse x
Prelude.Generic)
newGetLambdaFunctionRecommendationsResponse ::
Prelude.Int ->
GetLambdaFunctionRecommendationsResponse
newGetLambdaFunctionRecommendationsResponse :: Int -> GetLambdaFunctionRecommendationsResponse
newGetLambdaFunctionRecommendationsResponse
Int
pHttpStatus_ =
GetLambdaFunctionRecommendationsResponse' :: Maybe Text
-> Maybe [LambdaFunctionRecommendation]
-> Int
-> GetLambdaFunctionRecommendationsResponse
GetLambdaFunctionRecommendationsResponse'
{ $sel:nextToken:GetLambdaFunctionRecommendationsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lambdaFunctionRecommendations:GetLambdaFunctionRecommendationsResponse' :: Maybe [LambdaFunctionRecommendation]
lambdaFunctionRecommendations =
Maybe [LambdaFunctionRecommendation]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLambdaFunctionRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLambdaFunctionRecommendationsResponse_nextToken :: Lens.Lens' GetLambdaFunctionRecommendationsResponse (Prelude.Maybe Prelude.Text)
getLambdaFunctionRecommendationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetLambdaFunctionRecommendationsResponse
-> f GetLambdaFunctionRecommendationsResponse
getLambdaFunctionRecommendationsResponse_nextToken = (GetLambdaFunctionRecommendationsResponse -> Maybe Text)
-> (GetLambdaFunctionRecommendationsResponse
-> Maybe Text -> GetLambdaFunctionRecommendationsResponse)
-> Lens
GetLambdaFunctionRecommendationsResponse
GetLambdaFunctionRecommendationsResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLambdaFunctionRecommendationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetLambdaFunctionRecommendationsResponse' :: GetLambdaFunctionRecommendationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetLambdaFunctionRecommendationsResponse
s@GetLambdaFunctionRecommendationsResponse' {} Maybe Text
a -> GetLambdaFunctionRecommendationsResponse
s {$sel:nextToken:GetLambdaFunctionRecommendationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetLambdaFunctionRecommendationsResponse)
getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations :: Lens.Lens' GetLambdaFunctionRecommendationsResponse (Prelude.Maybe [LambdaFunctionRecommendation])
getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations :: (Maybe [LambdaFunctionRecommendation]
-> f (Maybe [LambdaFunctionRecommendation]))
-> GetLambdaFunctionRecommendationsResponse
-> f GetLambdaFunctionRecommendationsResponse
getLambdaFunctionRecommendationsResponse_lambdaFunctionRecommendations = (GetLambdaFunctionRecommendationsResponse
-> Maybe [LambdaFunctionRecommendation])
-> (GetLambdaFunctionRecommendationsResponse
-> Maybe [LambdaFunctionRecommendation]
-> GetLambdaFunctionRecommendationsResponse)
-> Lens
GetLambdaFunctionRecommendationsResponse
GetLambdaFunctionRecommendationsResponse
(Maybe [LambdaFunctionRecommendation])
(Maybe [LambdaFunctionRecommendation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLambdaFunctionRecommendationsResponse' {Maybe [LambdaFunctionRecommendation]
lambdaFunctionRecommendations :: Maybe [LambdaFunctionRecommendation]
$sel:lambdaFunctionRecommendations:GetLambdaFunctionRecommendationsResponse' :: GetLambdaFunctionRecommendationsResponse
-> Maybe [LambdaFunctionRecommendation]
lambdaFunctionRecommendations} -> Maybe [LambdaFunctionRecommendation]
lambdaFunctionRecommendations) (\s :: GetLambdaFunctionRecommendationsResponse
s@GetLambdaFunctionRecommendationsResponse' {} Maybe [LambdaFunctionRecommendation]
a -> GetLambdaFunctionRecommendationsResponse
s {$sel:lambdaFunctionRecommendations:GetLambdaFunctionRecommendationsResponse' :: Maybe [LambdaFunctionRecommendation]
lambdaFunctionRecommendations = Maybe [LambdaFunctionRecommendation]
a} :: GetLambdaFunctionRecommendationsResponse) ((Maybe [LambdaFunctionRecommendation]
-> f (Maybe [LambdaFunctionRecommendation]))
-> GetLambdaFunctionRecommendationsResponse
-> f GetLambdaFunctionRecommendationsResponse)
-> ((Maybe [LambdaFunctionRecommendation]
-> f (Maybe [LambdaFunctionRecommendation]))
-> Maybe [LambdaFunctionRecommendation]
-> f (Maybe [LambdaFunctionRecommendation]))
-> (Maybe [LambdaFunctionRecommendation]
-> f (Maybe [LambdaFunctionRecommendation]))
-> GetLambdaFunctionRecommendationsResponse
-> f GetLambdaFunctionRecommendationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LambdaFunctionRecommendation]
[LambdaFunctionRecommendation]
[LambdaFunctionRecommendation]
[LambdaFunctionRecommendation]
-> Iso
(Maybe [LambdaFunctionRecommendation])
(Maybe [LambdaFunctionRecommendation])
(Maybe [LambdaFunctionRecommendation])
(Maybe [LambdaFunctionRecommendation])
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
[LambdaFunctionRecommendation]
[LambdaFunctionRecommendation]
[LambdaFunctionRecommendation]
[LambdaFunctionRecommendation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getLambdaFunctionRecommendationsResponse_httpStatus :: Lens.Lens' GetLambdaFunctionRecommendationsResponse Prelude.Int
getLambdaFunctionRecommendationsResponse_httpStatus :: (Int -> f Int)
-> GetLambdaFunctionRecommendationsResponse
-> f GetLambdaFunctionRecommendationsResponse
getLambdaFunctionRecommendationsResponse_httpStatus = (GetLambdaFunctionRecommendationsResponse -> Int)
-> (GetLambdaFunctionRecommendationsResponse
-> Int -> GetLambdaFunctionRecommendationsResponse)
-> Lens
GetLambdaFunctionRecommendationsResponse
GetLambdaFunctionRecommendationsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLambdaFunctionRecommendationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetLambdaFunctionRecommendationsResponse' :: GetLambdaFunctionRecommendationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetLambdaFunctionRecommendationsResponse
s@GetLambdaFunctionRecommendationsResponse' {} Int
a -> GetLambdaFunctionRecommendationsResponse
s {$sel:httpStatus:GetLambdaFunctionRecommendationsResponse' :: Int
httpStatus = Int
a} :: GetLambdaFunctionRecommendationsResponse)
instance
Prelude.NFData
GetLambdaFunctionRecommendationsResponse