{-# 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.SavingsPlansPurchaseRecommendationDetail
-- 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.SavingsPlansPurchaseRecommendationDetail where

import qualified Amazonka.Core as Core
import Amazonka.CostExplorer.Types.SavingsPlansDetails
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details for your recommended Savings Plans.
--
-- /See:/ 'newSavingsPlansPurchaseRecommendationDetail' smart constructor.
data SavingsPlansPurchaseRecommendationDetail = SavingsPlansPurchaseRecommendationDetail'
  { -- | The currency code that Amazon Web Services used to generate the
    -- recommendations and present potential savings.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
    -- | The average value of hourly On-Demand spend over the lookback period of
    -- the applicable usage type.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
currentAverageHourlyOnDemandSpend :: Prelude.Maybe Prelude.Text,
    -- | Details for your recommended Savings Plans.
    SavingsPlansPurchaseRecommendationDetail
-> Maybe SavingsPlansDetails
savingsPlansDetails :: Prelude.Maybe SavingsPlansDetails,
    -- | The lowest value of hourly On-Demand spend over the lookback period of
    -- the applicable usage type.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
currentMinimumHourlyOnDemandSpend :: Prelude.Maybe Prelude.Text,
    -- | The estimated return on investment that\'s based on the recommended
    -- Savings Plans that you purchased. This is calculated as
    -- @estimatedSavingsAmount@\/ @estimatedSPCost@*100.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedROI :: Prelude.Maybe Prelude.Text,
    -- | The highest value of hourly On-Demand spend over the lookback period of
    -- the applicable usage type.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
currentMaximumHourlyOnDemandSpend :: Prelude.Maybe Prelude.Text,
    -- | The estimated savings amount that\'s based on the recommended Savings
    -- Plans over the length of the lookback period.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedSavingsAmount :: Prelude.Maybe Prelude.Text,
    -- | The @AccountID@ the recommendation is generated for.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | The estimated monthly savings amount based on the recommended Savings
    -- Plans.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedMonthlySavingsAmount :: Prelude.Maybe Prelude.Text,
    -- | The remaining On-Demand cost estimated to not be covered by the
    -- recommended Savings Plans, over the length of the lookback period.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedOnDemandCost :: Prelude.Maybe Prelude.Text,
    -- | The estimated On-Demand costs you would expect with no additional
    -- commitment, based on your usage of the selected time period and the
    -- Savings Plans you own.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedOnDemandCostWithCurrentCommitment :: Prelude.Maybe Prelude.Text,
    -- | The upfront cost of the recommended Savings Plans, based on the selected
    -- payment option.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
upfrontCost :: Prelude.Maybe Prelude.Text,
    -- | The cost of the recommended Savings Plans over the length of the
    -- lookback period.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedSPCost :: Prelude.Maybe Prelude.Text,
    -- | The estimated savings percentage relative to the total cost of
    -- applicable On-Demand usage over the lookback period.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedSavingsPercentage :: Prelude.Maybe Prelude.Text,
    -- | The estimated utilization of the recommended Savings Plans.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedAverageUtilization :: Prelude.Maybe Prelude.Text,
    -- | The recommended hourly commitment level for the Savings Plans type and
    -- the configuration that\'s based on the usage during the lookback period.
    SavingsPlansPurchaseRecommendationDetail -> Maybe Text
hourlyCommitmentToPurchase :: Prelude.Maybe Prelude.Text
  }
  deriving (SavingsPlansPurchaseRecommendationDetail
-> SavingsPlansPurchaseRecommendationDetail -> Bool
(SavingsPlansPurchaseRecommendationDetail
 -> SavingsPlansPurchaseRecommendationDetail -> Bool)
-> (SavingsPlansPurchaseRecommendationDetail
    -> SavingsPlansPurchaseRecommendationDetail -> Bool)
-> Eq SavingsPlansPurchaseRecommendationDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavingsPlansPurchaseRecommendationDetail
-> SavingsPlansPurchaseRecommendationDetail -> Bool
$c/= :: SavingsPlansPurchaseRecommendationDetail
-> SavingsPlansPurchaseRecommendationDetail -> Bool
== :: SavingsPlansPurchaseRecommendationDetail
-> SavingsPlansPurchaseRecommendationDetail -> Bool
$c== :: SavingsPlansPurchaseRecommendationDetail
-> SavingsPlansPurchaseRecommendationDetail -> Bool
Prelude.Eq, ReadPrec [SavingsPlansPurchaseRecommendationDetail]
ReadPrec SavingsPlansPurchaseRecommendationDetail
Int -> ReadS SavingsPlansPurchaseRecommendationDetail
ReadS [SavingsPlansPurchaseRecommendationDetail]
(Int -> ReadS SavingsPlansPurchaseRecommendationDetail)
-> ReadS [SavingsPlansPurchaseRecommendationDetail]
-> ReadPrec SavingsPlansPurchaseRecommendationDetail
-> ReadPrec [SavingsPlansPurchaseRecommendationDetail]
-> Read SavingsPlansPurchaseRecommendationDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SavingsPlansPurchaseRecommendationDetail]
$creadListPrec :: ReadPrec [SavingsPlansPurchaseRecommendationDetail]
readPrec :: ReadPrec SavingsPlansPurchaseRecommendationDetail
$creadPrec :: ReadPrec SavingsPlansPurchaseRecommendationDetail
readList :: ReadS [SavingsPlansPurchaseRecommendationDetail]
$creadList :: ReadS [SavingsPlansPurchaseRecommendationDetail]
readsPrec :: Int -> ReadS SavingsPlansPurchaseRecommendationDetail
$creadsPrec :: Int -> ReadS SavingsPlansPurchaseRecommendationDetail
Prelude.Read, Int -> SavingsPlansPurchaseRecommendationDetail -> ShowS
[SavingsPlansPurchaseRecommendationDetail] -> ShowS
SavingsPlansPurchaseRecommendationDetail -> String
(Int -> SavingsPlansPurchaseRecommendationDetail -> ShowS)
-> (SavingsPlansPurchaseRecommendationDetail -> String)
-> ([SavingsPlansPurchaseRecommendationDetail] -> ShowS)
-> Show SavingsPlansPurchaseRecommendationDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SavingsPlansPurchaseRecommendationDetail] -> ShowS
$cshowList :: [SavingsPlansPurchaseRecommendationDetail] -> ShowS
show :: SavingsPlansPurchaseRecommendationDetail -> String
$cshow :: SavingsPlansPurchaseRecommendationDetail -> String
showsPrec :: Int -> SavingsPlansPurchaseRecommendationDetail -> ShowS
$cshowsPrec :: Int -> SavingsPlansPurchaseRecommendationDetail -> ShowS
Prelude.Show, (forall x.
 SavingsPlansPurchaseRecommendationDetail
 -> Rep SavingsPlansPurchaseRecommendationDetail x)
