{-# 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.ExportLambdaFunctionRecommendations
(
ExportLambdaFunctionRecommendations (..),
newExportLambdaFunctionRecommendations,
exportLambdaFunctionRecommendations_accountIds,
exportLambdaFunctionRecommendations_fieldsToExport,
exportLambdaFunctionRecommendations_fileFormat,
exportLambdaFunctionRecommendations_filters,
exportLambdaFunctionRecommendations_includeMemberAccounts,
exportLambdaFunctionRecommendations_s3DestinationConfig,
ExportLambdaFunctionRecommendationsResponse (..),
newExportLambdaFunctionRecommendationsResponse,
exportLambdaFunctionRecommendationsResponse_jobId,
exportLambdaFunctionRecommendationsResponse_s3Destination,
exportLambdaFunctionRecommendationsResponse_httpStatus,
)
where
import Amazonka.ComputeOptimizer.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ExportLambdaFunctionRecommendations = ExportLambdaFunctionRecommendations'
{
ExportLambdaFunctionRecommendations -> Maybe [Text]
accountIds :: Prelude.Maybe [Prelude.Text],
ExportLambdaFunctionRecommendations
-> Maybe [ExportableLambdaFunctionField]
fieldsToExport :: Prelude.Maybe [ExportableLambdaFunctionField],
ExportLambdaFunctionRecommendations -> Maybe FileFormat
fileFormat :: Prelude.Maybe FileFormat,
ExportLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
filters :: Prelude.Maybe [LambdaFunctionRecommendationFilter],
ExportLambdaFunctionRecommendations -> Maybe Bool
includeMemberAccounts :: Prelude.Maybe Prelude.Bool,
ExportLambdaFunctionRecommendations -> S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
}
deriving (ExportLambdaFunctionRecommendations
-> ExportLambdaFunctionRecommendations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportLambdaFunctionRecommendations
-> ExportLambdaFunctionRecommendations -> Bool
$c/= :: ExportLambdaFunctionRecommendations
-> ExportLambdaFunctionRecommendations -> Bool
== :: ExportLambdaFunctionRecommendations
-> ExportLambdaFunctionRecommendations -> Bool
$c== :: ExportLambdaFunctionRecommendations
-> ExportLambdaFunctionRecommendations -> Bool
Prelude.Eq, ReadPrec [ExportLambdaFunctionRecommendations]
ReadPrec ExportLambdaFunctionRecommendations
Int -> ReadS ExportLambdaFunctionRecommendations
ReadS [ExportLambdaFunctionRecommendations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportLambdaFunctionRecommendations]
$creadListPrec :: ReadPrec [ExportLambdaFunctionRecommendations]
readPrec :: ReadPrec ExportLambdaFunctionRecommendations
$creadPrec :: ReadPrec ExportLambdaFunctionRecommendations
readList :: ReadS [ExportLambdaFunctionRecommendations]
$creadList :: ReadS [ExportLambdaFunctionRecommendations]
readsPrec :: Int -> ReadS ExportLambdaFunctionRecommendations
$creadsPrec :: Int -> ReadS ExportLambdaFunctionRecommendations
Prelude.Read, Int -> ExportLambdaFunctionRecommendations -> ShowS
[ExportLambdaFunctionRecommendations] -> ShowS
ExportLambdaFunctionRecommendations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportLambdaFunctionRecommendations] -> ShowS
$cshowList :: [ExportLambdaFunctionRecommendations] -> ShowS
show :: ExportLambdaFunctionRecommendations -> String
$cshow :: ExportLambdaFunctionRecommendations -> String
showsPrec :: Int -> ExportLambdaFunctionRecommendations -> ShowS
$cshowsPrec :: Int -> ExportLambdaFunctionRecommendations -> ShowS
Prelude.Show, forall x.
Rep ExportLambdaFunctionRecommendations x
-> ExportLambdaFunctionRecommendations
forall x.
ExportLambdaFunctionRecommendations
-> Rep ExportLambdaFunctionRecommendations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportLambdaFunctionRecommendations x
-> ExportLambdaFunctionRecommendations
$cfrom :: forall x.
ExportLambdaFunctionRecommendations
-> Rep ExportLambdaFunctionRecommendations x
Prelude.Generic)
newExportLambdaFunctionRecommendations ::
S3DestinationConfig ->
ExportLambdaFunctionRecommendations
newExportLambdaFunctionRecommendations :: S3DestinationConfig -> ExportLambdaFunctionRecommendations
newExportLambdaFunctionRecommendations
S3DestinationConfig
pS3DestinationConfig_ =
ExportLambdaFunctionRecommendations'
{ $sel:accountIds:ExportLambdaFunctionRecommendations' :: Maybe [Text]
accountIds =
forall a. Maybe a
Prelude.Nothing,
$sel:fieldsToExport:ExportLambdaFunctionRecommendations' :: Maybe [ExportableLambdaFunctionField]
fieldsToExport = forall a. Maybe a
Prelude.Nothing,
$sel:fileFormat:ExportLambdaFunctionRecommendations' :: Maybe FileFormat
fileFormat = forall a. Maybe a
Prelude.Nothing,
$sel:filters:ExportLambdaFunctionRecommendations' :: Maybe [LambdaFunctionRecommendationFilter]
filters = forall a. Maybe a
Prelude.Nothing,
$sel:includeMemberAccounts:ExportLambdaFunctionRecommendations' :: Maybe Bool
includeMemberAccounts =
forall a. Maybe a
Prelude.Nothing,
$sel:s3DestinationConfig:ExportLambdaFunctionRecommendations' :: S3DestinationConfig
s3DestinationConfig =
S3DestinationConfig
pS3DestinationConfig_
}
exportLambdaFunctionRecommendations_accountIds :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe [Prelude.Text])
exportLambdaFunctionRecommendations_accountIds :: Lens' ExportLambdaFunctionRecommendations (Maybe [Text])
exportLambdaFunctionRecommendations_accountIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendations' {Maybe [Text]
accountIds :: Maybe [Text]
$sel:accountIds:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe [Text]
accountIds} -> Maybe [Text]
accountIds) (\s :: ExportLambdaFunctionRecommendations
s@ExportLambdaFunctionRecommendations' {} Maybe [Text]
a -> ExportLambdaFunctionRecommendations
s {$sel:accountIds:ExportLambdaFunctionRecommendations' :: Maybe [Text]
accountIds = Maybe [Text]
a} :: ExportLambdaFunctionRecommendations) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportLambdaFunctionRecommendations_fieldsToExport :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe [ExportableLambdaFunctionField])
exportLambdaFunctionRecommendations_fieldsToExport :: Lens'
ExportLambdaFunctionRecommendations
(Maybe [ExportableLambdaFunctionField])
exportLambdaFunctionRecommendations_fieldsToExport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendations' {Maybe [ExportableLambdaFunctionField]
fieldsToExport :: Maybe [ExportableLambdaFunctionField]
$sel:fieldsToExport:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations
-> Maybe [ExportableLambdaFunctionField]
fieldsToExport} -> Maybe [ExportableLambdaFunctionField]
fieldsToExport) (\s :: ExportLambdaFunctionRecommendations
s@ExportLambdaFunctionRecommendations' {} Maybe [ExportableLambdaFunctionField]
a -> ExportLambdaFunctionRecommendations
s {$sel:fieldsToExport:ExportLambdaFunctionRecommendations' :: Maybe [ExportableLambdaFunctionField]
fieldsToExport = Maybe [ExportableLambdaFunctionField]
a} :: ExportLambdaFunctionRecommendations) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportLambdaFunctionRecommendations_fileFormat :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe FileFormat)
exportLambdaFunctionRecommendations_fileFormat :: Lens' ExportLambdaFunctionRecommendations (Maybe FileFormat)
exportLambdaFunctionRecommendations_fileFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendations' {Maybe FileFormat
fileFormat :: Maybe FileFormat
$sel:fileFormat:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe FileFormat
fileFormat} -> Maybe FileFormat
fileFormat) (\s :: ExportLambdaFunctionRecommendations
s@ExportLambdaFunctionRecommendations' {} Maybe FileFormat
a -> ExportLambdaFunctionRecommendations
s {$sel:fileFormat:ExportLambdaFunctionRecommendations' :: Maybe FileFormat
fileFormat = Maybe FileFormat
a} :: ExportLambdaFunctionRecommendations)
exportLambdaFunctionRecommendations_filters :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe [LambdaFunctionRecommendationFilter])
exportLambdaFunctionRecommendations_filters :: Lens'
ExportLambdaFunctionRecommendations
(Maybe [LambdaFunctionRecommendationFilter])
exportLambdaFunctionRecommendations_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendations' {Maybe [LambdaFunctionRecommendationFilter]
filters :: Maybe [LambdaFunctionRecommendationFilter]
$sel:filters:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
filters} -> Maybe [LambdaFunctionRecommendationFilter]
filters) (\s :: ExportLambdaFunctionRecommendations
s@ExportLambdaFunctionRecommendations' {} Maybe [LambdaFunctionRecommendationFilter]
a -> ExportLambdaFunctionRecommendations
s {$sel:filters:ExportLambdaFunctionRecommendations' :: Maybe [LambdaFunctionRecommendationFilter]
filters = Maybe [LambdaFunctionRecommendationFilter]
a} :: ExportLambdaFunctionRecommendations) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportLambdaFunctionRecommendations_includeMemberAccounts :: Lens.Lens' ExportLambdaFunctionRecommendations (Prelude.Maybe Prelude.Bool)
exportLambdaFunctionRecommendations_includeMemberAccounts :: Lens' ExportLambdaFunctionRecommendations (Maybe Bool)
exportLambdaFunctionRecommendations_includeMemberAccounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendations' {Maybe Bool
includeMemberAccounts :: Maybe Bool
$sel:includeMemberAccounts:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe Bool
includeMemberAccounts} -> Maybe Bool
includeMemberAccounts) (\s :: ExportLambdaFunctionRecommendations
s@ExportLambdaFunctionRecommendations' {} Maybe Bool
a -> ExportLambdaFunctionRecommendations
s {$sel:includeMemberAccounts:ExportLambdaFunctionRecommendations' :: Maybe Bool
includeMemberAccounts = Maybe Bool
a} :: ExportLambdaFunctionRecommendations)
exportLambdaFunctionRecommendations_s3DestinationConfig :: Lens.Lens' ExportLambdaFunctionRecommendations S3DestinationConfig
exportLambdaFunctionRecommendations_s3DestinationConfig :: Lens' ExportLambdaFunctionRecommendations S3DestinationConfig
exportLambdaFunctionRecommendations_s3DestinationConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendations' {S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
$sel:s3DestinationConfig:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> S3DestinationConfig
s3DestinationConfig} -> S3DestinationConfig
s3DestinationConfig) (\s :: ExportLambdaFunctionRecommendations
s@ExportLambdaFunctionRecommendations' {} S3DestinationConfig
a -> ExportLambdaFunctionRecommendations
s {$sel:s3DestinationConfig:ExportLambdaFunctionRecommendations' :: S3DestinationConfig
s3DestinationConfig = S3DestinationConfig
a} :: ExportLambdaFunctionRecommendations)
instance
Core.AWSRequest
ExportLambdaFunctionRecommendations
where
type
AWSResponse ExportLambdaFunctionRecommendations =
ExportLambdaFunctionRecommendationsResponse
request :: (Service -> Service)
-> ExportLambdaFunctionRecommendations
-> Request ExportLambdaFunctionRecommendations
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ExportLambdaFunctionRecommendations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ExportLambdaFunctionRecommendations)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe S3Destination
-> Int
-> ExportLambdaFunctionRecommendationsResponse
ExportLambdaFunctionRecommendationsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"jobId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"s3Destination")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
ExportLambdaFunctionRecommendations
where
hashWithSalt :: Int -> ExportLambdaFunctionRecommendations -> Int
hashWithSalt
Int
_salt
ExportLambdaFunctionRecommendations' {Maybe Bool
Maybe [Text]
Maybe [ExportableLambdaFunctionField]
Maybe [LambdaFunctionRecommendationFilter]
Maybe FileFormat
S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
includeMemberAccounts :: Maybe Bool
filters :: Maybe [LambdaFunctionRecommendationFilter]
fileFormat :: Maybe FileFormat
fieldsToExport :: Maybe [ExportableLambdaFunctionField]
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> S3DestinationConfig
$sel:includeMemberAccounts:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe Bool
$sel:filters:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
$sel:fileFormat:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe FileFormat
$sel:fieldsToExport:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations
-> Maybe [ExportableLambdaFunctionField]
$sel:accountIds:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
accountIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ExportableLambdaFunctionField]
fieldsToExport
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileFormat
fileFormat
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [LambdaFunctionRecommendationFilter]
filters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeMemberAccounts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` S3DestinationConfig
s3DestinationConfig
instance
Prelude.NFData
ExportLambdaFunctionRecommendations
where
rnf :: ExportLambdaFunctionRecommendations -> ()
rnf ExportLambdaFunctionRecommendations' {Maybe Bool
Maybe [Text]
Maybe [ExportableLambdaFunctionField]
Maybe [LambdaFunctionRecommendationFilter]
Maybe FileFormat
S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
includeMemberAccounts :: Maybe Bool
filters :: Maybe [LambdaFunctionRecommendationFilter]
fileFormat :: Maybe FileFormat
fieldsToExport :: Maybe [ExportableLambdaFunctionField]
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> S3DestinationConfig
$sel:includeMemberAccounts:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe Bool
$sel:filters:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
$sel:fileFormat:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe FileFormat
$sel:fieldsToExport:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations
-> Maybe [ExportableLambdaFunctionField]
$sel:accountIds:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
accountIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ExportableLambdaFunctionField]
fieldsToExport
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileFormat
fileFormat
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [LambdaFunctionRecommendationFilter]
filters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeMemberAccounts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf S3DestinationConfig
s3DestinationConfig
instance
Data.ToHeaders
ExportLambdaFunctionRecommendations
where
toHeaders :: ExportLambdaFunctionRecommendations -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"ComputeOptimizerService.ExportLambdaFunctionRecommendations" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance
Data.ToJSON
ExportLambdaFunctionRecommendations
where
toJSON :: ExportLambdaFunctionRecommendations -> Value
toJSON ExportLambdaFunctionRecommendations' {Maybe Bool
Maybe [Text]
Maybe [ExportableLambdaFunctionField]
Maybe [LambdaFunctionRecommendationFilter]
Maybe FileFormat
S3DestinationConfig
s3DestinationConfig :: S3DestinationConfig
includeMemberAccounts :: Maybe Bool
filters :: Maybe [LambdaFunctionRecommendationFilter]
fileFormat :: Maybe FileFormat
fieldsToExport :: Maybe [ExportableLambdaFunctionField]
accountIds :: Maybe [Text]
$sel:s3DestinationConfig:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> S3DestinationConfig
$sel:includeMemberAccounts:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe Bool
$sel:filters:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations
-> Maybe [LambdaFunctionRecommendationFilter]
$sel:fileFormat:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe FileFormat
$sel:fieldsToExport:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations
-> Maybe [ExportableLambdaFunctionField]
$sel:accountIds:ExportLambdaFunctionRecommendations' :: ExportLambdaFunctionRecommendations -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"accountIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
accountIds,
(Key
"fieldsToExport" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExportableLambdaFunctionField]
fieldsToExport,
(Key
"fileFormat" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileFormat
fileFormat,
(Key
"filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LambdaFunctionRecommendationFilter]
filters,
(Key
"includeMemberAccounts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeMemberAccounts,
forall a. a -> Maybe a
Prelude.Just
(Key
"s3DestinationConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= S3DestinationConfig
s3DestinationConfig)
]
)
instance
Data.ToPath
ExportLambdaFunctionRecommendations
where
toPath :: ExportLambdaFunctionRecommendations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
ExportLambdaFunctionRecommendations
where
toQuery :: ExportLambdaFunctionRecommendations -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ExportLambdaFunctionRecommendationsResponse = ExportLambdaFunctionRecommendationsResponse'
{
ExportLambdaFunctionRecommendationsResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
ExportLambdaFunctionRecommendationsResponse -> Maybe S3Destination
s3Destination :: Prelude.Maybe S3Destination,
ExportLambdaFunctionRecommendationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ExportLambdaFunctionRecommendationsResponse
-> ExportLambdaFunctionRecommendationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportLambdaFunctionRecommendationsResponse
-> ExportLambdaFunctionRecommendationsResponse -> Bool
$c/= :: ExportLambdaFunctionRecommendationsResponse
-> ExportLambdaFunctionRecommendationsResponse -> Bool
== :: ExportLambdaFunctionRecommendationsResponse
-> ExportLambdaFunctionRecommendationsResponse -> Bool
$c== :: ExportLambdaFunctionRecommendationsResponse
-> ExportLambdaFunctionRecommendationsResponse -> Bool
Prelude.Eq, ReadPrec [ExportLambdaFunctionRecommendationsResponse]
ReadPrec ExportLambdaFunctionRecommendationsResponse
Int -> ReadS ExportLambdaFunctionRecommendationsResponse
ReadS [ExportLambdaFunctionRecommendationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportLambdaFunctionRecommendationsResponse]
$creadListPrec :: ReadPrec [ExportLambdaFunctionRecommendationsResponse]
readPrec :: ReadPrec ExportLambdaFunctionRecommendationsResponse
$creadPrec :: ReadPrec ExportLambdaFunctionRecommendationsResponse
readList :: ReadS [ExportLambdaFunctionRecommendationsResponse]
$creadList :: ReadS [ExportLambdaFunctionRecommendationsResponse]
readsPrec :: Int -> ReadS ExportLambdaFunctionRecommendationsResponse
$creadsPrec :: Int -> ReadS ExportLambdaFunctionRecommendationsResponse
Prelude.Read, Int -> ExportLambdaFunctionRecommendationsResponse -> ShowS
[ExportLambdaFunctionRecommendationsResponse] -> ShowS
ExportLambdaFunctionRecommendationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportLambdaFunctionRecommendationsResponse] -> ShowS
$cshowList :: [ExportLambdaFunctionRecommendationsResponse] -> ShowS
show :: ExportLambdaFunctionRecommendationsResponse -> String
$cshow :: ExportLambdaFunctionRecommendationsResponse -> String
showsPrec :: Int -> ExportLambdaFunctionRecommendationsResponse -> ShowS
$cshowsPrec :: Int -> ExportLambdaFunctionRecommendationsResponse -> ShowS
Prelude.Show, forall x.
Rep ExportLambdaFunctionRecommendationsResponse x
-> ExportLambdaFunctionRecommendationsResponse
forall x.
ExportLambdaFunctionRecommendationsResponse
-> Rep ExportLambdaFunctionRecommendationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportLambdaFunctionRecommendationsResponse x
-> ExportLambdaFunctionRecommendationsResponse
$cfrom :: forall x.
ExportLambdaFunctionRecommendationsResponse
-> Rep ExportLambdaFunctionRecommendationsResponse x
Prelude.Generic)
newExportLambdaFunctionRecommendationsResponse ::
Prelude.Int ->
ExportLambdaFunctionRecommendationsResponse
newExportLambdaFunctionRecommendationsResponse :: Int -> ExportLambdaFunctionRecommendationsResponse
newExportLambdaFunctionRecommendationsResponse
Int
pHttpStatus_ =
ExportLambdaFunctionRecommendationsResponse'
{ $sel:jobId:ExportLambdaFunctionRecommendationsResponse' :: Maybe Text
jobId =
forall a. Maybe a
Prelude.Nothing,
$sel:s3Destination:ExportLambdaFunctionRecommendationsResponse' :: Maybe S3Destination
s3Destination =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ExportLambdaFunctionRecommendationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
exportLambdaFunctionRecommendationsResponse_jobId :: Lens.Lens' ExportLambdaFunctionRecommendationsResponse (Prelude.Maybe Prelude.Text)
exportLambdaFunctionRecommendationsResponse_jobId :: Lens' ExportLambdaFunctionRecommendationsResponse (Maybe Text)
exportLambdaFunctionRecommendationsResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendationsResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:ExportLambdaFunctionRecommendationsResponse' :: ExportLambdaFunctionRecommendationsResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: ExportLambdaFunctionRecommendationsResponse
s@ExportLambdaFunctionRecommendationsResponse' {} Maybe Text
a -> ExportLambdaFunctionRecommendationsResponse
s {$sel:jobId:ExportLambdaFunctionRecommendationsResponse' :: Maybe Text
jobId = Maybe Text
a} :: ExportLambdaFunctionRecommendationsResponse)
exportLambdaFunctionRecommendationsResponse_s3Destination :: Lens.Lens' ExportLambdaFunctionRecommendationsResponse (Prelude.Maybe S3Destination)
exportLambdaFunctionRecommendationsResponse_s3Destination :: Lens'
ExportLambdaFunctionRecommendationsResponse (Maybe S3Destination)
exportLambdaFunctionRecommendationsResponse_s3Destination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendationsResponse' {Maybe S3Destination
s3Destination :: Maybe S3Destination
$sel:s3Destination:ExportLambdaFunctionRecommendationsResponse' :: ExportLambdaFunctionRecommendationsResponse -> Maybe S3Destination
s3Destination} -> Maybe S3Destination
s3Destination) (\s :: ExportLambdaFunctionRecommendationsResponse
s@ExportLambdaFunctionRecommendationsResponse' {} Maybe S3Destination
a -> ExportLambdaFunctionRecommendationsResponse
s {$sel:s3Destination:ExportLambdaFunctionRecommendationsResponse' :: Maybe S3Destination
s3Destination = Maybe S3Destination
a} :: ExportLambdaFunctionRecommendationsResponse)
exportLambdaFunctionRecommendationsResponse_httpStatus :: Lens.Lens' ExportLambdaFunctionRecommendationsResponse Prelude.Int
exportLambdaFunctionRecommendationsResponse_httpStatus :: Lens' ExportLambdaFunctionRecommendationsResponse Int
exportLambdaFunctionRecommendationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportLambdaFunctionRecommendationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ExportLambdaFunctionRecommendationsResponse' :: ExportLambdaFunctionRecommendationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ExportLambdaFunctionRecommendationsResponse
s@ExportLambdaFunctionRecommendationsResponse' {} Int
a -> ExportLambdaFunctionRecommendationsResponse
s {$sel:httpStatus:ExportLambdaFunctionRecommendationsResponse' :: Int
httpStatus = Int
a} :: ExportLambdaFunctionRecommendationsResponse)
instance
Prelude.NFData
ExportLambdaFunctionRecommendationsResponse
where
rnf :: ExportLambdaFunctionRecommendationsResponse -> ()
rnf ExportLambdaFunctionRecommendationsResponse' {Int
Maybe Text
Maybe S3Destination
httpStatus :: Int
s3Destination :: Maybe S3Destination
jobId :: Maybe Text
$sel:httpStatus:ExportLambdaFunctionRecommendationsResponse' :: ExportLambdaFunctionRecommendationsResponse -> Int
$sel:s3Destination:ExportLambdaFunctionRecommendationsResponse' :: ExportLambdaFunctionRecommendationsResponse -> Maybe S3Destination
$sel:jobId:ExportLambdaFunctionRecommendationsResponse' :: ExportLambdaFunctionRecommendationsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3Destination
s3Destination
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus