{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CostExplorer.Types.SavingsPlansPurchaseRecommendationSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CostExplorer.Types.SavingsPlansPurchaseRecommendationSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Summary metrics for your Savings Plans Purchase Recommendations.
--
-- /See:/ 'newSavingsPlansPurchaseRecommendationSummary' smart constructor.
data SavingsPlansPurchaseRecommendationSummary = SavingsPlansPurchaseRecommendationSummary'
  { -- | The currency code that Amazon Web Services used to generate the
    -- recommendations and present potential savings.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
    -- | The recommended Savings Plans cost on a daily (24 hourly) basis.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
dailyCommitmentToPurchase :: Prelude.Maybe Prelude.Text,
    -- | The estimated total cost of the usage after purchasing the recommended
    -- Savings Plans. This is a sum of the cost of Savings Plans during this
    -- term, and the remaining On-Demand usage.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedTotalCost :: Prelude.Maybe Prelude.Text,
    -- | The estimated return on investment that\'s based on the recommended
    -- Savings Plans and estimated savings.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedROI :: Prelude.Maybe Prelude.Text,
    -- | The estimated total savings over the lookback period, based on the
    -- purchase of the recommended Savings Plans.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedSavingsAmount :: Prelude.Maybe Prelude.Text,
    -- | The estimated monthly savings amount that\'s based on the recommended
    -- Savings Plans purchase.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedMonthlySavingsAmount :: Prelude.Maybe Prelude.Text,
    -- | The estimated On-Demand costs you would expect with no additional
    -- commitment. It\'s based on your usage of the selected time period and
    -- the Savings Plans you own.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedOnDemandCostWithCurrentCommitment :: Prelude.Maybe Prelude.Text,
    -- | The estimated savings relative to the total cost of On-Demand usage,
    -- over the lookback period. This is calculated as
    -- @estimatedSavingsAmount@\/ @CurrentOnDemandSpend@*100.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedSavingsPercentage :: Prelude.Maybe Prelude.Text,
    -- | The aggregate number of Savings Plans recommendations that exist for
    -- your account.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
totalRecommendationCount :: Prelude.Maybe Prelude.Text,
    -- | The current total on demand spend of the applicable usage types over the
    -- lookback period.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
currentOnDemandSpend :: Prelude.Maybe Prelude.Text,
    -- | The recommended hourly commitment that\'s based on the recommendation
    -- parameters.
    SavingsPlansPurchaseRecommendationSummary -> Maybe Text
hourlyCommitmentToPurchase :: Prelude.Maybe Prelude.Text
  }
  deriving (SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendationSummary -> Bool
(SavingsPlansPurchaseRecommendationSummary
 -> SavingsPlansPurchaseRecommendationSummary -> Bool)
-> (SavingsPlansPurchaseRecommendationSummary
    -> SavingsPlansPurchaseRecommendationSummary -> Bool)
-> Eq SavingsPlansPurchaseRecommendationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendationSummary -> Bool
$c/= :: SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendationSummary -> Bool
== :: SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendationSummary -> Bool
$c== :: SavingsPlansPurchaseRecommendationSummary
-> SavingsPlansPurchaseRecommendationSummary -> Bool
Prelude.Eq, ReadPrec [SavingsPlansPurchaseRecommendationSummary]
ReadPrec SavingsPlansPurchaseRecommendationSummary
Int -> ReadS SavingsPlansPurchaseRecommendationSummary
ReadS [SavingsPlansPurchaseRecommendationSummary]
(Int -> ReadS SavingsPlansPurchaseRecommendationSummary)
-> ReadS [SavingsPlansPurchaseRecommendationSummary]
-> ReadPrec SavingsPlansPurchaseRecommendationSummary
-> ReadPrec [SavingsPlansPurchaseRecommendationSummary]
-> Read SavingsPlansPurchaseRecommendationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SavingsPlansPurchaseRecommendationSummary]
$creadListPrec :: ReadPrec [SavingsPlansPurchaseRecommendationSummary]
readPrec :: ReadPrec SavingsPlansPurchaseRecommendationSummary
$creadPrec :: ReadPrec SavingsPlansPurchaseRecommendationSummary
readList :: ReadS [SavingsPlansPurchaseRecommendationSummary]
$creadList :: ReadS [SavingsPlansPurchaseRecommendationSummary]
readsPrec :: Int -> ReadS SavingsPlansPurchaseRecommendationSummary
$creadsPrec :: Int -> ReadS SavingsPlansPurchaseRecommendationSummary
Prelude.Read, Int -> SavingsPlansPurchaseRecommendationSummary -> ShowS
[SavingsPlansPurchaseRecommendationSummary] -> ShowS
SavingsPlansPurchaseRecommendationSummary -> String
(Int -> SavingsPlansPurchaseRecommendationSummary -> ShowS)
-> (SavingsPlansPurchaseRecommendationSummary -> String)
-> ([SavingsPlansPurchaseRecommendationSummary] -> ShowS)
-> Show SavingsPlansPurchaseRecommendationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SavingsPlansPurchaseRecommendationSummary] -> ShowS
$cshowList :: [SavingsPlansPurchaseRecommendationSummary] -> ShowS
show :: SavingsPlansPurchaseRecommendationSummary -> String
$cshow :: SavingsPlansPurchaseRecommendationSummary -> String
showsPrec :: Int -> SavingsPlansPurchaseRecommendationSummary -> ShowS
$cshowsPrec :: Int -> SavingsPlansPurchaseRecommendationSummary -> ShowS
Prelude.Show, (forall x.
 SavingsPlansPurchaseRecommendationSummary
 -> Rep SavingsPlansPurchaseRecommendationSummary x)
