{-# 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.ReservationPurchaseRecommendationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReservationPurchaseRecommendationSummary = ReservationPurchaseRecommendationSummary'
{
ReservationPurchaseRecommendationSummary -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
ReservationPurchaseRecommendationSummary -> Maybe Text
totalEstimatedMonthlySavingsPercentage :: Prelude.Maybe Prelude.Text,
ReservationPurchaseRecommendationSummary -> Maybe Text
totalEstimatedMonthlySavingsAmount :: Prelude.Maybe Prelude.Text
}
deriving (ReservationPurchaseRecommendationSummary
-> ReservationPurchaseRecommendationSummary -> Bool
(ReservationPurchaseRecommendationSummary
-> ReservationPurchaseRecommendationSummary -> Bool)
-> (ReservationPurchaseRecommendationSummary
-> ReservationPurchaseRecommendationSummary -> Bool)
-> Eq ReservationPurchaseRecommendationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservationPurchaseRecommendationSummary
-> ReservationPurchaseRecommendationSummary -> Bool
$c/= :: ReservationPurchaseRecommendationSummary
-> ReservationPurchaseRecommendationSummary -> Bool
== :: ReservationPurchaseRecommendationSummary
-> ReservationPurchaseRecommendationSummary -> Bool
$c== :: ReservationPurchaseRecommendationSummary
-> ReservationPurchaseRecommendationSummary -> Bool
Prelude.Eq, ReadPrec [ReservationPurchaseRecommendationSummary]
ReadPrec ReservationPurchaseRecommendationSummary
Int -> ReadS ReservationPurchaseRecommendationSummary
ReadS [ReservationPurchaseRecommendationSummary]
(Int -> ReadS ReservationPurchaseRecommendationSummary)
-> ReadS [ReservationPurchaseRecommendationSummary]
-> ReadPrec ReservationPurchaseRecommendationSummary
-> ReadPrec [ReservationPurchaseRecommendationSummary]
-> Read ReservationPurchaseRecommendationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservationPurchaseRecommendationSummary]
$creadListPrec :: ReadPrec [ReservationPurchaseRecommendationSummary]
readPrec :: ReadPrec ReservationPurchaseRecommendationSummary
$creadPrec :: ReadPrec ReservationPurchaseRecommendationSummary
readList :: ReadS [ReservationPurchaseRecommendationSummary]
$creadList :: ReadS [ReservationPurchaseRecommendationSummary]
readsPrec :: Int -> ReadS ReservationPurchaseRecommendationSummary
$creadsPrec :: Int -> ReadS ReservationPurchaseRecommendationSummary
Prelude.Read, Int -> ReservationPurchaseRecommendationSummary -> ShowS
[ReservationPurchaseRecommendationSummary] -> ShowS
ReservationPurchaseRecommendationSummary -> String
(Int -> ReservationPurchaseRecommendationSummary -> ShowS)
-> (ReservationPurchaseRecommendationSummary -> String)
-> ([ReservationPurchaseRecommendationSummary] -> ShowS)
-> Show ReservationPurchaseRecommendationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservationPurchaseRecommendationSummary] -> ShowS
$cshowList :: [ReservationPurchaseRecommendationSummary] -> ShowS
show :: ReservationPurchaseRecommendationSummary -> String
$cshow :: ReservationPurchaseRecommendationSummary -> String
showsPrec :: Int -> ReservationPurchaseRecommendationSummary -> ShowS
$cshowsPrec :: Int -> ReservationPurchaseRecommendationSummary -> ShowS
Prelude.Show, (forall x.
ReservationPurchaseRecommendationSummary
-> Rep ReservationPurchaseRecommendationSummary x)
-> (forall x.
Rep ReservationPurchaseRecommendationSummary x
-> ReservationPurchaseRecommendationSummary)
-> Generic ReservationPurchaseRecommendationSummary
forall x.
Rep ReservationPurchaseRecommendationSummary x
-> ReservationPurchaseRecommendationSummary
forall x.
ReservationPurchaseRecommendationSummary
-> Rep ReservationPurchaseRecommendationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReservationPurchaseRecommendationSummary x
-> ReservationPurchaseRecommendationSummary
$cfrom :: forall x.
ReservationPurchaseRecommendationSummary
-> Rep ReservationPurchaseRecommendationSummary x
Prelude.Generic)
newReservationPurchaseRecommendationSummary ::
ReservationPurchaseRecommendationSummary
newReservationPurchaseRecommendationSummary :: ReservationPurchaseRecommendationSummary
newReservationPurchaseRecommendationSummary =
ReservationPurchaseRecommendationSummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> ReservationPurchaseRecommendationSummary
ReservationPurchaseRecommendationSummary'
{ $sel:currencyCode:ReservationPurchaseRecommendationSummary' :: Maybe Text
currencyCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:totalEstimatedMonthlySavingsPercentage:ReservationPurchaseRecommendationSummary' :: Maybe Text
totalEstimatedMonthlySavingsPercentage =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:totalEstimatedMonthlySavingsAmount:ReservationPurchaseRecommendationSummary' :: Maybe Text
totalEstimatedMonthlySavingsAmount =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
reservationPurchaseRecommendationSummary_currencyCode :: Lens.Lens' ReservationPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
reservationPurchaseRecommendationSummary_currencyCode :: (Maybe Text -> f (Maybe Text))
-> ReservationPurchaseRecommendationSummary
-> f ReservationPurchaseRecommendationSummary
reservationPurchaseRecommendationSummary_currencyCode = (ReservationPurchaseRecommendationSummary -> Maybe Text)
-> (ReservationPurchaseRecommendationSummary
-> Maybe Text -> ReservationPurchaseRecommendationSummary)
-> Lens
ReservationPurchaseRecommendationSummary
ReservationPurchaseRecommendationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendationSummary' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:ReservationPurchaseRecommendationSummary' :: ReservationPurchaseRecommendationSummary -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: ReservationPurchaseRecommendationSummary
s@ReservationPurchaseRecommendationSummary' {} Maybe Text
a -> ReservationPurchaseRecommendationSummary
s {$sel:currencyCode:ReservationPurchaseRecommendationSummary' :: Maybe Text
currencyCode = Maybe Text
a} :: ReservationPurchaseRecommendationSummary)
reservationPurchaseRecommendationSummary_totalEstimatedMonthlySavingsPercentage :: Lens.Lens' ReservationPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
reservationPurchaseRecommendationSummary_totalEstimatedMonthlySavingsPercentage :: (Maybe Text -> f (Maybe Text))
-> ReservationPurchaseRecommendationSummary
-> f ReservationPurchaseRecommendationSummary
reservationPurchaseRecommendationSummary_totalEstimatedMonthlySavingsPercentage = (ReservationPurchaseRecommendationSummary -> Maybe Text)
-> (ReservationPurchaseRecommendationSummary
-> Maybe Text -> ReservationPurchaseRecommendationSummary)
-> Lens
ReservationPurchaseRecommendationSummary
ReservationPurchaseRecommendationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendationSummary' {Maybe Text
totalEstimatedMonthlySavingsPercentage :: Maybe Text
$sel:totalEstimatedMonthlySavingsPercentage:ReservationPurchaseRecommendationSummary' :: ReservationPurchaseRecommendationSummary -> Maybe Text
totalEstimatedMonthlySavingsPercentage} -> Maybe Text
totalEstimatedMonthlySavingsPercentage) (\s :: ReservationPurchaseRecommendationSummary
s@ReservationPurchaseRecommendationSummary' {} Maybe Text
a -> ReservationPurchaseRecommendationSummary
s {$sel:totalEstimatedMonthlySavingsPercentage:ReservationPurchaseRecommendationSummary' :: Maybe Text
totalEstimatedMonthlySavingsPercentage = Maybe Text
a} :: ReservationPurchaseRecommendationSummary)
reservationPurchaseRecommendationSummary_totalEstimatedMonthlySavingsAmount :: Lens.Lens' ReservationPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
reservationPurchaseRecommendationSummary_totalEstimatedMonthlySavingsAmount :: (Maybe Text -> f (Maybe Text))
-> ReservationPurchaseRecommendationSummary
-> f ReservationPurchaseRecommendationSummary
reservationPurchaseRecommendationSummary_totalEstimatedMonthlySavingsAmount = (ReservationPurchaseRecommendationSummary -> Maybe Text)
-> (ReservationPurchaseRecommendationSummary
-> Maybe Text -> ReservationPurchaseRecommendationSummary)
-> Lens
ReservationPurchaseRecommendationSummary
ReservationPurchaseRecommendationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationPurchaseRecommendationSummary' {Maybe Text
totalEstimatedMonthlySavingsAmount :: Maybe Text
$sel:totalEstimatedMonthlySavingsAmount:ReservationPurchaseRecommendationSummary' :: ReservationPurchaseRecommendationSummary -> Maybe Text
totalEstimatedMonthlySavingsAmount} -> Maybe Text
totalEstimatedMonthlySavingsAmount) (\s :: ReservationPurchaseRecommendationSummary
s@ReservationPurchaseRecommendationSummary' {} Maybe Text
a -> ReservationPurchaseRecommendationSummary
s {$sel:totalEstimatedMonthlySavingsAmount:ReservationPurchaseRecommendationSummary' :: Maybe Text
totalEstimatedMonthlySavingsAmount = Maybe Text
a} :: ReservationPurchaseRecommendationSummary)
instance
Core.FromJSON
ReservationPurchaseRecommendationSummary
where
parseJSON :: Value -> Parser ReservationPurchaseRecommendationSummary
parseJSON =
String
-> (Object -> Parser ReservationPurchaseRecommendationSummary)
-> Value
-> Parser ReservationPurchaseRecommendationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReservationPurchaseRecommendationSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> ReservationPurchaseRecommendationSummary
ReservationPurchaseRecommendationSummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> ReservationPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> ReservationPurchaseRecommendationSummary)
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
"CurrencyCode")
Parser
(Maybe Text
-> Maybe Text -> ReservationPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ReservationPurchaseRecommendationSummary)
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
"TotalEstimatedMonthlySavingsPercentage")
Parser (Maybe Text -> ReservationPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser ReservationPurchaseRecommendationSummary
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
"TotalEstimatedMonthlySavingsAmount")
)
instance
Prelude.Hashable
ReservationPurchaseRecommendationSummary
instance
Prelude.NFData
ReservationPurchaseRecommendationSummary