{-# 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.LambdaFunctionMemoryProjectedMetric where
import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryMetricName
import Amazonka.ComputeOptimizer.Types.LambdaFunctionMemoryMetricStatistic
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LambdaFunctionMemoryProjectedMetric = LambdaFunctionMemoryProjectedMetric'
{
LambdaFunctionMemoryProjectedMetric -> Maybe Double
value :: Prelude.Maybe Prelude.Double,
LambdaFunctionMemoryProjectedMetric
-> Maybe LambdaFunctionMemoryMetricName
name :: Prelude.Maybe LambdaFunctionMemoryMetricName,
LambdaFunctionMemoryProjectedMetric
-> Maybe LambdaFunctionMemoryMetricStatistic
statistic :: Prelude.Maybe LambdaFunctionMemoryMetricStatistic
}
deriving (LambdaFunctionMemoryProjectedMetric
-> LambdaFunctionMemoryProjectedMetric -> Bool
(LambdaFunctionMemoryProjectedMetric
-> LambdaFunctionMemoryProjectedMetric -> Bool)
-> (LambdaFunctionMemoryProjectedMetric
-> LambdaFunctionMemoryProjectedMetric -> Bool)
-> Eq LambdaFunctionMemoryProjectedMetric
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaFunctionMemoryProjectedMetric
-> LambdaFunctionMemoryProjectedMetric -> Bool
$c/= :: LambdaFunctionMemoryProjectedMetric
-> LambdaFunctionMemoryProjectedMetric -> Bool
== :: LambdaFunctionMemoryProjectedMetric
-> LambdaFunctionMemoryProjectedMetric -> Bool
$c== :: LambdaFunctionMemoryProjectedMetric
-> LambdaFunctionMemoryProjectedMetric -> Bool
Prelude.Eq, ReadPrec [LambdaFunctionMemoryProjectedMetric]
ReadPrec LambdaFunctionMemoryProjectedMetric
Int -> ReadS LambdaFunctionMemoryProjectedMetric
ReadS [LambdaFunctionMemoryProjectedMetric]
(Int -> ReadS LambdaFunctionMemoryProjectedMetric)
-> ReadS [LambdaFunctionMemoryProjectedMetric]
-> ReadPrec LambdaFunctionMemoryProjectedMetric
-> ReadPrec [LambdaFunctionMemoryProjectedMetric]
-> Read LambdaFunctionMemoryProjectedMetric
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaFunctionMemoryProjectedMetric]
$creadListPrec :: ReadPrec [LambdaFunctionMemoryProjectedMetric]
readPrec :: ReadPrec LambdaFunctionMemoryProjectedMetric
$creadPrec :: ReadPrec LambdaFunctionMemoryProjectedMetric
readList :: ReadS [LambdaFunctionMemoryProjectedMetric]
$creadList :: ReadS [LambdaFunctionMemoryProjectedMetric]
readsPrec :: Int -> ReadS LambdaFunctionMemoryProjectedMetric
$creadsPrec :: Int -> ReadS LambdaFunctionMemoryProjectedMetric
Prelude.Read, Int -> LambdaFunctionMemoryProjectedMetric -> ShowS
[LambdaFunctionMemoryProjectedMetric] -> ShowS
LambdaFunctionMemoryProjectedMetric -> String
(Int -> LambdaFunctionMemoryProjectedMetric -> ShowS)
-> (LambdaFunctionMemoryProjectedMetric -> String)
-> ([LambdaFunctionMemoryProjectedMetric] -> ShowS)
-> Show LambdaFunctionMemoryProjectedMetric
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaFunctionMemoryProjectedMetric] -> ShowS
$cshowList :: [LambdaFunctionMemoryProjectedMetric] -> ShowS
show :: LambdaFunctionMemoryProjectedMetric -> String
$cshow :: LambdaFunctionMemoryProjectedMetric -> String
showsPrec :: Int -> LambdaFunctionMemoryProjectedMetric -> ShowS
$cshowsPrec :: Int -> LambdaFunctionMemoryProjectedMetric -> ShowS
Prelude.Show, (forall x.
LambdaFunctionMemoryProjectedMetric
-> Rep LambdaFunctionMemoryProjectedMetric x)
-> (forall x.
Rep LambdaFunctionMemoryProjectedMetric x
-> LambdaFunctionMemoryProjectedMetric)
-> Generic LambdaFunctionMemoryProjectedMetric
forall x.
Rep LambdaFunctionMemoryProjectedMetric x
-> LambdaFunctionMemoryProjectedMetric
forall x.
LambdaFunctionMemoryProjectedMetric
-> Rep LambdaFunctionMemoryProjectedMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LambdaFunctionMemoryProjectedMetric x
-> LambdaFunctionMemoryProjectedMetric
$cfrom :: forall x.
LambdaFunctionMemoryProjectedMetric
-> Rep LambdaFunctionMemoryProjectedMetric x
Prelude.Generic)
newLambdaFunctionMemoryProjectedMetric ::
LambdaFunctionMemoryProjectedMetric
newLambdaFunctionMemoryProjectedMetric :: LambdaFunctionMemoryProjectedMetric
newLambdaFunctionMemoryProjectedMetric =
LambdaFunctionMemoryProjectedMetric' :: Maybe Double
-> Maybe LambdaFunctionMemoryMetricName
-> Maybe LambdaFunctionMemoryMetricStatistic
-> LambdaFunctionMemoryProjectedMetric
LambdaFunctionMemoryProjectedMetric'
{ $sel:value:LambdaFunctionMemoryProjectedMetric' :: Maybe Double
value =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:name:LambdaFunctionMemoryProjectedMetric' :: Maybe LambdaFunctionMemoryMetricName
name = Maybe LambdaFunctionMemoryMetricName
forall a. Maybe a
Prelude.Nothing,
$sel:statistic:LambdaFunctionMemoryProjectedMetric' :: Maybe LambdaFunctionMemoryMetricStatistic
statistic = Maybe LambdaFunctionMemoryMetricStatistic
forall a. Maybe a
Prelude.Nothing
}
lambdaFunctionMemoryProjectedMetric_value :: Lens.Lens' LambdaFunctionMemoryProjectedMetric (Prelude.Maybe Prelude.Double)
lambdaFunctionMemoryProjectedMetric_value :: (Maybe Double -> f (Maybe Double))
-> LambdaFunctionMemoryProjectedMetric
-> f LambdaFunctionMemoryProjectedMetric
lambdaFunctionMemoryProjectedMetric_value = (LambdaFunctionMemoryProjectedMetric -> Maybe Double)
-> (LambdaFunctionMemoryProjectedMetric
-> Maybe Double -> LambdaFunctionMemoryProjectedMetric)
-> Lens
LambdaFunctionMemoryProjectedMetric
LambdaFunctionMemoryProjectedMetric
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionMemoryProjectedMetric' {Maybe Double
value :: Maybe Double
$sel:value:LambdaFunctionMemoryProjectedMetric' :: LambdaFunctionMemoryProjectedMetric -> Maybe Double
value} -> Maybe Double
value) (\s :: LambdaFunctionMemoryProjectedMetric
s@LambdaFunctionMemoryProjectedMetric' {} Maybe Double
a -> LambdaFunctionMemoryProjectedMetric
s {$sel:value:LambdaFunctionMemoryProjectedMetric' :: Maybe Double
value = Maybe Double
a} :: LambdaFunctionMemoryProjectedMetric)
lambdaFunctionMemoryProjectedMetric_name :: Lens.Lens' LambdaFunctionMemoryProjectedMetric (Prelude.Maybe LambdaFunctionMemoryMetricName)
lambdaFunctionMemoryProjectedMetric_name :: (Maybe LambdaFunctionMemoryMetricName
-> f (Maybe LambdaFunctionMemoryMetricName))
-> LambdaFunctionMemoryProjectedMetric
-> f LambdaFunctionMemoryProjectedMetric
lambdaFunctionMemoryProjectedMetric_name = (LambdaFunctionMemoryProjectedMetric
-> Maybe LambdaFunctionMemoryMetricName)
-> (LambdaFunctionMemoryProjectedMetric
-> Maybe LambdaFunctionMemoryMetricName
-> LambdaFunctionMemoryProjectedMetric)
-> Lens
LambdaFunctionMemoryProjectedMetric
LambdaFunctionMemoryProjectedMetric
(Maybe LambdaFunctionMemoryMetricName)
(Maybe LambdaFunctionMemoryMetricName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionMemoryProjectedMetric' {Maybe LambdaFunctionMemoryMetricName
name :: Maybe LambdaFunctionMemoryMetricName
$sel:name:LambdaFunctionMemoryProjectedMetric' :: LambdaFunctionMemoryProjectedMetric
-> Maybe LambdaFunctionMemoryMetricName
name} -> Maybe LambdaFunctionMemoryMetricName
name) (\s :: LambdaFunctionMemoryProjectedMetric
s@LambdaFunctionMemoryProjectedMetric' {} Maybe LambdaFunctionMemoryMetricName
a -> LambdaFunctionMemoryProjectedMetric
s {$sel:name:LambdaFunctionMemoryProjectedMetric' :: Maybe LambdaFunctionMemoryMetricName
name = Maybe LambdaFunctionMemoryMetricName
a} :: LambdaFunctionMemoryProjectedMetric)
lambdaFunctionMemoryProjectedMetric_statistic :: Lens.Lens' LambdaFunctionMemoryProjectedMetric (Prelude.Maybe LambdaFunctionMemoryMetricStatistic)
lambdaFunctionMemoryProjectedMetric_statistic :: (Maybe LambdaFunctionMemoryMetricStatistic
-> f (Maybe LambdaFunctionMemoryMetricStatistic))
-> LambdaFunctionMemoryProjectedMetric
-> f LambdaFunctionMemoryProjectedMetric
lambdaFunctionMemoryProjectedMetric_statistic = (LambdaFunctionMemoryProjectedMetric
-> Maybe LambdaFunctionMemoryMetricStatistic)
-> (LambdaFunctionMemoryProjectedMetric
-> Maybe LambdaFunctionMemoryMetricStatistic
-> LambdaFunctionMemoryProjectedMetric)
-> Lens
LambdaFunctionMemoryProjectedMetric
LambdaFunctionMemoryProjectedMetric
(Maybe LambdaFunctionMemoryMetricStatistic)
(Maybe LambdaFunctionMemoryMetricStatistic)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionMemoryProjectedMetric' {Maybe LambdaFunctionMemoryMetricStatistic
statistic :: Maybe LambdaFunctionMemoryMetricStatistic
$sel:statistic:LambdaFunctionMemoryProjectedMetric' :: LambdaFunctionMemoryProjectedMetric
-> Maybe LambdaFunctionMemoryMetricStatistic
statistic} -> Maybe LambdaFunctionMemoryMetricStatistic
statistic) (\s :: LambdaFunctionMemoryProjectedMetric
s@LambdaFunctionMemoryProjectedMetric' {} Maybe LambdaFunctionMemoryMetricStatistic
a -> LambdaFunctionMemoryProjectedMetric
s {$sel:statistic:LambdaFunctionMemoryProjectedMetric' :: Maybe LambdaFunctionMemoryMetricStatistic
statistic = Maybe LambdaFunctionMemoryMetricStatistic
a} :: LambdaFunctionMemoryProjectedMetric)
instance
Core.FromJSON
LambdaFunctionMemoryProjectedMetric
where
parseJSON :: Value -> Parser LambdaFunctionMemoryProjectedMetric
parseJSON =
String
-> (Object -> Parser LambdaFunctionMemoryProjectedMetric)
-> Value
-> Parser LambdaFunctionMemoryProjectedMetric
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LambdaFunctionMemoryProjectedMetric"
( \Object
x ->
Maybe Double
-> Maybe LambdaFunctionMemoryMetricName
-> Maybe LambdaFunctionMemoryMetricStatistic
-> LambdaFunctionMemoryProjectedMetric
LambdaFunctionMemoryProjectedMetric'
(Maybe Double
-> Maybe LambdaFunctionMemoryMetricName
-> Maybe LambdaFunctionMemoryMetricStatistic
-> LambdaFunctionMemoryProjectedMetric)
-> Parser (Maybe Double)
-> Parser
(Maybe LambdaFunctionMemoryMetricName
-> Maybe LambdaFunctionMemoryMetricStatistic
-> LambdaFunctionMemoryProjectedMetric)
forall (f :: * -> *) a b. Functor 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
"value")
Parser
(Maybe LambdaFunctionMemoryMetricName
-> Maybe LambdaFunctionMemoryMetricStatistic
-> LambdaFunctionMemoryProjectedMetric)
-> Parser (Maybe LambdaFunctionMemoryMetricName)
-> Parser
(Maybe LambdaFunctionMemoryMetricStatistic
-> LambdaFunctionMemoryProjectedMetric)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LambdaFunctionMemoryMetricName)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
Parser
(Maybe LambdaFunctionMemoryMetricStatistic
-> LambdaFunctionMemoryProjectedMetric)
-> Parser (Maybe LambdaFunctionMemoryMetricStatistic)
-> Parser LambdaFunctionMemoryProjectedMetric
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe LambdaFunctionMemoryMetricStatistic)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statistic")
)
instance
Prelude.Hashable
LambdaFunctionMemoryProjectedMetric
instance
Prelude.NFData
LambdaFunctionMemoryProjectedMetric