-> (forall x.
    Rep SavingsPlansPurchaseRecommendationDetail x
    -> SavingsPlansPurchaseRecommendationDetail)
-> Generic SavingsPlansPurchaseRecommendationDetail
forall x.
Rep SavingsPlansPurchaseRecommendationDetail x
-> SavingsPlansPurchaseRecommendationDetail
forall x.
SavingsPlansPurchaseRecommendationDetail
-> Rep SavingsPlansPurchaseRecommendationDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SavingsPlansPurchaseRecommendationDetail x
-> SavingsPlansPurchaseRecommendationDetail
$cfrom :: forall x.
SavingsPlansPurchaseRecommendationDetail
-> Rep SavingsPlansPurchaseRecommendationDetail x
Prelude.Generic)

-- |
-- Create a value of 'SavingsPlansPurchaseRecommendationDetail' 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', 'savingsPlansPurchaseRecommendationDetail_currencyCode' - The currency code that Amazon Web Services used to generate the
-- recommendations and present potential savings.
--
-- 'currentAverageHourlyOnDemandSpend', 'savingsPlansPurchaseRecommendationDetail_currentAverageHourlyOnDemandSpend' - The average value of hourly On-Demand spend over the lookback period of
-- the applicable usage type.
--
-- 'savingsPlansDetails', 'savingsPlansPurchaseRecommendationDetail_savingsPlansDetails' - Details for your recommended Savings Plans.
--
-- 'currentMinimumHourlyOnDemandSpend', 'savingsPlansPurchaseRecommendationDetail_currentMinimumHourlyOnDemandSpend' - The lowest value of hourly On-Demand spend over the lookback period of
-- the applicable usage type.
--
-- 'estimatedROI', 'savingsPlansPurchaseRecommendationDetail_estimatedROI' - The estimated return on investment that\'s based on the recommended
-- Savings Plans that you purchased. This is calculated as
-- @estimatedSavingsAmount@\/ @estimatedSPCost@*100.
--
-- 'currentMaximumHourlyOnDemandSpend', 'savingsPlansPurchaseRecommendationDetail_currentMaximumHourlyOnDemandSpend' - The highest value of hourly On-Demand spend over the lookback period of
-- the applicable usage type.
--
-- 'estimatedSavingsAmount', 'savingsPlansPurchaseRecommendationDetail_estimatedSavingsAmount' - The estimated savings amount that\'s based on the recommended Savings
-- Plans over the length of the lookback period.
--
-- 'accountId', 'savingsPlansPurchaseRecommendationDetail_accountId' - The @AccountID@ the recommendation is generated for.
--
-- 'estimatedMonthlySavingsAmount', 'savingsPlansPurchaseRecommendationDetail_estimatedMonthlySavingsAmount' - The estimated monthly savings amount based on the recommended Savings
-- Plans.
--
-- 'estimatedOnDemandCost', 'savingsPlansPurchaseRecommendationDetail_estimatedOnDemandCost' - The remaining On-Demand cost estimated to not be covered by the
-- recommended Savings Plans, over the length of the lookback period.
--
-- 'estimatedOnDemandCostWithCurrentCommitment', 'savingsPlansPurchaseRecommendationDetail_estimatedOnDemandCostWithCurrentCommitment' - The estimated On-Demand costs you would expect with no additional
-- commitment, based on your usage of the selected time period and the
-- Savings Plans you own.
--
-- 'upfrontCost', 'savingsPlansPurchaseRecommendationDetail_upfrontCost' - The upfront cost of the recommended Savings Plans, based on the selected
-- payment option.
--
-- 'estimatedSPCost', 'savingsPlansPurchaseRecommendationDetail_estimatedSPCost' - The cost of the recommended Savings Plans over the length of the
-- lookback period.
--
-- 'estimatedSavingsPercentage', 'savingsPlansPurchaseRecommendationDetail_estimatedSavingsPercentage' - The estimated savings percentage relative to the total cost of
-- applicable On-Demand usage over the lookback period.
--
-- 'estimatedAverageUtilization', 'savingsPlansPurchaseRecommendationDetail_estimatedAverageUtilization' - The estimated utilization of the recommended Savings Plans.
--
-- 'hourlyCommitmentToPurchase', 'savingsPlansPurchaseRecommendationDetail_hourlyCommitmentToPurchase' - The recommended hourly commitment level for the Savings Plans type and
-- the configuration that\'s based on the usage during the lookback period.
newSavingsPlansPurchaseRecommendationDetail ::
  SavingsPlansPurchaseRecommendationDetail