-> (forall x.
    Rep SavingsPlansPurchaseRecommendationSummary x
    -> SavingsPlansPurchaseRecommendationSummary)
-> Generic SavingsPlansPurchaseRecommendationSummary
forall x.
Rep SavingsPlansPurchaseRecommendationSummary x
-> SavingsPlansPurchaseRecommendationSummary
forall x.
SavingsPlansPurchaseRecommendationSummary
-> Rep SavingsPlansPurchaseRecommendationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SavingsPlansPurchaseRecommendationSummary x
-> SavingsPlansPurchaseRecommendationSummary
$cfrom :: forall x.
SavingsPlansPurchaseRecommendationSummary
-> Rep SavingsPlansPurchaseRecommendationSummary x
Prelude.Generic)

-- |
-- Create a value of 'SavingsPlansPurchaseRecommendationSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'currencyCode', 'savingsPlansPurchaseRecommendationSummary_currencyCode' - The currency code that Amazon Web Services used to generate the
-- recommendations and present potential savings.
--
-- 'dailyCommitmentToPurchase', 'savingsPlansPurchaseRecommendationSummary_dailyCommitmentToPurchase' - The recommended Savings Plans cost on a daily (24 hourly) basis.
--
-- 'estimatedTotalCost', 'savingsPlansPurchaseRecommendationSummary_estimatedTotalCost' - The estimated total cost of the usage after purchasing the recommended
-- Savings Plans. This is a sum of the cost of Savings Plans during this
-- term, and the remaining On-Demand usage.
--
-- 'estimatedROI', 'savingsPlansPurchaseRecommendationSummary_estimatedROI' - The estimated return on investment that\'s based on the recommended
-- Savings Plans and estimated savings.
--
-- 'estimatedSavingsAmount', 'savingsPlansPurchaseRecommendationSummary_estimatedSavingsAmount' - The estimated total savings over the lookback period, based on the
-- purchase of the recommended Savings Plans.
--
-- 'estimatedMonthlySavingsAmount', 'savingsPlansPurchaseRecommendationSummary_estimatedMonthlySavingsAmount' - The estimated monthly savings amount that\'s based on the recommended
-- Savings Plans purchase.
--
-- 'estimatedOnDemandCostWithCurrentCommitment', 'savingsPlansPurchaseRecommendationSummary_estimatedOnDemandCostWithCurrentCommitment' - The estimated On-Demand costs you would expect with no additional
-- commitment. It\'s based on your usage of the selected time period and
-- the Savings Plans you own.
--
-- 'estimatedSavingsPercentage', 'savingsPlansPurchaseRecommendationSummary_estimatedSavingsPercentage' - The estimated savings relative to the total cost of On-Demand usage,
-- over the lookback period. This is calculated as
-- @estimatedSavingsAmount@\/ @CurrentOnDemandSpend@*100.
--
-- 'totalRecommendationCount', 'savingsPlansPurchaseRecommendationSummary_totalRecommendationCount' - The aggregate number of Savings Plans recommendations that exist for
-- your account.
--
-- 'currentOnDemandSpend', 'savingsPlansPurchaseRecommendationSummary_currentOnDemandSpend' - The current total on demand spend of the applicable usage types over the
-- lookback period.
--
-- 'hourlyCommitmentToPurchase', 'savingsPlansPurchaseRecommendationSummary_hourlyCommitmentToPurchase' - The recommended hourly commitment that\'s based on the recommendation
-- parameters.
newSavingsPlansPurchaseRecommendationSummary ::
  SavingsPlansPurchaseRecommendationSummary
