{-# 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.AutoScalingGroupRecommendation where
import Amazonka.ComputeOptimizer.Types.AutoScalingGroupConfiguration
import Amazonka.ComputeOptimizer.Types.AutoScalingGroupRecommendationOption
import Amazonka.ComputeOptimizer.Types.Finding
import Amazonka.ComputeOptimizer.Types.UtilizationMetric
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutoScalingGroupRecommendation = AutoScalingGroupRecommendation'
{
AutoScalingGroupRecommendation -> Maybe Finding
finding :: Prelude.Maybe Finding,
AutoScalingGroupRecommendation -> Maybe POSIX
lastRefreshTimestamp :: Prelude.Maybe Core.POSIX,
AutoScalingGroupRecommendation
-> Maybe AutoScalingGroupConfiguration
currentConfiguration :: Prelude.Maybe AutoScalingGroupConfiguration,
AutoScalingGroupRecommendation -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
AutoScalingGroupRecommendation -> Maybe Text
autoScalingGroupName :: Prelude.Maybe Prelude.Text,
AutoScalingGroupRecommendation -> Maybe [UtilizationMetric]
utilizationMetrics :: Prelude.Maybe [UtilizationMetric],
AutoScalingGroupRecommendation -> Maybe Text
autoScalingGroupArn :: Prelude.Maybe Prelude.Text,
AutoScalingGroupRecommendation
-> Maybe [AutoScalingGroupRecommendationOption]
recommendationOptions :: Prelude.Maybe [AutoScalingGroupRecommendationOption],
AutoScalingGroupRecommendation -> Maybe Double
lookBackPeriodInDays :: Prelude.Maybe Prelude.Double
}
deriving (AutoScalingGroupRecommendation
-> AutoScalingGroupRecommendation -> Bool
(AutoScalingGroupRecommendation
-> AutoScalingGroupRecommendation -> Bool)
-> (AutoScalingGroupRecommendation
-> AutoScalingGroupRecommendation -> Bool)
-> Eq AutoScalingGroupRecommendation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoScalingGroupRecommendation
-> AutoScalingGroupRecommendation -> Bool
$c/= :: AutoScalingGroupRecommendation
-> AutoScalingGroupRecommendation -> Bool
== :: AutoScalingGroupRecommendation
-> AutoScalingGroupRecommendation -> Bool
$c== :: AutoScalingGroupRecommendation
-> AutoScalingGroupRecommendation -> Bool
Prelude.Eq, ReadPrec [AutoScalingGroupRecommendation]
ReadPrec AutoScalingGroupRecommendation
Int -> ReadS AutoScalingGroupRecommendation
ReadS [AutoScalingGroupRecommendation]
(Int -> ReadS AutoScalingGroupRecommendation)
-> ReadS [AutoScalingGroupRecommendation]
-> ReadPrec AutoScalingGroupRecommendation
-> ReadPrec [AutoScalingGroupRecommendation]
-> Read AutoScalingGroupRecommendation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoScalingGroupRecommendation]
$creadListPrec :: ReadPrec [AutoScalingGroupRecommendation]
readPrec :: ReadPrec AutoScalingGroupRecommendation
$creadPrec :: ReadPrec AutoScalingGroupRecommendation
readList :: ReadS [AutoScalingGroupRecommendation]
$creadList :: ReadS [AutoScalingGroupRecommendation]
readsPrec :: Int -> ReadS AutoScalingGroupRecommendation
$creadsPrec :: Int -> ReadS AutoScalingGroupRecommendation
Prelude.Read, Int -> AutoScalingGroupRecommendation -> ShowS
[AutoScalingGroupRecommendation] -> ShowS
AutoScalingGroupRecommendation -> String
(Int -> AutoScalingGroupRecommendation -> ShowS)
-> (AutoScalingGroupRecommendation -> String)
-> ([AutoScalingGroupRecommendation] -> ShowS)
-> Show AutoScalingGroupRecommendation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoScalingGroupRecommendation] -> ShowS
$cshowList :: [AutoScalingGroupRecommendation] -> ShowS
show :: AutoScalingGroupRecommendation -> String
$cshow :: AutoScalingGroupRecommendation -> String
showsPrec :: Int -> AutoScalingGroupRecommendation -> ShowS
$cshowsPrec :: Int -> AutoScalingGroupRecommendation -> ShowS
Prelude.Show, (forall x.
AutoScalingGroupRecommendation
-> Rep AutoScalingGroupRecommendation x)
-> (forall x.
Rep AutoScalingGroupRecommendation x
-> AutoScalingGroupRecommendation)
-> Generic AutoScalingGroupRecommendation
forall x.
Rep AutoScalingGroupRecommendation x
-> AutoScalingGroupRecommendation
forall x.
AutoScalingGroupRecommendation
-> Rep AutoScalingGroupRecommendation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AutoScalingGroupRecommendation x
-> AutoScalingGroupRecommendation
$cfrom :: forall x.
AutoScalingGroupRecommendation
-> Rep AutoScalingGroupRecommendation x
Prelude.Generic)
newAutoScalingGroupRecommendation ::
AutoScalingGroupRecommendation
newAutoScalingGroupRecommendation :: AutoScalingGroupRecommendation
newAutoScalingGroupRecommendation =
AutoScalingGroupRecommendation' :: Maybe Finding
-> Maybe POSIX
-> Maybe AutoScalingGroupConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation
AutoScalingGroupRecommendation'
{ $sel:finding:AutoScalingGroupRecommendation' :: Maybe Finding
finding =
Maybe Finding
forall a. Maybe a
Prelude.Nothing,
$sel:lastRefreshTimestamp:AutoScalingGroupRecommendation' :: Maybe POSIX
lastRefreshTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:currentConfiguration:AutoScalingGroupRecommendation' :: Maybe AutoScalingGroupConfiguration
currentConfiguration = Maybe AutoScalingGroupConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:AutoScalingGroupRecommendation' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:autoScalingGroupName:AutoScalingGroupRecommendation' :: Maybe Text
autoScalingGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:utilizationMetrics:AutoScalingGroupRecommendation' :: Maybe [UtilizationMetric]
utilizationMetrics = Maybe [UtilizationMetric]
forall a. Maybe a
Prelude.Nothing,
$sel:autoScalingGroupArn:AutoScalingGroupRecommendation' :: Maybe Text
autoScalingGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recommendationOptions:AutoScalingGroupRecommendation' :: Maybe [AutoScalingGroupRecommendationOption]
recommendationOptions = Maybe [AutoScalingGroupRecommendationOption]
forall a. Maybe a
Prelude.Nothing,
$sel:lookBackPeriodInDays:AutoScalingGroupRecommendation' :: Maybe Double
lookBackPeriodInDays = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
autoScalingGroupRecommendation_finding :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Finding)
autoScalingGroupRecommendation_finding :: (Maybe Finding -> f (Maybe Finding))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_finding = (AutoScalingGroupRecommendation -> Maybe Finding)
-> (AutoScalingGroupRecommendation
-> Maybe Finding -> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe Finding)
(Maybe Finding)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe Finding
finding :: Maybe Finding
$sel:finding:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation -> Maybe Finding
finding} -> Maybe Finding
finding) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe Finding
a -> AutoScalingGroupRecommendation
s {$sel:finding:AutoScalingGroupRecommendation' :: Maybe Finding
finding = Maybe Finding
a} :: AutoScalingGroupRecommendation)
autoScalingGroupRecommendation_lastRefreshTimestamp :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.UTCTime)
autoScalingGroupRecommendation_lastRefreshTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_lastRefreshTimestamp = (AutoScalingGroupRecommendation -> Maybe POSIX)
-> (AutoScalingGroupRecommendation
-> Maybe POSIX -> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe POSIX
lastRefreshTimestamp :: Maybe POSIX
$sel:lastRefreshTimestamp:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation -> Maybe POSIX
lastRefreshTimestamp} -> Maybe POSIX
lastRefreshTimestamp) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe POSIX
a -> AutoScalingGroupRecommendation
s {$sel:lastRefreshTimestamp:AutoScalingGroupRecommendation' :: Maybe POSIX
lastRefreshTimestamp = Maybe POSIX
a} :: AutoScalingGroupRecommendation) ((Maybe POSIX -> f (Maybe POSIX))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
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
autoScalingGroupRecommendation_currentConfiguration :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe AutoScalingGroupConfiguration)
autoScalingGroupRecommendation_currentConfiguration :: (Maybe AutoScalingGroupConfiguration
-> f (Maybe AutoScalingGroupConfiguration))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_currentConfiguration = (AutoScalingGroupRecommendation
-> Maybe AutoScalingGroupConfiguration)
-> (AutoScalingGroupRecommendation
-> Maybe AutoScalingGroupConfiguration
-> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe AutoScalingGroupConfiguration)
(Maybe AutoScalingGroupConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe AutoScalingGroupConfiguration
currentConfiguration :: Maybe AutoScalingGroupConfiguration
$sel:currentConfiguration:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation
-> Maybe AutoScalingGroupConfiguration
currentConfiguration} -> Maybe AutoScalingGroupConfiguration
currentConfiguration) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe AutoScalingGroupConfiguration
a -> AutoScalingGroupRecommendation
s {$sel:currentConfiguration:AutoScalingGroupRecommendation' :: Maybe AutoScalingGroupConfiguration
currentConfiguration = Maybe AutoScalingGroupConfiguration
a} :: AutoScalingGroupRecommendation)
autoScalingGroupRecommendation_accountId :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.Text)
autoScalingGroupRecommendation_accountId :: (Maybe Text -> f (Maybe Text))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_accountId = (AutoScalingGroupRecommendation -> Maybe Text)
-> (AutoScalingGroupRecommendation
-> Maybe Text -> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe Text
a -> AutoScalingGroupRecommendation
s {$sel:accountId:AutoScalingGroupRecommendation' :: Maybe Text
accountId = Maybe Text
a} :: AutoScalingGroupRecommendation)
autoScalingGroupRecommendation_autoScalingGroupName :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.Text)
autoScalingGroupRecommendation_autoScalingGroupName :: (Maybe Text -> f (Maybe Text))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_autoScalingGroupName = (AutoScalingGroupRecommendation -> Maybe Text)
-> (AutoScalingGroupRecommendation
-> Maybe Text -> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe Text
autoScalingGroupName :: Maybe Text
$sel:autoScalingGroupName:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation -> Maybe Text
autoScalingGroupName} -> Maybe Text
autoScalingGroupName) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe Text
a -> AutoScalingGroupRecommendation
s {$sel:autoScalingGroupName:AutoScalingGroupRecommendation' :: Maybe Text
autoScalingGroupName = Maybe Text
a} :: AutoScalingGroupRecommendation)
autoScalingGroupRecommendation_utilizationMetrics :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe [UtilizationMetric])
autoScalingGroupRecommendation_utilizationMetrics :: (Maybe [UtilizationMetric] -> f (Maybe [UtilizationMetric]))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_utilizationMetrics = (AutoScalingGroupRecommendation -> Maybe [UtilizationMetric])
-> (AutoScalingGroupRecommendation
-> Maybe [UtilizationMetric] -> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe [UtilizationMetric])
(Maybe [UtilizationMetric])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe [UtilizationMetric]
utilizationMetrics :: Maybe [UtilizationMetric]
$sel:utilizationMetrics:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation -> Maybe [UtilizationMetric]
utilizationMetrics} -> Maybe [UtilizationMetric]
utilizationMetrics) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe [UtilizationMetric]
a -> AutoScalingGroupRecommendation
s {$sel:utilizationMetrics:AutoScalingGroupRecommendation' :: Maybe [UtilizationMetric]
utilizationMetrics = Maybe [UtilizationMetric]
a} :: AutoScalingGroupRecommendation) ((Maybe [UtilizationMetric] -> f (Maybe [UtilizationMetric]))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation)
-> ((Maybe [UtilizationMetric] -> f (Maybe [UtilizationMetric]))
-> Maybe [UtilizationMetric] -> f (Maybe [UtilizationMetric]))
-> (Maybe [UtilizationMetric] -> f (Maybe [UtilizationMetric]))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[UtilizationMetric]
[UtilizationMetric]
[UtilizationMetric]
[UtilizationMetric]
-> Iso
(Maybe [UtilizationMetric])
(Maybe [UtilizationMetric])
(Maybe [UtilizationMetric])
(Maybe [UtilizationMetric])
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
[UtilizationMetric]
[UtilizationMetric]
[UtilizationMetric]
[UtilizationMetric]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
autoScalingGroupRecommendation_autoScalingGroupArn :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.Text)
autoScalingGroupRecommendation_autoScalingGroupArn :: (Maybe Text -> f (Maybe Text))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_autoScalingGroupArn = (AutoScalingGroupRecommendation -> Maybe Text)
-> (AutoScalingGroupRecommendation
-> Maybe Text -> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe Text
autoScalingGroupArn :: Maybe Text
$sel:autoScalingGroupArn:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation -> Maybe Text
autoScalingGroupArn} -> Maybe Text
autoScalingGroupArn) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe Text
a -> AutoScalingGroupRecommendation
s {$sel:autoScalingGroupArn:AutoScalingGroupRecommendation' :: Maybe Text
autoScalingGroupArn = Maybe Text
a} :: AutoScalingGroupRecommendation)
autoScalingGroupRecommendation_recommendationOptions :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe [AutoScalingGroupRecommendationOption])
autoScalingGroupRecommendation_recommendationOptions :: (Maybe [AutoScalingGroupRecommendationOption]
-> f (Maybe [AutoScalingGroupRecommendationOption]))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_recommendationOptions = (AutoScalingGroupRecommendation
-> Maybe [AutoScalingGroupRecommendationOption])
-> (AutoScalingGroupRecommendation
-> Maybe [AutoScalingGroupRecommendationOption]
-> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe [AutoScalingGroupRecommendationOption])
(Maybe [AutoScalingGroupRecommendationOption])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe [AutoScalingGroupRecommendationOption]
recommendationOptions :: Maybe [AutoScalingGroupRecommendationOption]
$sel:recommendationOptions:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation
-> Maybe [AutoScalingGroupRecommendationOption]
recommendationOptions} -> Maybe [AutoScalingGroupRecommendationOption]
recommendationOptions) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe [AutoScalingGroupRecommendationOption]
a -> AutoScalingGroupRecommendation
s {$sel:recommendationOptions:AutoScalingGroupRecommendation' :: Maybe [AutoScalingGroupRecommendationOption]
recommendationOptions = Maybe [AutoScalingGroupRecommendationOption]
a} :: AutoScalingGroupRecommendation) ((Maybe [AutoScalingGroupRecommendationOption]
-> f (Maybe [AutoScalingGroupRecommendationOption]))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation)
-> ((Maybe [AutoScalingGroupRecommendationOption]
-> f (Maybe [AutoScalingGroupRecommendationOption]))
-> Maybe [AutoScalingGroupRecommendationOption]
-> f (Maybe [AutoScalingGroupRecommendationOption]))
-> (Maybe [AutoScalingGroupRecommendationOption]
-> f (Maybe [AutoScalingGroupRecommendationOption]))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AutoScalingGroupRecommendationOption]
[AutoScalingGroupRecommendationOption]
[AutoScalingGroupRecommendationOption]
[AutoScalingGroupRecommendationOption]
-> Iso
(Maybe [AutoScalingGroupRecommendationOption])
(Maybe [AutoScalingGroupRecommendationOption])
(Maybe [AutoScalingGroupRecommendationOption])
(Maybe [AutoScalingGroupRecommendationOption])
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
[AutoScalingGroupRecommendationOption]
[AutoScalingGroupRecommendationOption]
[AutoScalingGroupRecommendationOption]
[AutoScalingGroupRecommendationOption]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
autoScalingGroupRecommendation_lookBackPeriodInDays :: Lens.Lens' AutoScalingGroupRecommendation (Prelude.Maybe Prelude.Double)
autoScalingGroupRecommendation_lookBackPeriodInDays :: (Maybe Double -> f (Maybe Double))
-> AutoScalingGroupRecommendation
-> f AutoScalingGroupRecommendation
autoScalingGroupRecommendation_lookBackPeriodInDays = (AutoScalingGroupRecommendation -> Maybe Double)
-> (AutoScalingGroupRecommendation
-> Maybe Double -> AutoScalingGroupRecommendation)
-> Lens
AutoScalingGroupRecommendation
AutoScalingGroupRecommendation
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoScalingGroupRecommendation' {Maybe Double
lookBackPeriodInDays :: Maybe Double
$sel:lookBackPeriodInDays:AutoScalingGroupRecommendation' :: AutoScalingGroupRecommendation -> Maybe Double
lookBackPeriodInDays} -> Maybe Double
lookBackPeriodInDays) (\s :: AutoScalingGroupRecommendation
s@AutoScalingGroupRecommendation' {} Maybe Double
a -> AutoScalingGroupRecommendation
s {$sel:lookBackPeriodInDays:AutoScalingGroupRecommendation' :: Maybe Double
lookBackPeriodInDays = Maybe Double
a} :: AutoScalingGroupRecommendation)
instance Core.FromJSON AutoScalingGroupRecommendation where
parseJSON :: Value -> Parser AutoScalingGroupRecommendation
parseJSON =
String
-> (Object -> Parser AutoScalingGroupRecommendation)
-> Value
-> Parser AutoScalingGroupRecommendation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AutoScalingGroupRecommendation"
( \Object
x ->
Maybe Finding
-> Maybe POSIX
-> Maybe AutoScalingGroupConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation
AutoScalingGroupRecommendation'
(Maybe Finding
-> Maybe POSIX
-> Maybe AutoScalingGroupConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
-> Parser (Maybe Finding)
-> Parser
(Maybe POSIX
-> Maybe AutoScalingGroupConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Finding)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"finding")
Parser
(Maybe POSIX
-> Maybe AutoScalingGroupConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
-> Parser (Maybe POSIX)
-> Parser
(Maybe AutoScalingGroupConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
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 AutoScalingGroupConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
-> Parser (Maybe AutoScalingGroupConfiguration)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AutoScalingGroupConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"currentConfiguration")
Parser
(Maybe Text
-> Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
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 Text
-> Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
-> Parser (Maybe Text)
-> Parser
(Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
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
"autoScalingGroupName")
Parser
(Maybe [UtilizationMetric]
-> Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
-> Parser (Maybe [UtilizationMetric])
-> Parser
(Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [UtilizationMetric]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"utilizationMetrics"
Parser (Maybe (Maybe [UtilizationMetric]))
-> Maybe [UtilizationMetric] -> Parser (Maybe [UtilizationMetric])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [UtilizationMetric]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double
-> AutoScalingGroupRecommendation)
-> Parser (Maybe Text)
-> Parser
(Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double -> AutoScalingGroupRecommendation)
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
"autoScalingGroupArn")
Parser
(Maybe [AutoScalingGroupRecommendationOption]
-> Maybe Double -> AutoScalingGroupRecommendation)
-> Parser (Maybe [AutoScalingGroupRecommendationOption])
-> Parser (Maybe Double -> AutoScalingGroupRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [AutoScalingGroupRecommendationOption]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"recommendationOptions"
Parser (Maybe (Maybe [AutoScalingGroupRecommendationOption]))
-> Maybe [AutoScalingGroupRecommendationOption]
-> Parser (Maybe [AutoScalingGroupRecommendationOption])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AutoScalingGroupRecommendationOption]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Double -> AutoScalingGroupRecommendation)
-> Parser (Maybe Double) -> Parser AutoScalingGroupRecommendation
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
AutoScalingGroupRecommendation
instance
Prelude.NFData
AutoScalingGroupRecommendation