newSavingsPlansPurchaseRecommendationDetail :: SavingsPlansPurchaseRecommendationDetail
newSavingsPlansPurchaseRecommendationDetail =
  SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
-> Maybe Text
-> Maybe SavingsPlansDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SavingsPlansPurchaseRecommendationDetail
SavingsPlansPurchaseRecommendationDetail'
    { $sel:currencyCode:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
currencyCode =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentAverageHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
currentAverageHourlyOnDemandSpend =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:savingsPlansDetails:SavingsPlansPurchaseRecommendationDetail' :: Maybe SavingsPlansDetails
savingsPlansDetails =
        Maybe SavingsPlansDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:currentMinimumHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
currentMinimumHourlyOnDemandSpend =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedROI:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedROI = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentMaximumHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
currentMaximumHourlyOnDemandSpend =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedSavingsAmount:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedSavingsAmount =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedMonthlySavingsAmount:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedMonthlySavingsAmount =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedOnDemandCost:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedOnDemandCost =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedOnDemandCostWithCurrentCommitment:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedOnDemandCostWithCurrentCommitment =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:upfrontCost:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
upfrontCost = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedSPCost:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedSPCost = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedSavingsPercentage:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedSavingsPercentage =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedAverageUtilization:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedAverageUtilization =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hourlyCommitmentToPurchase:SavingsPlansPurchaseRecommendationDetail' :: 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.
savingsPlansPurchaseRecommendationDetail_currencyCode :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_currencyCode :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_currencyCode = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:currencyCode:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
currencyCode = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | The average value of hourly On-Demand spend over the lookback period of
-- the applicable usage type.
savingsPlansPurchaseRecommendationDetail_currentAverageHourlyOnDemandSpend :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_currentAverageHourlyOnDemandSpend :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_currentAverageHourlyOnDemandSpend = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
currentAverageHourlyOnDemandSpend :: Maybe Text
$sel:currentAverageHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
currentAverageHourlyOnDemandSpend} -> Maybe Text
currentAverageHourlyOnDemandSpend) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:currentAverageHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
currentAverageHourlyOnDemandSpend = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | Details for your recommended Savings Plans.
savingsPlansPurchaseRecommendationDetail_savingsPlansDetails :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe SavingsPlansDetails)
savingsPlansPurchaseRecommendationDetail_savingsPlansDetails :: (Maybe SavingsPlansDetails -> f (Maybe SavingsPlansDetails))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_savingsPlansDetails = (SavingsPlansPurchaseRecommendationDetail
 -> Maybe SavingsPlansDetails)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe SavingsPlansDetails
    -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe SavingsPlansDetails)
     (Maybe SavingsPlansDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe SavingsPlansDetails
savingsPlansDetails :: Maybe SavingsPlansDetails
$sel:savingsPlansDetails:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail
-> Maybe SavingsPlansDetails
savingsPlansDetails} -> Maybe SavingsPlansDetails
savingsPlansDetails) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe SavingsPlansDetails
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:savingsPlansDetails:SavingsPlansPurchaseRecommendationDetail' :: Maybe SavingsPlansDetails
savingsPlansDetails = Maybe SavingsPlansDetails
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | The lowest value of hourly On-Demand spend over the lookback period of
-- the applicable usage type.
savingsPlansPurchaseRecommendationDetail_currentMinimumHourlyOnDemandSpend :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_currentMinimumHourlyOnDemandSpend :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_currentMinimumHourlyOnDemandSpend = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
currentMinimumHourlyOnDemandSpend :: Maybe Text
$sel:currentMinimumHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
currentMinimumHourlyOnDemandSpend} -> Maybe Text
currentMinimumHourlyOnDemandSpend) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:currentMinimumHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
currentMinimumHourlyOnDemandSpend = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | The estimated return on investment that\'s based on the recommended
-- Savings Plans that you purchased. This is calculated as
-- @estimatedSavingsAmount@\/ @estimatedSPCost@*100.
savingsPlansPurchaseRecommendationDetail_estimatedROI :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_estimatedROI :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_estimatedROI = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
estimatedROI :: Maybe Text
$sel:estimatedROI:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedROI} -> Maybe Text
estimatedROI) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:estimatedROI:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedROI = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | The highest value of hourly On-Demand spend over the lookback period of
-- the applicable usage type.
savingsPlansPurchaseRecommendationDetail_currentMaximumHourlyOnDemandSpend :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_currentMaximumHourlyOnDemandSpend :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_currentMaximumHourlyOnDemandSpend = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
currentMaximumHourlyOnDemandSpend :: Maybe Text
$sel:currentMaximumHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
currentMaximumHourlyOnDemandSpend} -> Maybe Text
currentMaximumHourlyOnDemandSpend) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:currentMaximumHourlyOnDemandSpend:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
currentMaximumHourlyOnDemandSpend = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

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