newSavingsPlansPurchaseRecommendationSummary :: SavingsPlansPurchaseRecommendationSummary
newSavingsPlansPurchaseRecommendationSummary =
  SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SavingsPlansPurchaseRecommendationSummary
SavingsPlansPurchaseRecommendationSummary'
    { $sel:currencyCode:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
currencyCode =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dailyCommitmentToPurchase:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
dailyCommitmentToPurchase =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedTotalCost:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedTotalCost =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedROI:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedROI = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedSavingsAmount:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedSavingsAmount =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedMonthlySavingsAmount:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedMonthlySavingsAmount =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedOnDemandCostWithCurrentCommitment:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedOnDemandCostWithCurrentCommitment =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedSavingsPercentage:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedSavingsPercentage =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:totalRecommendationCount:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
totalRecommendationCount =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentOnDemandSpend:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
currentOnDemandSpend =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hourlyCommitmentToPurchase:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
hourlyCommitmentToPurchase =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The currency code that Amazon Web Services used to generate the
-- recommendations and present potential savings.
savingsPlansPurchaseRecommendationSummary_currencyCode :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_currencyCode :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_currencyCode = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:currencyCode:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
currencyCode = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The recommended Savings Plans cost on a daily (24 hourly) basis.
savingsPlansPurchaseRecommendationSummary_dailyCommitmentToPurchase :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_dailyCommitmentToPurchase :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_dailyCommitmentToPurchase = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
dailyCommitmentToPurchase :: Maybe Text
$sel:dailyCommitmentToPurchase:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
dailyCommitmentToPurchase} -> Maybe Text
dailyCommitmentToPurchase) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:dailyCommitmentToPurchase:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
dailyCommitmentToPurchase = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The estimated total cost of the usage after purchasing the recommended
-- Savings Plans. This is a sum of the cost of Savings Plans during this
-- term, and the remaining On-Demand usage.
savingsPlansPurchaseRecommendationSummary_estimatedTotalCost :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_estimatedTotalCost :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_estimatedTotalCost = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
estimatedTotalCost :: Maybe Text
$sel:estimatedTotalCost:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedTotalCost} -> Maybe Text
estimatedTotalCost) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:estimatedTotalCost:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedTotalCost = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The estimated return on investment that\'s based on the recommended
-- Savings Plans and estimated savings.
savingsPlansPurchaseRecommendationSummary_estimatedROI :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_estimatedROI :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_estimatedROI = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
estimatedROI :: Maybe Text
$sel:estimatedROI:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedROI} -> Maybe Text
estimatedROI) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:estimatedROI:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedROI = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The estimated total savings over the lookback period, based on the
-- purchase of the recommended Savings Plans.
savingsPlansPurchaseRecommendationSummary_estimatedSavingsAmount :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_estimatedSavingsAmount :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_estimatedSavingsAmount = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
estimatedSavingsAmount :: Maybe Text
$sel:estimatedSavingsAmount:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedSavingsAmount} -> Maybe Text
estimatedSavingsAmount) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:estimatedSavingsAmount:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedSavingsAmount = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The estimated monthly savings amount that\'s based on the recommended
-- Savings Plans purchase.
savingsPlansPurchaseRecommendationSummary_estimatedMonthlySavingsAmount :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_estimatedMonthlySavingsAmount :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_estimatedMonthlySavingsAmount = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
estimatedMonthlySavingsAmount :: Maybe Text
$sel:estimatedMonthlySavingsAmount:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedMonthlySavingsAmount} -> Maybe Text
estimatedMonthlySavingsAmount) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:estimatedMonthlySavingsAmount:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedMonthlySavingsAmount = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The estimated On-Demand costs you would expect with no additional
-- commitment. It\'s based on your usage of the selected time period and
-- the Savings Plans you own.
savingsPlansPurchaseRecommendationSummary_estimatedOnDemandCostWithCurrentCommitment :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_estimatedOnDemandCostWithCurrentCommitment :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_estimatedOnDemandCostWithCurrentCommitment = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
estimatedOnDemandCostWithCurrentCommitment :: Maybe Text
$sel:estimatedOnDemandCostWithCurrentCommitment:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedOnDemandCostWithCurrentCommitment} -> Maybe Text
estimatedOnDemandCostWithCurrentCommitment) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:estimatedOnDemandCostWithCurrentCommitment:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedOnDemandCostWithCurrentCommitment = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The estimated savings relative to the total cost of On-Demand usage,
-- over the lookback period. This is calculated as
-- @estimatedSavingsAmount@\/ @CurrentOnDemandSpend@*100.
savingsPlansPurchaseRecommendationSummary_estimatedSavingsPercentage :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_estimatedSavingsPercentage :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_estimatedSavingsPercentage = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
estimatedSavingsPercentage :: Maybe Text
$sel:estimatedSavingsPercentage:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
estimatedSavingsPercentage} -> Maybe Text
estimatedSavingsPercentage) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:estimatedSavingsPercentage:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
estimatedSavingsPercentage = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The aggregate number of Savings Plans recommendations that exist for
-- your account.
savingsPlansPurchaseRecommendationSummary_totalRecommendationCount :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_totalRecommendationCount :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_totalRecommendationCount = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
totalRecommendationCount :: Maybe Text
$sel:totalRecommendationCount:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
totalRecommendationCount} -> Maybe Text
totalRecommendationCount) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:totalRecommendationCount:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
totalRecommendationCount = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The current total on demand spend of the applicable usage types over the
-- lookback period.
savingsPlansPurchaseRecommendationSummary_currentOnDemandSpend :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_currentOnDemandSpend :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_currentOnDemandSpend = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
currentOnDemandSpend :: Maybe Text
$sel:currentOnDemandSpend:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
currentOnDemandSpend} -> Maybe Text
currentOnDemandSpend) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:currentOnDemandSpend:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
currentOnDemandSpend = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

