{-# 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.CostExplorer.Types.RightsizingRecommendationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RightsizingRecommendationSummary = RightsizingRecommendationSummary'
{
RightsizingRecommendationSummary -> Maybe Text
savingsPercentage :: Prelude.Maybe Prelude.Text,
RightsizingRecommendationSummary -> Maybe Text
savingsCurrencyCode :: Prelude.Maybe Prelude.Text,
RightsizingRecommendationSummary -> Maybe Text
totalRecommendationCount :: Prelude.Maybe Prelude.Text,
RightsizingRecommendationSummary -> Maybe Text
estimatedTotalMonthlySavingsAmount :: Prelude.Maybe Prelude.Text
}
deriving (RightsizingRecommendationSummary
-> RightsizingRecommendationSummary -> Bool
(RightsizingRecommendationSummary
-> RightsizingRecommendationSummary -> Bool)
-> (RightsizingRecommendationSummary
-> RightsizingRecommendationSummary -> Bool)
-> Eq RightsizingRecommendationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RightsizingRecommendationSummary
-> RightsizingRecommendationSummary -> Bool
$c/= :: RightsizingRecommendationSummary
-> RightsizingRecommendationSummary -> Bool
== :: RightsizingRecommendationSummary
-> RightsizingRecommendationSummary -> Bool
$c== :: RightsizingRecommendationSummary
-> RightsizingRecommendationSummary -> Bool
Prelude.Eq, ReadPrec [RightsizingRecommendationSummary]
ReadPrec RightsizingRecommendationSummary
Int -> ReadS RightsizingRecommendationSummary
ReadS [RightsizingRecommendationSummary]
(Int -> ReadS RightsizingRecommendationSummary)
-> ReadS [RightsizingRecommendationSummary]
-> ReadPrec RightsizingRecommendationSummary
-> ReadPrec [RightsizingRecommendationSummary]
-> Read RightsizingRecommendationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RightsizingRecommendationSummary]
$creadListPrec :: ReadPrec [RightsizingRecommendationSummary]
readPrec :: ReadPrec RightsizingRecommendationSummary
$creadPrec :: ReadPrec RightsizingRecommendationSummary
readList :: ReadS [RightsizingRecommendationSummary]
$creadList :: ReadS [RightsizingRecommendationSummary]
readsPrec :: Int -> ReadS RightsizingRecommendationSummary
$creadsPrec :: Int -> ReadS RightsizingRecommendationSummary
Prelude.Read, Int -> RightsizingRecommendationSummary -> ShowS
[RightsizingRecommendationSummary] -> ShowS
RightsizingRecommendationSummary -> String
(Int -> RightsizingRecommendationSummary -> ShowS)
-> (RightsizingRecommendationSummary -> String)
-> ([RightsizingRecommendationSummary] -> ShowS)
-> Show RightsizingRecommendationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RightsizingRecommendationSummary] -> ShowS
$cshowList :: [RightsizingRecommendationSummary] -> ShowS
show :: RightsizingRecommendationSummary -> String
$cshow :: RightsizingRecommendationSummary -> String
showsPrec :: Int -> RightsizingRecommendationSummary -> ShowS
$cshowsPrec :: Int -> RightsizingRecommendationSummary -> ShowS
Prelude.Show, (forall x.
RightsizingRecommendationSummary
-> Rep RightsizingRecommendationSummary x)
-> (forall x.
Rep RightsizingRecommendationSummary x
-> RightsizingRecommendationSummary)
-> Generic RightsizingRecommendationSummary
forall x.
Rep RightsizingRecommendationSummary x
-> RightsizingRecommendationSummary
forall x.
RightsizingRecommendationSummary
-> Rep RightsizingRecommendationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RightsizingRecommendationSummary x
-> RightsizingRecommendationSummary
$cfrom :: forall x.
RightsizingRecommendationSummary
-> Rep RightsizingRecommendationSummary x
Prelude.Generic)
newRightsizingRecommendationSummary ::
RightsizingRecommendationSummary
newRightsizingRecommendationSummary :: RightsizingRecommendationSummary
newRightsizingRecommendationSummary =
RightsizingRecommendationSummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RightsizingRecommendationSummary
RightsizingRecommendationSummary'
{ $sel:savingsPercentage:RightsizingRecommendationSummary' :: Maybe Text
savingsPercentage =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:savingsCurrencyCode:RightsizingRecommendationSummary' :: Maybe Text
savingsCurrencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:totalRecommendationCount:RightsizingRecommendationSummary' :: Maybe Text
totalRecommendationCount =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:estimatedTotalMonthlySavingsAmount:RightsizingRecommendationSummary' :: Maybe Text
estimatedTotalMonthlySavingsAmount =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
rightsizingRecommendationSummary_savingsPercentage :: Lens.Lens' RightsizingRecommendationSummary (Prelude.Maybe Prelude.Text)
rightsizingRecommendationSummary_savingsPercentage :: (Maybe Text -> f (Maybe Text))
-> RightsizingRecommendationSummary
-> f RightsizingRecommendationSummary
rightsizingRecommendationSummary_savingsPercentage = (RightsizingRecommendationSummary -> Maybe Text)
-> (RightsizingRecommendationSummary
-> Maybe Text -> RightsizingRecommendationSummary)
-> Lens
RightsizingRecommendationSummary
RightsizingRecommendationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RightsizingRecommendationSummary' {Maybe Text
savingsPercentage :: Maybe Text
$sel:savingsPercentage:RightsizingRecommendationSummary' :: RightsizingRecommendationSummary -> Maybe Text
savingsPercentage} -> Maybe Text
savingsPercentage) (\s :: RightsizingRecommendationSummary
s@RightsizingRecommendationSummary' {} Maybe Text
a -> RightsizingRecommendationSummary
s {$sel:savingsPercentage:RightsizingRecommendationSummary' :: Maybe Text
savingsPercentage = Maybe Text
a} :: RightsizingRecommendationSummary)
rightsizingRecommendationSummary_savingsCurrencyCode :: Lens.Lens' RightsizingRecommendationSummary (Prelude.Maybe Prelude.Text)
rightsizingRecommendationSummary_savingsCurrencyCode :: (Maybe Text -> f (Maybe Text))
-> RightsizingRecommendationSummary
-> f RightsizingRecommendationSummary
rightsizingRecommendationSummary_savingsCurrencyCode = (RightsizingRecommendationSummary -> Maybe Text)
-> (RightsizingRecommendationSummary
-> Maybe Text -> RightsizingRecommendationSummary)
-> Lens
RightsizingRecommendationSummary
RightsizingRecommendationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RightsizingRecommendationSummary' {Maybe Text
savingsCurrencyCode :: Maybe Text
$sel:savingsCurrencyCode:RightsizingRecommendationSummary' :: RightsizingRecommendationSummary -> Maybe Text
savingsCurrencyCode} -> Maybe Text
savingsCurrencyCode) (\s :: RightsizingRecommendationSummary
s@RightsizingRecommendationSummary' {} Maybe Text
a -> RightsizingRecommendationSummary
s {$sel:savingsCurrencyCode:RightsizingRecommendationSummary' :: Maybe Text
savingsCurrencyCode = Maybe Text
a} :: RightsizingRecommendationSummary)
rightsizingRecommendationSummary_totalRecommendationCount :: Lens.Lens' RightsizingRecommendationSummary (Prelude.Maybe Prelude.Text)
rightsizingRecommendationSummary_totalRecommendationCount :: (Maybe Text -> f (Maybe Text))
-> RightsizingRecommendationSummary
-> f RightsizingRecommendationSummary
rightsizingRecommendationSummary_totalRecommendationCount = (RightsizingRecommendationSummary -> Maybe Text)
-> (RightsizingRecommendationSummary
-> Maybe Text -> RightsizingRecommendationSummary)
-> Lens
RightsizingRecommendationSummary
RightsizingRecommendationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RightsizingRecommendationSummary' {Maybe Text
totalRecommendationCount :: Maybe Text
$sel:totalRecommendationCount:RightsizingRecommendationSummary' :: RightsizingRecommendationSummary -> Maybe Text
totalRecommendationCount} -> Maybe Text
totalRecommendationCount) (\s :: RightsizingRecommendationSummary
s@RightsizingRecommendationSummary' {} Maybe Text
a -> RightsizingRecommendationSummary
s {$sel:totalRecommendationCount:RightsizingRecommendationSummary' :: Maybe Text
totalRecommendationCount = Maybe Text
a} :: RightsizingRecommendationSummary)
rightsizingRecommendationSummary_estimatedTotalMonthlySavingsAmount :: Lens.Lens' RightsizingRecommendationSummary (Prelude.Maybe Prelude.Text)
rightsizingRecommendationSummary_estimatedTotalMonthlySavingsAmount :: (Maybe Text -> f (Maybe Text))
-> RightsizingRecommendationSummary
-> f RightsizingRecommendationSummary
rightsizingRecommendationSummary_estimatedTotalMonthlySavingsAmount = (RightsizingRecommendationSummary -> Maybe Text)
-> (RightsizingRecommendationSummary
-> Maybe Text -> RightsizingRecommendationSummary)
-> Lens
RightsizingRecommendationSummary
RightsizingRecommendationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RightsizingRecommendationSummary' {Maybe Text
estimatedTotalMonthlySavingsAmount :: Maybe Text
$sel:estimatedTotalMonthlySavingsAmount:RightsizingRecommendationSummary' :: RightsizingRecommendationSummary -> Maybe Text
estimatedTotalMonthlySavingsAmount} -> Maybe Text
estimatedTotalMonthlySavingsAmount) (\s :: RightsizingRecommendationSummary
s@RightsizingRecommendationSummary' {} Maybe Text
a -> RightsizingRecommendationSummary
s {$sel:estimatedTotalMonthlySavingsAmount:RightsizingRecommendationSummary' :: Maybe Text
estimatedTotalMonthlySavingsAmount = Maybe Text
a} :: RightsizingRecommendationSummary)
instance
Core.FromJSON
RightsizingRecommendationSummary
where
parseJSON :: Value -> Parser RightsizingRecommendationSummary
parseJSON =
String
-> (Object -> Parser RightsizingRecommendationSummary)
-> Value
-> Parser RightsizingRecommendationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RightsizingRecommendationSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RightsizingRecommendationSummary
RightsizingRecommendationSummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RightsizingRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> RightsizingRecommendationSummary)
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
"SavingsPercentage")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> RightsizingRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> RightsizingRecommendationSummary)
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
"SavingsCurrencyCode")
Parser
(Maybe Text -> Maybe Text -> RightsizingRecommendationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> RightsizingRecommendationSummary)
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
"TotalRecommendationCount")
Parser (Maybe Text -> RightsizingRecommendationSummary)
-> Parser (Maybe Text) -> Parser RightsizingRecommendationSummary
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
"EstimatedTotalMonthlySavingsAmount")
)
instance
Prelude.Hashable
RightsizingRecommendationSummary
instance
Prelude.NFData
RightsizingRecommendationSummary