-- | The @AccountID@ the recommendation is generated for.
savingsPlansPurchaseRecommendationDetail_accountId :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_accountId :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_accountId = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
accountId :: Maybe Text
$sel:accountId:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:accountId:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
accountId = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

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

-- | The remaining On-Demand cost estimated to not be covered by the
-- recommended Savings Plans, over the length of the lookback period.
savingsPlansPurchaseRecommendationDetail_estimatedOnDemandCost :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_estimatedOnDemandCost :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_estimatedOnDemandCost = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
estimatedOnDemandCost :: Maybe Text
$sel:estimatedOnDemandCost:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedOnDemandCost} -> Maybe Text
estimatedOnDemandCost) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:estimatedOnDemandCost:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedOnDemandCost = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

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

-- | The upfront cost of the recommended Savings Plans, based on the selected
-- payment option.
savingsPlansPurchaseRecommendationDetail_upfrontCost :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_upfrontCost :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_upfrontCost = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
upfrontCost :: Maybe Text
$sel:upfrontCost:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
upfrontCost} -> Maybe Text
upfrontCost) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:upfrontCost:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
upfrontCost = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | The cost of the recommended Savings Plans over the length of the
-- lookback period.
savingsPlansPurchaseRecommendationDetail_estimatedSPCost :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_estimatedSPCost :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_estimatedSPCost = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
estimatedSPCost :: Maybe Text
$sel:estimatedSPCost:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedSPCost} -> Maybe Text
estimatedSPCost) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:estimatedSPCost:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedSPCost = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | The estimated savings percentage relative to the total cost of
-- applicable On-Demand usage over the lookback period.
savingsPlansPurchaseRecommendationDetail_estimatedSavingsPercentage :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_estimatedSavingsPercentage :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_estimatedSavingsPercentage = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
estimatedSavingsPercentage :: Maybe Text
$sel:estimatedSavingsPercentage:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedSavingsPercentage} -> Maybe Text
estimatedSavingsPercentage) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:estimatedSavingsPercentage:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedSavingsPercentage = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | The estimated utilization of the recommended Savings Plans.
savingsPlansPurchaseRecommendationDetail_estimatedAverageUtilization :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_estimatedAverageUtilization :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_estimatedAverageUtilization = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
estimatedAverageUtilization :: Maybe Text
$sel:estimatedAverageUtilization:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
estimatedAverageUtilization} -> Maybe Text
estimatedAverageUtilization) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:estimatedAverageUtilization:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
estimatedAverageUtilization = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