-- | The recommended hourly commitment that\'s based on the recommendation
-- parameters.
savingsPlansPurchaseRecommendationSummary_hourlyCommitmentToPurchase :: Lens.Lens' SavingsPlansPurchaseRecommendationSummary (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationSummary_hourlyCommitmentToPurchase :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationSummary
-> f SavingsPlansPurchaseRecommendationSummary
savingsPlansPurchaseRecommendationSummary_hourlyCommitmentToPurchase = (SavingsPlansPurchaseRecommendationSummary -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationSummary
    -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Lens
     SavingsPlansPurchaseRecommendationSummary
     SavingsPlansPurchaseRecommendationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationSummary' {Maybe Text
hourlyCommitmentToPurchase :: Maybe Text
$sel:hourlyCommitmentToPurchase:SavingsPlansPurchaseRecommendationSummary' :: SavingsPlansPurchaseRecommendationSummary -> Maybe Text
hourlyCommitmentToPurchase} -> Maybe Text
hourlyCommitmentToPurchase) (\s :: SavingsPlansPurchaseRecommendationSummary
s@SavingsPlansPurchaseRecommendationSummary' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationSummary
s {$sel:hourlyCommitmentToPurchase:SavingsPlansPurchaseRecommendationSummary' :: Maybe Text
hourlyCommitmentToPurchase = Maybe Text
a} :: SavingsPlansPurchaseRecommendationSummary)

instance
  Core.FromJSON
    SavingsPlansPurchaseRecommendationSummary
  where
  parseJSON :: Value -> Parser SavingsPlansPurchaseRecommendationSummary
parseJSON =
    String
-> (Object -> Parser SavingsPlansPurchaseRecommendationSummary)
-> Value
-> Parser SavingsPlansPurchaseRecommendationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SavingsPlansPurchaseRecommendationSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SavingsPlansPurchaseRecommendationSummary
SavingsPlansPurchaseRecommendationSummary'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationSummary)
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
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationSummary)
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
"DailyCommitmentToPurchase")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationSummary)
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
"EstimatedTotalCost")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationSummary)
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
"EstimatedROI")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationSummary)
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
"EstimatedSavingsAmount")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationSummary)
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
"EstimatedMonthlySavingsAmount")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationSummary)
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
"EstimatedOnDemandCostWithCurrentCommitment"
                          )
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationSummary)
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
"EstimatedSavingsPercentage")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
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
   -> Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
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
"CurrentOnDemandSpend")
              Parser (Maybe Text -> SavingsPlansPurchaseRecommendationSummary)
-> Parser (Maybe Text)
-> Parser SavingsPlansPurchaseRecommendationSummary
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
"HourlyCommitmentToPurchase")
      )

instance
  Prelude.Hashable
    SavingsPlansPurchaseRecommendationSummary

instance
  Prelude.NFData
    SavingsPlansPurchaseRecommendationSummary