{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendation where
import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryRecommendationOption
import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFinding
import Amazonka.ComputeOptimizer.Types.LambdaFunctionRecommendationFindingReasonCode
import Amazonka.ComputeOptimizer.Types.LambdaFunctionUtilizationMetric
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LambdaFunctionRecommendation = LambdaFunctionRecommendation'
{
LambdaFunctionRecommendation -> Maybe Text
functionArn :: Prelude.Maybe Prelude.Text,
LambdaFunctionRecommendation
-> Maybe LambdaFunctionRecommendationFinding
finding :: Prelude.Maybe LambdaFunctionRecommendationFinding,
LambdaFunctionRecommendation -> Maybe Int
currentMemorySize :: Prelude.Maybe Prelude.Int,
LambdaFunctionRecommendation -> Maybe POSIX
lastRefreshTimestamp :: Prelude.Maybe Core.POSIX,
LambdaFunctionRecommendation -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
LambdaFunctionRecommendation
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
findingReasonCodes :: Prelude.Maybe [LambdaFunctionRecommendationFindingReasonCode],
LambdaFunctionRecommendation
-> Maybe [LambdaFunctionUtilizationMetric]
utilizationMetrics :: Prelude.Maybe [LambdaFunctionUtilizationMetric],
LambdaFunctionRecommendation
-> Maybe [LambdaFunctionMemoryRecommendationOption]
memorySizeRecommendationOptions :: Prelude.Maybe [LambdaFunctionMemoryRecommendationOption],
LambdaFunctionRecommendation -> Maybe Text
functionVersion :: Prelude.Maybe Prelude.Text,
LambdaFunctionRecommendation -> Maybe Integer
numberOfInvocations :: Prelude.Maybe Prelude.Integer,
LambdaFunctionRecommendation -> Maybe Double
lookbackPeriodInDays :: Prelude.Maybe Prelude.Double
}
deriving (LambdaFunctionRecommendation
-> LambdaFunctionRecommendation -> Bool
(LambdaFunctionRecommendation
-> LambdaFunctionRecommendation -> Bool)
-> (LambdaFunctionRecommendation
-> LambdaFunctionRecommendation -> Bool)
-> Eq LambdaFunctionRecommendation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaFunctionRecommendation
-> LambdaFunctionRecommendation -> Bool
$c/= :: LambdaFunctionRecommendation
-> LambdaFunctionRecommendation -> Bool
== :: LambdaFunctionRecommendation
-> LambdaFunctionRecommendation -> Bool
$c== :: LambdaFunctionRecommendation
-> LambdaFunctionRecommendation -> Bool
Prelude.Eq, ReadPrec [LambdaFunctionRecommendation]
ReadPrec LambdaFunctionRecommendation
Int -> ReadS LambdaFunctionRecommendation
ReadS [LambdaFunctionRecommendation]
(Int -> ReadS LambdaFunctionRecommendation)
-> ReadS [LambdaFunctionRecommendation]
-> ReadPrec LambdaFunctionRecommendation
-> ReadPrec [LambdaFunctionRecommendation]
-> Read LambdaFunctionRecommendation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaFunctionRecommendation]
$creadListPrec :: ReadPrec [LambdaFunctionRecommendation]
readPrec :: ReadPrec LambdaFunctionRecommendation
$creadPrec :: ReadPrec LambdaFunctionRecommendation
readList :: ReadS [LambdaFunctionRecommendation]
$creadList :: ReadS [LambdaFunctionRecommendation]
readsPrec :: Int -> ReadS LambdaFunctionRecommendation
$creadsPrec :: Int -> ReadS LambdaFunctionRecommendation
Prelude.Read, Int -> LambdaFunctionRecommendation -> ShowS
[LambdaFunctionRecommendation] -> ShowS
LambdaFunctionRecommendation -> String
(Int -> LambdaFunctionRecommendation -> ShowS)
-> (LambdaFunctionRecommendation -> String)
-> ([LambdaFunctionRecommendation] -> ShowS)
-> Show LambdaFunctionRecommendation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaFunctionRecommendation] -> ShowS
$cshowList :: [LambdaFunctionRecommendation] -> ShowS
show :: LambdaFunctionRecommendation -> String
$cshow :: LambdaFunctionRecommendation -> String
showsPrec :: Int -> LambdaFunctionRecommendation -> ShowS
$cshowsPrec :: Int -> LambdaFunctionRecommendation -> ShowS
Prelude.Show, (forall x.
LambdaFunctionRecommendation -> Rep LambdaFunctionRecommendation x)
-> (forall x.
Rep LambdaFunctionRecommendation x -> LambdaFunctionRecommendation)
-> Generic LambdaFunctionRecommendation
forall x.
Rep LambdaFunctionRecommendation x -> LambdaFunctionRecommendation
forall x.
LambdaFunctionRecommendation -> Rep LambdaFunctionRecommendation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LambdaFunctionRecommendation x -> LambdaFunctionRecommendation
$cfrom :: forall x.
LambdaFunctionRecommendation -> Rep LambdaFunctionRecommendation x
Prelude.Generic)
newLambdaFunctionRecommendation ::
LambdaFunctionRecommendation
newLambdaFunctionRecommendation :: LambdaFunctionRecommendation
newLambdaFunctionRecommendation =
LambdaFunctionRecommendation' :: Maybe Text
-> Maybe LambdaFunctionRecommendationFinding
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation
LambdaFunctionRecommendation'
{ $sel:functionArn:LambdaFunctionRecommendation' :: Maybe Text
functionArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:finding:LambdaFunctionRecommendation' :: Maybe LambdaFunctionRecommendationFinding
finding = Maybe LambdaFunctionRecommendationFinding
forall a. Maybe a
Prelude.Nothing,
$sel:currentMemorySize:LambdaFunctionRecommendation' :: Maybe Int
currentMemorySize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:lastRefreshTimestamp:LambdaFunctionRecommendation' :: Maybe POSIX
lastRefreshTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:LambdaFunctionRecommendation' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:findingReasonCodes:LambdaFunctionRecommendation' :: Maybe [LambdaFunctionRecommendationFindingReasonCode]
findingReasonCodes = Maybe [LambdaFunctionRecommendationFindingReasonCode]
forall a. Maybe a
Prelude.Nothing,
$sel:utilizationMetrics:LambdaFunctionRecommendation' :: Maybe [LambdaFunctionUtilizationMetric]
utilizationMetrics = Maybe [LambdaFunctionUtilizationMetric]
forall a. Maybe a
Prelude.Nothing,
$sel:memorySizeRecommendationOptions:LambdaFunctionRecommendation' :: Maybe [LambdaFunctionMemoryRecommendationOption]
memorySizeRecommendationOptions =
Maybe [LambdaFunctionMemoryRecommendationOption]
forall a. Maybe a
Prelude.Nothing,
$sel:functionVersion:LambdaFunctionRecommendation' :: Maybe Text
functionVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfInvocations:LambdaFunctionRecommendation' :: Maybe Integer
numberOfInvocations = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:lookbackPeriodInDays:LambdaFunctionRecommendation' :: Maybe Double
lookbackPeriodInDays = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
lambdaFunctionRecommendation_functionArn :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Text)
lambdaFunctionRecommendation_functionArn :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_functionArn = (LambdaFunctionRecommendation -> Maybe Text)
-> (LambdaFunctionRecommendation
-> Maybe Text -> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe Text
functionArn :: Maybe Text
$sel:functionArn:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation -> Maybe Text
functionArn} -> Maybe Text
functionArn) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe Text
a -> LambdaFunctionRecommendation
s {$sel:functionArn:LambdaFunctionRecommendation' :: Maybe Text
functionArn = Maybe Text
a} :: LambdaFunctionRecommendation)
lambdaFunctionRecommendation_finding :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe LambdaFunctionRecommendationFinding)
lambdaFunctionRecommendation_finding :: (Maybe LambdaFunctionRecommendationFinding
-> f (Maybe LambdaFunctionRecommendationFinding))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_finding = (LambdaFunctionRecommendation
-> Maybe LambdaFunctionRecommendationFinding)
-> (LambdaFunctionRecommendation
-> Maybe LambdaFunctionRecommendationFinding
-> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe LambdaFunctionRecommendationFinding)
(Maybe LambdaFunctionRecommendationFinding)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe LambdaFunctionRecommendationFinding
finding :: Maybe LambdaFunctionRecommendationFinding
$sel:finding:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation
-> Maybe LambdaFunctionRecommendationFinding
finding} -> Maybe LambdaFunctionRecommendationFinding
finding) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe LambdaFunctionRecommendationFinding
a -> LambdaFunctionRecommendation
s {$sel:finding:LambdaFunctionRecommendation' :: Maybe LambdaFunctionRecommendationFinding
finding = Maybe LambdaFunctionRecommendationFinding
a} :: LambdaFunctionRecommendation)
lambdaFunctionRecommendation_currentMemorySize :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Int)
lambdaFunctionRecommendation_currentMemorySize :: (Maybe Int -> f (Maybe Int))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_currentMemorySize = (LambdaFunctionRecommendation -> Maybe Int)
-> (LambdaFunctionRecommendation
-> Maybe Int -> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe Int
currentMemorySize :: Maybe Int
$sel:currentMemorySize:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation -> Maybe Int
currentMemorySize} -> Maybe Int
currentMemorySize) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe Int
a -> LambdaFunctionRecommendation
s {$sel:currentMemorySize:LambdaFunctionRecommendation' :: Maybe Int
currentMemorySize = Maybe Int
a} :: LambdaFunctionRecommendation)
lambdaFunctionRecommendation_lastRefreshTimestamp :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.UTCTime)
lambdaFunctionRecommendation_lastRefreshTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_lastRefreshTimestamp = (LambdaFunctionRecommendation -> Maybe POSIX)
-> (LambdaFunctionRecommendation
-> Maybe POSIX -> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe POSIX
lastRefreshTimestamp :: Maybe POSIX
$sel:lastRefreshTimestamp:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation -> Maybe POSIX
lastRefreshTimestamp} -> Maybe POSIX
lastRefreshTimestamp) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe POSIX
a -> LambdaFunctionRecommendation
s {$sel:lastRefreshTimestamp:LambdaFunctionRecommendation' :: Maybe POSIX
lastRefreshTimestamp = Maybe POSIX
a} :: LambdaFunctionRecommendation) ((Maybe POSIX -> f (Maybe POSIX))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> LambdaFunctionRecommendation
-> f LambdaFunctionRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
lambdaFunctionRecommendation_accountId :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Text)
lambdaFunctionRecommendation_accountId :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_accountId = (LambdaFunctionRecommendation -> Maybe Text)
-> (LambdaFunctionRecommendation
-> Maybe Text -> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe Text
accountId :: Maybe Text
$sel:accountId:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe Text
a -> LambdaFunctionRecommendation
s {$sel:accountId:LambdaFunctionRecommendation' :: Maybe Text
accountId = Maybe Text
a} :: LambdaFunctionRecommendation)
lambdaFunctionRecommendation_findingReasonCodes :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe [LambdaFunctionRecommendationFindingReasonCode])
lambdaFunctionRecommendation_findingReasonCodes :: (Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> f (Maybe [LambdaFunctionRecommendationFindingReasonCode]))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_findingReasonCodes = (LambdaFunctionRecommendation
-> Maybe [LambdaFunctionRecommendationFindingReasonCode])
-> (LambdaFunctionRecommendation
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe [LambdaFunctionRecommendationFindingReasonCode])
(Maybe [LambdaFunctionRecommendationFindingReasonCode])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe [LambdaFunctionRecommendationFindingReasonCode]
findingReasonCodes :: Maybe [LambdaFunctionRecommendationFindingReasonCode]
$sel:findingReasonCodes:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
findingReasonCodes} -> Maybe [LambdaFunctionRecommendationFindingReasonCode]
findingReasonCodes) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe [LambdaFunctionRecommendationFindingReasonCode]
a -> LambdaFunctionRecommendation
s {$sel:findingReasonCodes:LambdaFunctionRecommendation' :: Maybe [LambdaFunctionRecommendationFindingReasonCode]
findingReasonCodes = Maybe [LambdaFunctionRecommendationFindingReasonCode]
a} :: LambdaFunctionRecommendation) ((Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> f (Maybe [LambdaFunctionRecommendationFindingReasonCode]))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation)
-> ((Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> f (Maybe [LambdaFunctionRecommendationFindingReasonCode]))
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> f (Maybe [LambdaFunctionRecommendationFindingReasonCode]))
-> (Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> f (Maybe [LambdaFunctionRecommendationFindingReasonCode]))
-> LambdaFunctionRecommendation
-> f LambdaFunctionRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LambdaFunctionRecommendationFindingReasonCode]
[LambdaFunctionRecommendationFindingReasonCode]
[LambdaFunctionRecommendationFindingReasonCode]
[LambdaFunctionRecommendationFindingReasonCode]
-> Iso
(Maybe [LambdaFunctionRecommendationFindingReasonCode])
(Maybe [LambdaFunctionRecommendationFindingReasonCode])
(Maybe [LambdaFunctionRecommendationFindingReasonCode])
(Maybe [LambdaFunctionRecommendationFindingReasonCode])
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
[LambdaFunctionRecommendationFindingReasonCode]
[LambdaFunctionRecommendationFindingReasonCode]
[LambdaFunctionRecommendationFindingReasonCode]
[LambdaFunctionRecommendationFindingReasonCode]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
lambdaFunctionRecommendation_utilizationMetrics :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe [LambdaFunctionUtilizationMetric])
lambdaFunctionRecommendation_utilizationMetrics :: (Maybe [LambdaFunctionUtilizationMetric]
-> f (Maybe [LambdaFunctionUtilizationMetric]))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_utilizationMetrics = (LambdaFunctionRecommendation
-> Maybe [LambdaFunctionUtilizationMetric])
-> (LambdaFunctionRecommendation
-> Maybe [LambdaFunctionUtilizationMetric]
-> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe [LambdaFunctionUtilizationMetric])
(Maybe [LambdaFunctionUtilizationMetric])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe [LambdaFunctionUtilizationMetric]
utilizationMetrics :: Maybe [LambdaFunctionUtilizationMetric]
$sel:utilizationMetrics:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation
-> Maybe [LambdaFunctionUtilizationMetric]
utilizationMetrics} -> Maybe [LambdaFunctionUtilizationMetric]
utilizationMetrics) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe [LambdaFunctionUtilizationMetric]
a -> LambdaFunctionRecommendation
s {$sel:utilizationMetrics:LambdaFunctionRecommendation' :: Maybe [LambdaFunctionUtilizationMetric]
utilizationMetrics = Maybe [LambdaFunctionUtilizationMetric]
a} :: LambdaFunctionRecommendation) ((Maybe [LambdaFunctionUtilizationMetric]
-> f (Maybe [LambdaFunctionUtilizationMetric]))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation)
-> ((Maybe [LambdaFunctionUtilizationMetric]
-> f (Maybe [LambdaFunctionUtilizationMetric]))
-> Maybe [LambdaFunctionUtilizationMetric]
-> f (Maybe [LambdaFunctionUtilizationMetric]))
-> (Maybe [LambdaFunctionUtilizationMetric]
-> f (Maybe [LambdaFunctionUtilizationMetric]))
-> LambdaFunctionRecommendation
-> f LambdaFunctionRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LambdaFunctionUtilizationMetric]
[LambdaFunctionUtilizationMetric]
[LambdaFunctionUtilizationMetric]
[LambdaFunctionUtilizationMetric]
-> Iso
(Maybe [LambdaFunctionUtilizationMetric])
(Maybe [LambdaFunctionUtilizationMetric])
(Maybe [LambdaFunctionUtilizationMetric])
(Maybe [LambdaFunctionUtilizationMetric])
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
[LambdaFunctionUtilizationMetric]
[LambdaFunctionUtilizationMetric]
[LambdaFunctionUtilizationMetric]
[LambdaFunctionUtilizationMetric]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
lambdaFunctionRecommendation_memorySizeRecommendationOptions :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe [LambdaFunctionMemoryRecommendationOption])
lambdaFunctionRecommendation_memorySizeRecommendationOptions :: (Maybe [LambdaFunctionMemoryRecommendationOption]
-> f (Maybe [LambdaFunctionMemoryRecommendationOption]))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_memorySizeRecommendationOptions = (LambdaFunctionRecommendation
-> Maybe [LambdaFunctionMemoryRecommendationOption])
-> (LambdaFunctionRecommendation
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe [LambdaFunctionMemoryRecommendationOption])
(Maybe [LambdaFunctionMemoryRecommendationOption])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe [LambdaFunctionMemoryRecommendationOption]
memorySizeRecommendationOptions :: Maybe [LambdaFunctionMemoryRecommendationOption]
$sel:memorySizeRecommendationOptions:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation
-> Maybe [LambdaFunctionMemoryRecommendationOption]
memorySizeRecommendationOptions} -> Maybe [LambdaFunctionMemoryRecommendationOption]
memorySizeRecommendationOptions) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe [LambdaFunctionMemoryRecommendationOption]
a -> LambdaFunctionRecommendation
s {$sel:memorySizeRecommendationOptions:LambdaFunctionRecommendation' :: Maybe [LambdaFunctionMemoryRecommendationOption]
memorySizeRecommendationOptions = Maybe [LambdaFunctionMemoryRecommendationOption]
a} :: LambdaFunctionRecommendation) ((Maybe [LambdaFunctionMemoryRecommendationOption]
-> f (Maybe [LambdaFunctionMemoryRecommendationOption]))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation)
-> ((Maybe [LambdaFunctionMemoryRecommendationOption]
-> f (Maybe [LambdaFunctionMemoryRecommendationOption]))
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> f (Maybe [LambdaFunctionMemoryRecommendationOption]))
-> (Maybe [LambdaFunctionMemoryRecommendationOption]
-> f (Maybe [LambdaFunctionMemoryRecommendationOption]))
-> LambdaFunctionRecommendation
-> f LambdaFunctionRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[LambdaFunctionMemoryRecommendationOption]
[LambdaFunctionMemoryRecommendationOption]
[LambdaFunctionMemoryRecommendationOption]
[LambdaFunctionMemoryRecommendationOption]
-> Iso
(Maybe [LambdaFunctionMemoryRecommendationOption])
(Maybe [LambdaFunctionMemoryRecommendationOption])
(Maybe [LambdaFunctionMemoryRecommendationOption])
(Maybe [LambdaFunctionMemoryRecommendationOption])
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
[LambdaFunctionMemoryRecommendationOption]
[LambdaFunctionMemoryRecommendationOption]
[LambdaFunctionMemoryRecommendationOption]
[LambdaFunctionMemoryRecommendationOption]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
lambdaFunctionRecommendation_functionVersion :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Text)
lambdaFunctionRecommendation_functionVersion :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_functionVersion = (LambdaFunctionRecommendation -> Maybe Text)
-> (LambdaFunctionRecommendation
-> Maybe Text -> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe Text
functionVersion :: Maybe Text
$sel:functionVersion:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation -> Maybe Text
functionVersion} -> Maybe Text
functionVersion) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe Text
a -> LambdaFunctionRecommendation
s {$sel:functionVersion:LambdaFunctionRecommendation' :: Maybe Text
functionVersion = Maybe Text
a} :: LambdaFunctionRecommendation)
lambdaFunctionRecommendation_numberOfInvocations :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Integer)
lambdaFunctionRecommendation_numberOfInvocations :: (Maybe Integer -> f (Maybe Integer))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_numberOfInvocations = (LambdaFunctionRecommendation -> Maybe Integer)
-> (LambdaFunctionRecommendation
-> Maybe Integer -> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe Integer
numberOfInvocations :: Maybe Integer
$sel:numberOfInvocations:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation -> Maybe Integer
numberOfInvocations} -> Maybe Integer
numberOfInvocations) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe Integer
a -> LambdaFunctionRecommendation
s {$sel:numberOfInvocations:LambdaFunctionRecommendation' :: Maybe Integer
numberOfInvocations = Maybe Integer
a} :: LambdaFunctionRecommendation)
lambdaFunctionRecommendation_lookbackPeriodInDays :: Lens.Lens' LambdaFunctionRecommendation (Prelude.Maybe Prelude.Double)
lambdaFunctionRecommendation_lookbackPeriodInDays :: (Maybe Double -> f (Maybe Double))
-> LambdaFunctionRecommendation -> f LambdaFunctionRecommendation
lambdaFunctionRecommendation_lookbackPeriodInDays = (LambdaFunctionRecommendation -> Maybe Double)
-> (LambdaFunctionRecommendation
-> Maybe Double -> LambdaFunctionRecommendation)
-> Lens
LambdaFunctionRecommendation
LambdaFunctionRecommendation
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionRecommendation' {Maybe Double
lookbackPeriodInDays :: Maybe Double
$sel:lookbackPeriodInDays:LambdaFunctionRecommendation' :: LambdaFunctionRecommendation -> Maybe Double
lookbackPeriodInDays} -> Maybe Double
lookbackPeriodInDays) (\s :: LambdaFunctionRecommendation
s@LambdaFunctionRecommendation' {} Maybe Double
a -> LambdaFunctionRecommendation
s {$sel:lookbackPeriodInDays:LambdaFunctionRecommendation' :: Maybe Double
lookbackPeriodInDays = Maybe Double
a} :: LambdaFunctionRecommendation)
instance Core.FromJSON LambdaFunctionRecommendation where
parseJSON :: Value -> Parser LambdaFunctionRecommendation
parseJSON =
String
-> (Object -> Parser LambdaFunctionRecommendation)
-> Value
-> Parser LambdaFunctionRecommendation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LambdaFunctionRecommendation"
( \Object
x ->
Maybe Text
-> Maybe LambdaFunctionRecommendationFinding
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation
LambdaFunctionRecommendation'
(Maybe Text
-> Maybe LambdaFunctionRecommendationFinding
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
-> Parser (Maybe Text)
-> Parser
(Maybe LambdaFunctionRecommendationFinding
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"functionArn")
Parser
(Maybe LambdaFunctionRecommendationFinding
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
-> Parser (Maybe LambdaFunctionRecommendationFinding)
-> Parser
(Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe LambdaFunctionRecommendationFinding)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"finding")
Parser
(Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
-> Parser (Maybe Int)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"currentMemorySize")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastRefreshTimestamp")
Parser
(Maybe Text
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
-> Parser (Maybe Text)
-> Parser
(Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"accountId")
Parser
(Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
-> Parser (Maybe [LambdaFunctionRecommendationFindingReasonCode])
-> Parser
(Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser
(Maybe (Maybe [LambdaFunctionRecommendationFindingReasonCode]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"findingReasonCodes"
Parser
(Maybe (Maybe [LambdaFunctionRecommendationFindingReasonCode]))
-> Maybe [LambdaFunctionRecommendationFindingReasonCode]
-> Parser (Maybe [LambdaFunctionRecommendationFindingReasonCode])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LambdaFunctionRecommendationFindingReasonCode]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [LambdaFunctionUtilizationMetric]
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
-> Parser (Maybe [LambdaFunctionUtilizationMetric])
-> Parser
(Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [LambdaFunctionUtilizationMetric]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"utilizationMetrics"
Parser (Maybe (Maybe [LambdaFunctionUtilizationMetric]))
-> Maybe [LambdaFunctionUtilizationMetric]
-> Parser (Maybe [LambdaFunctionUtilizationMetric])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LambdaFunctionUtilizationMetric]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [LambdaFunctionMemoryRecommendationOption]
-> Maybe Text
-> Maybe Integer
-> Maybe Double
-> LambdaFunctionRecommendation)
-> Parser (Maybe [LambdaFunctionMemoryRecommendationOption])
-> Parser
(Maybe Text
-> Maybe Integer -> Maybe Double -> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser
(Maybe (Maybe [LambdaFunctionMemoryRecommendationOption]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"memorySizeRecommendationOptions"
Parser (Maybe (Maybe [LambdaFunctionMemoryRecommendationOption]))
-> Maybe [LambdaFunctionMemoryRecommendationOption]
-> Parser (Maybe [LambdaFunctionMemoryRecommendationOption])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LambdaFunctionMemoryRecommendationOption]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Integer -> Maybe Double -> LambdaFunctionRecommendation)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer -> Maybe Double -> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"functionVersion")
Parser
(Maybe Integer -> Maybe Double -> LambdaFunctionRecommendation)
-> Parser (Maybe Integer)
-> Parser (Maybe Double -> LambdaFunctionRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"numberOfInvocations")
Parser (Maybe Double -> LambdaFunctionRecommendation)
-> Parser (Maybe Double) -> Parser LambdaFunctionRecommendation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lookbackPeriodInDays")
)
instance
Prelude.Hashable
LambdaFunctionRecommendation
instance Prelude.NFData LambdaFunctionRecommendation