-- | The recommended hourly commitment level for the Savings Plans type and
-- the configuration that\'s based on the usage during the lookback period.
savingsPlansPurchaseRecommendationDetail_hourlyCommitmentToPurchase :: Lens.Lens' SavingsPlansPurchaseRecommendationDetail (Prelude.Maybe Prelude.Text)
savingsPlansPurchaseRecommendationDetail_hourlyCommitmentToPurchase :: (Maybe Text -> f (Maybe Text))
-> SavingsPlansPurchaseRecommendationDetail
-> f SavingsPlansPurchaseRecommendationDetail
savingsPlansPurchaseRecommendationDetail_hourlyCommitmentToPurchase = (SavingsPlansPurchaseRecommendationDetail -> Maybe Text)
-> (SavingsPlansPurchaseRecommendationDetail
    -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Lens
     SavingsPlansPurchaseRecommendationDetail
     SavingsPlansPurchaseRecommendationDetail
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SavingsPlansPurchaseRecommendationDetail' {Maybe Text
hourlyCommitmentToPurchase :: Maybe Text
$sel:hourlyCommitmentToPurchase:SavingsPlansPurchaseRecommendationDetail' :: SavingsPlansPurchaseRecommendationDetail -> Maybe Text
hourlyCommitmentToPurchase} -> Maybe Text
hourlyCommitmentToPurchase) (\s :: SavingsPlansPurchaseRecommendationDetail
s@SavingsPlansPurchaseRecommendationDetail' {} Maybe Text
a -> SavingsPlansPurchaseRecommendationDetail
s {$sel:hourlyCommitmentToPurchase:SavingsPlansPurchaseRecommendationDetail' :: Maybe Text
hourlyCommitmentToPurchase = Maybe Text
a} :: SavingsPlansPurchaseRecommendationDetail)

instance
  Core.FromJSON
    SavingsPlansPurchaseRecommendationDetail
  where
  parseJSON :: Value -> Parser SavingsPlansPurchaseRecommendationDetail
parseJSON =
    String
-> (Object -> Parser SavingsPlansPurchaseRecommendationDetail)
-> Value
-> Parser SavingsPlansPurchaseRecommendationDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SavingsPlansPurchaseRecommendationDetail"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe SavingsPlansDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SavingsPlansPurchaseRecommendationDetail
SavingsPlansPurchaseRecommendationDetail'
            (Maybe Text
 -> Maybe Text
 -> Maybe SavingsPlansDetails
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SavingsPlansDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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 SavingsPlansDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe SavingsPlansDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
"CurrentAverageHourlyOnDemandSpend")
            Parser
  (Maybe SavingsPlansDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe SavingsPlansDetails)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SavingsPlansDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SavingsPlansDetails")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
"CurrentMinimumHourlyOnDemandSpend")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
"CurrentMaximumHourlyOnDemandSpend")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
"EstimatedOnDemandCost")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
"UpfrontCost")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> SavingsPlansPurchaseRecommendationDetail)
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
"EstimatedSPCost")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
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 -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
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
"EstimatedAverageUtilization")
            Parser (Maybe Text -> SavingsPlansPurchaseRecommendationDetail)
-> Parser (Maybe Text)
-> Parser SavingsPlansPurchaseRecommendationDetail
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
    SavingsPlansPurchaseRecommendationDetail

instance
  Prelude.NFData
    SavingsPlansPurchaseRecommendationDetail