{-# 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.VolumeRecommendation where
import Amazonka.ComputeOptimizer.Types.EBSFinding
import Amazonka.ComputeOptimizer.Types.EBSUtilizationMetric
import Amazonka.ComputeOptimizer.Types.VolumeConfiguration
import Amazonka.ComputeOptimizer.Types.VolumeRecommendationOption
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VolumeRecommendation = VolumeRecommendation'
{
VolumeRecommendation -> Maybe EBSFinding
finding :: Prelude.Maybe EBSFinding,
VolumeRecommendation -> Maybe Text
volumeArn :: Prelude.Maybe Prelude.Text,
VolumeRecommendation -> Maybe POSIX
lastRefreshTimestamp :: Prelude.Maybe Core.POSIX,
VolumeRecommendation -> Maybe VolumeConfiguration
currentConfiguration :: Prelude.Maybe VolumeConfiguration,
VolumeRecommendation -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
VolumeRecommendation -> Maybe [EBSUtilizationMetric]
utilizationMetrics :: Prelude.Maybe [EBSUtilizationMetric],
VolumeRecommendation -> Maybe [VolumeRecommendationOption]
volumeRecommendationOptions :: Prelude.Maybe [VolumeRecommendationOption],
VolumeRecommendation -> Maybe Double
lookBackPeriodInDays :: Prelude.Maybe Prelude.Double
}
deriving (VolumeRecommendation -> VolumeRecommendation -> Bool
(VolumeRecommendation -> VolumeRecommendation -> Bool)
-> (VolumeRecommendation -> VolumeRecommendation -> Bool)
-> Eq VolumeRecommendation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeRecommendation -> VolumeRecommendation -> Bool
$c/= :: VolumeRecommendation -> VolumeRecommendation -> Bool
== :: VolumeRecommendation -> VolumeRecommendation -> Bool
$c== :: VolumeRecommendation -> VolumeRecommendation -> Bool
Prelude.Eq, ReadPrec [VolumeRecommendation]
ReadPrec VolumeRecommendation
Int -> ReadS VolumeRecommendation
ReadS [VolumeRecommendation]
(Int -> ReadS VolumeRecommendation)
-> ReadS [VolumeRecommendation]
-> ReadPrec VolumeRecommendation
-> ReadPrec [VolumeRecommendation]
-> Read VolumeRecommendation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VolumeRecommendation]
$creadListPrec :: ReadPrec [VolumeRecommendation]
readPrec :: ReadPrec VolumeRecommendation
$creadPrec :: ReadPrec VolumeRecommendation
readList :: ReadS [VolumeRecommendation]
$creadList :: ReadS [VolumeRecommendation]
readsPrec :: Int -> ReadS VolumeRecommendation
$creadsPrec :: Int -> ReadS VolumeRecommendation
Prelude.Read, Int -> VolumeRecommendation -> ShowS
[VolumeRecommendation] -> ShowS
VolumeRecommendation -> String
(Int -> VolumeRecommendation -> ShowS)
-> (VolumeRecommendation -> String)
-> ([VolumeRecommendation] -> ShowS)
-> Show VolumeRecommendation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VolumeRecommendation] -> ShowS
$cshowList :: [VolumeRecommendation] -> ShowS
show :: VolumeRecommendation -> String
$cshow :: VolumeRecommendation -> String
showsPrec :: Int -> VolumeRecommendation -> ShowS
$cshowsPrec :: Int -> VolumeRecommendation -> ShowS
Prelude.Show, (forall x. VolumeRecommendation -> Rep VolumeRecommendation x)
-> (forall x. Rep VolumeRecommendation x -> VolumeRecommendation)
-> Generic VolumeRecommendation
forall x. Rep VolumeRecommendation x -> VolumeRecommendation
forall x. VolumeRecommendation -> Rep VolumeRecommendation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VolumeRecommendation x -> VolumeRecommendation
$cfrom :: forall x. VolumeRecommendation -> Rep VolumeRecommendation x
Prelude.Generic)
newVolumeRecommendation ::
VolumeRecommendation
newVolumeRecommendation :: VolumeRecommendation
newVolumeRecommendation =
VolumeRecommendation' :: Maybe EBSFinding
-> Maybe Text
-> Maybe POSIX
-> Maybe VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation
VolumeRecommendation'
{ $sel:finding:VolumeRecommendation' :: Maybe EBSFinding
finding = Maybe EBSFinding
forall a. Maybe a
Prelude.Nothing,
$sel:volumeArn:VolumeRecommendation' :: Maybe Text
volumeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastRefreshTimestamp:VolumeRecommendation' :: Maybe POSIX
lastRefreshTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:currentConfiguration:VolumeRecommendation' :: Maybe VolumeConfiguration
currentConfiguration = Maybe VolumeConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:VolumeRecommendation' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:utilizationMetrics:VolumeRecommendation' :: Maybe [EBSUtilizationMetric]
utilizationMetrics = Maybe [EBSUtilizationMetric]
forall a. Maybe a
Prelude.Nothing,
$sel:volumeRecommendationOptions:VolumeRecommendation' :: Maybe [VolumeRecommendationOption]
volumeRecommendationOptions = Maybe [VolumeRecommendationOption]
forall a. Maybe a
Prelude.Nothing,
$sel:lookBackPeriodInDays:VolumeRecommendation' :: Maybe Double
lookBackPeriodInDays = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
volumeRecommendation_finding :: Lens.Lens' VolumeRecommendation (Prelude.Maybe EBSFinding)
volumeRecommendation_finding :: (Maybe EBSFinding -> f (Maybe EBSFinding))
-> VolumeRecommendation -> f VolumeRecommendation
volumeRecommendation_finding = (VolumeRecommendation -> Maybe EBSFinding)
-> (VolumeRecommendation
-> Maybe EBSFinding -> VolumeRecommendation)
-> Lens
VolumeRecommendation
VolumeRecommendation
(Maybe EBSFinding)
(Maybe EBSFinding)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecommendation' {Maybe EBSFinding
finding :: Maybe EBSFinding
$sel:finding:VolumeRecommendation' :: VolumeRecommendation -> Maybe EBSFinding
finding} -> Maybe EBSFinding
finding) (\s :: VolumeRecommendation
s@VolumeRecommendation' {} Maybe EBSFinding
a -> VolumeRecommendation
s {$sel:finding:VolumeRecommendation' :: Maybe EBSFinding
finding = Maybe EBSFinding
a} :: VolumeRecommendation)
volumeRecommendation_volumeArn :: Lens.Lens' VolumeRecommendation (Prelude.Maybe Prelude.Text)
volumeRecommendation_volumeArn :: (Maybe Text -> f (Maybe Text))
-> VolumeRecommendation -> f VolumeRecommendation
volumeRecommendation_volumeArn = (VolumeRecommendation -> Maybe Text)
-> (VolumeRecommendation -> Maybe Text -> VolumeRecommendation)
-> Lens
VolumeRecommendation VolumeRecommendation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecommendation' {Maybe Text
volumeArn :: Maybe Text
$sel:volumeArn:VolumeRecommendation' :: VolumeRecommendation -> Maybe Text
volumeArn} -> Maybe Text
volumeArn) (\s :: VolumeRecommendation
s@VolumeRecommendation' {} Maybe Text
a -> VolumeRecommendation
s {$sel:volumeArn:VolumeRecommendation' :: Maybe Text
volumeArn = Maybe Text
a} :: VolumeRecommendation)
volumeRecommendation_lastRefreshTimestamp :: Lens.Lens' VolumeRecommendation (Prelude.Maybe Prelude.UTCTime)
volumeRecommendation_lastRefreshTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> VolumeRecommendation -> f VolumeRecommendation
volumeRecommendation_lastRefreshTimestamp = (VolumeRecommendation -> Maybe POSIX)
-> (VolumeRecommendation -> Maybe POSIX -> VolumeRecommendation)
-> Lens
VolumeRecommendation
VolumeRecommendation
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecommendation' {Maybe POSIX
lastRefreshTimestamp :: Maybe POSIX
$sel:lastRefreshTimestamp:VolumeRecommendation' :: VolumeRecommendation -> Maybe POSIX
lastRefreshTimestamp} -> Maybe POSIX
lastRefreshTimestamp) (\s :: VolumeRecommendation
s@VolumeRecommendation' {} Maybe POSIX
a -> VolumeRecommendation
s {$sel:lastRefreshTimestamp:VolumeRecommendation' :: Maybe POSIX
lastRefreshTimestamp = Maybe POSIX
a} :: VolumeRecommendation) ((Maybe POSIX -> f (Maybe POSIX))
-> VolumeRecommendation -> f VolumeRecommendation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> VolumeRecommendation
-> f VolumeRecommendation
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
volumeRecommendation_currentConfiguration :: Lens.Lens' VolumeRecommendation (Prelude.Maybe VolumeConfiguration)
volumeRecommendation_currentConfiguration :: (Maybe VolumeConfiguration -> f (Maybe VolumeConfiguration))
-> VolumeRecommendation -> f VolumeRecommendation
volumeRecommendation_currentConfiguration = (VolumeRecommendation -> Maybe VolumeConfiguration)
-> (VolumeRecommendation
-> Maybe VolumeConfiguration -> VolumeRecommendation)
-> Lens
VolumeRecommendation
VolumeRecommendation
(Maybe VolumeConfiguration)
(Maybe VolumeConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecommendation' {Maybe VolumeConfiguration
currentConfiguration :: Maybe VolumeConfiguration
$sel:currentConfiguration:VolumeRecommendation' :: VolumeRecommendation -> Maybe VolumeConfiguration
currentConfiguration} -> Maybe VolumeConfiguration
currentConfiguration) (\s :: VolumeRecommendation
s@VolumeRecommendation' {} Maybe VolumeConfiguration
a -> VolumeRecommendation
s {$sel:currentConfiguration:VolumeRecommendation' :: Maybe VolumeConfiguration
currentConfiguration = Maybe VolumeConfiguration
a} :: VolumeRecommendation)
volumeRecommendation_accountId :: Lens.Lens' VolumeRecommendation (Prelude.Maybe Prelude.Text)
volumeRecommendation_accountId :: (Maybe Text -> f (Maybe Text))
-> VolumeRecommendation -> f VolumeRecommendation
volumeRecommendation_accountId = (VolumeRecommendation -> Maybe Text)
-> (VolumeRecommendation -> Maybe Text -> VolumeRecommendation)
-> Lens
VolumeRecommendation VolumeRecommendation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecommendation' {Maybe Text
accountId :: Maybe Text
$sel:accountId:VolumeRecommendation' :: VolumeRecommendation -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: VolumeRecommendation
s@VolumeRecommendation' {} Maybe Text
a -> VolumeRecommendation
s {$sel:accountId:VolumeRecommendation' :: Maybe Text
accountId = Maybe Text
a} :: VolumeRecommendation)
volumeRecommendation_utilizationMetrics :: Lens.Lens' VolumeRecommendation (Prelude.Maybe [EBSUtilizationMetric])
volumeRecommendation_utilizationMetrics :: (Maybe [EBSUtilizationMetric] -> f (Maybe [EBSUtilizationMetric]))
-> VolumeRecommendation -> f VolumeRecommendation
volumeRecommendation_utilizationMetrics = (VolumeRecommendation -> Maybe [EBSUtilizationMetric])
-> (VolumeRecommendation
-> Maybe [EBSUtilizationMetric] -> VolumeRecommendation)
-> Lens
VolumeRecommendation
VolumeRecommendation
(Maybe [EBSUtilizationMetric])
(Maybe [EBSUtilizationMetric])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecommendation' {Maybe [EBSUtilizationMetric]
utilizationMetrics :: Maybe [EBSUtilizationMetric]
$sel:utilizationMetrics:VolumeRecommendation' :: VolumeRecommendation -> Maybe [EBSUtilizationMetric]
utilizationMetrics} -> Maybe [EBSUtilizationMetric]
utilizationMetrics) (\s :: VolumeRecommendation
s@VolumeRecommendation' {} Maybe [EBSUtilizationMetric]
a -> VolumeRecommendation
s {$sel:utilizationMetrics:VolumeRecommendation' :: Maybe [EBSUtilizationMetric]
utilizationMetrics = Maybe [EBSUtilizationMetric]
a} :: VolumeRecommendation) ((Maybe [EBSUtilizationMetric] -> f (Maybe [EBSUtilizationMetric]))
-> VolumeRecommendation -> f VolumeRecommendation)
-> ((Maybe [EBSUtilizationMetric]
-> f (Maybe [EBSUtilizationMetric]))
-> Maybe [EBSUtilizationMetric]
-> f (Maybe [EBSUtilizationMetric]))
-> (Maybe [EBSUtilizationMetric]
-> f (Maybe [EBSUtilizationMetric]))
-> VolumeRecommendation
-> f VolumeRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[EBSUtilizationMetric]
[EBSUtilizationMetric]
[EBSUtilizationMetric]
[EBSUtilizationMetric]
-> Iso
(Maybe [EBSUtilizationMetric])
(Maybe [EBSUtilizationMetric])
(Maybe [EBSUtilizationMetric])
(Maybe [EBSUtilizationMetric])
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
[EBSUtilizationMetric]
[EBSUtilizationMetric]
[EBSUtilizationMetric]
[EBSUtilizationMetric]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
volumeRecommendation_volumeRecommendationOptions :: Lens.Lens' VolumeRecommendation (Prelude.Maybe [VolumeRecommendationOption])
volumeRecommendation_volumeRecommendationOptions :: (Maybe [VolumeRecommendationOption]
-> f (Maybe [VolumeRecommendationOption]))
-> VolumeRecommendation -> f VolumeRecommendation
volumeRecommendation_volumeRecommendationOptions = (VolumeRecommendation -> Maybe [VolumeRecommendationOption])
-> (VolumeRecommendation
-> Maybe [VolumeRecommendationOption] -> VolumeRecommendation)
-> Lens
VolumeRecommendation
VolumeRecommendation
(Maybe [VolumeRecommendationOption])
(Maybe [VolumeRecommendationOption])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecommendation' {Maybe [VolumeRecommendationOption]
volumeRecommendationOptions :: Maybe [VolumeRecommendationOption]
$sel:volumeRecommendationOptions:VolumeRecommendation' :: VolumeRecommendation -> Maybe [VolumeRecommendationOption]
volumeRecommendationOptions} -> Maybe [VolumeRecommendationOption]
volumeRecommendationOptions) (\s :: VolumeRecommendation
s@VolumeRecommendation' {} Maybe [VolumeRecommendationOption]
a -> VolumeRecommendation
s {$sel:volumeRecommendationOptions:VolumeRecommendation' :: Maybe [VolumeRecommendationOption]
volumeRecommendationOptions = Maybe [VolumeRecommendationOption]
a} :: VolumeRecommendation) ((Maybe [VolumeRecommendationOption]
-> f (Maybe [VolumeRecommendationOption]))
-> VolumeRecommendation -> f VolumeRecommendation)
-> ((Maybe [VolumeRecommendationOption]
-> f (Maybe [VolumeRecommendationOption]))
-> Maybe [VolumeRecommendationOption]
-> f (Maybe [VolumeRecommendationOption]))
-> (Maybe [VolumeRecommendationOption]
-> f (Maybe [VolumeRecommendationOption]))
-> VolumeRecommendation
-> f VolumeRecommendation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[VolumeRecommendationOption]
[VolumeRecommendationOption]
[VolumeRecommendationOption]
[VolumeRecommendationOption]
-> Iso
(Maybe [VolumeRecommendationOption])
(Maybe [VolumeRecommendationOption])
(Maybe [VolumeRecommendationOption])
(Maybe [VolumeRecommendationOption])
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
[VolumeRecommendationOption]
[VolumeRecommendationOption]
[VolumeRecommendationOption]
[VolumeRecommendationOption]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
volumeRecommendation_lookBackPeriodInDays :: Lens.Lens' VolumeRecommendation (Prelude.Maybe Prelude.Double)
volumeRecommendation_lookBackPeriodInDays :: (Maybe Double -> f (Maybe Double))
-> VolumeRecommendation -> f VolumeRecommendation
volumeRecommendation_lookBackPeriodInDays = (VolumeRecommendation -> Maybe Double)
-> (VolumeRecommendation -> Maybe Double -> VolumeRecommendation)
-> Lens
VolumeRecommendation
VolumeRecommendation
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeRecommendation' {Maybe Double
lookBackPeriodInDays :: Maybe Double
$sel:lookBackPeriodInDays:VolumeRecommendation' :: VolumeRecommendation -> Maybe Double
lookBackPeriodInDays} -> Maybe Double
lookBackPeriodInDays) (\s :: VolumeRecommendation
s@VolumeRecommendation' {} Maybe Double
a -> VolumeRecommendation
s {$sel:lookBackPeriodInDays:VolumeRecommendation' :: Maybe Double
lookBackPeriodInDays = Maybe Double
a} :: VolumeRecommendation)
instance Core.FromJSON VolumeRecommendation where
parseJSON :: Value -> Parser VolumeRecommendation
parseJSON =
String
-> (Object -> Parser VolumeRecommendation)
-> Value
-> Parser VolumeRecommendation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VolumeRecommendation"
( \Object
x ->
Maybe EBSFinding
-> Maybe Text
-> Maybe POSIX
-> Maybe VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation
VolumeRecommendation'
(Maybe EBSFinding
-> Maybe Text
-> Maybe POSIX
-> Maybe VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
-> Parser (Maybe EBSFinding)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EBSFinding)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"finding")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
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
"volumeArn")
Parser
(Maybe POSIX
-> Maybe VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
-> Parser (Maybe POSIX)
-> Parser
(Maybe VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
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 VolumeConfiguration
-> Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
-> Parser (Maybe VolumeConfiguration)
-> Parser
(Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VolumeConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"currentConfiguration")
Parser
(Maybe Text
-> Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
-> Parser (Maybe Text)
-> Parser
(Maybe [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
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 [EBSUtilizationMetric]
-> Maybe [VolumeRecommendationOption]
-> Maybe Double
-> VolumeRecommendation)
-> Parser (Maybe [EBSUtilizationMetric])
-> Parser
(Maybe [VolumeRecommendationOption]
-> Maybe Double -> VolumeRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [EBSUtilizationMetric]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"utilizationMetrics"
Parser (Maybe (Maybe [EBSUtilizationMetric]))
-> Maybe [EBSUtilizationMetric]
-> Parser (Maybe [EBSUtilizationMetric])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [EBSUtilizationMetric]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [VolumeRecommendationOption]
-> Maybe Double -> VolumeRecommendation)
-> Parser (Maybe [VolumeRecommendationOption])
-> Parser (Maybe Double -> VolumeRecommendation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [VolumeRecommendationOption]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumeRecommendationOptions"
Parser (Maybe (Maybe [VolumeRecommendationOption]))
-> Maybe [VolumeRecommendationOption]
-> Parser (Maybe [VolumeRecommendationOption])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [VolumeRecommendationOption]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Double -> VolumeRecommendation)
-> Parser (Maybe Double) -> Parser VolumeRecommendation
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 VolumeRecommendation
instance Prelude.NFData VolumeRecommendation