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

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

-- | The aggregated numbers for your reservation usage.
--
-- /See:/ 'newReservationAggregates' smart constructor.
data ReservationAggregates = ReservationAggregates'
  { -- | How many reservation hours that you purchased.
    ReservationAggregates -> Maybe Text
purchasedHours :: Prelude.Maybe Prelude.Text,
    -- | The total number of reservation hours that you used.
    ReservationAggregates -> Maybe Text
totalActualHours :: Prelude.Maybe Prelude.Text,
    -- | The percentage of reservation time that you used.
    ReservationAggregates -> Maybe Text
utilizationPercentage :: Prelude.Maybe Prelude.Text,
    -- | The total cost of your reservation. It\'s amortized over the reservation
    -- period.
    ReservationAggregates -> Maybe Text
totalAmortizedFee :: Prelude.Maybe Prelude.Text,
    -- | The number of Amazon EC2 reservation hours that you didn\'t use. It\'s
    -- converted to normalized units. Normalized units are available only for
    -- Amazon EC2 usage after November 11, 2017.
    ReservationAggregates -> Maybe Text
unusedUnits :: Prelude.Maybe Prelude.Text,
    -- | The unrealized savings because of purchasing and using a reservation.
    ReservationAggregates -> Maybe Text
unrealizedSavings :: Prelude.Maybe Prelude.Text,
    -- | The cost of unused hours for your reservation.
    ReservationAggregates -> Maybe Text
rICostForUnusedHours :: Prelude.Maybe Prelude.Text,
    -- | The number of reservation hours that you didn\'t use.
    ReservationAggregates -> Maybe Text
unusedHours :: Prelude.Maybe Prelude.Text,
    -- | The realized savings because of purchasing and using a reservation.
    ReservationAggregates -> Maybe Text
realizedSavings :: Prelude.Maybe Prelude.Text,
    -- | The number of Amazon EC2 reservation hours that you purchased. It\'s
    -- converted to normalized units. Normalized units are available only for
    -- Amazon EC2 usage after November 11, 2017.
    ReservationAggregates -> Maybe Text
purchasedUnits :: Prelude.Maybe Prelude.Text,
    -- | The upfront cost of your reservation. It\'s amortized over the
    -- reservation period.
    ReservationAggregates -> Maybe Text
amortizedUpfrontFee :: Prelude.Maybe Prelude.Text,
    -- | The monthly cost of your reservation. It\'s amortized over the
    -- reservation period.
    ReservationAggregates -> Maybe Text
amortizedRecurringFee :: Prelude.Maybe Prelude.Text,
    -- | The percentage of Amazon EC2 reservation time that you used. It\'s
    -- converted to normalized units. Normalized units are available only for
    -- Amazon EC2 usage after November 11, 2017.
    ReservationAggregates -> Maybe Text
utilizationPercentageInUnits :: Prelude.Maybe Prelude.Text,
    -- | How much you saved due to purchasing and utilizing reservation. Amazon
    -- Web Services calculates this by subtracting @TotalAmortizedFee@ from
    -- @OnDemandCostOfRIHoursUsed@.
    ReservationAggregates -> Maybe Text
netRISavings :: Prelude.Maybe Prelude.Text,
    -- | How much your reservation costs if charged On-Demand rates.
    ReservationAggregates -> Maybe Text
onDemandCostOfRIHoursUsed :: Prelude.Maybe Prelude.Text,
    -- | How much you might save if you use your entire reservation.
    ReservationAggregates -> Maybe Text
totalPotentialRISavings :: Prelude.Maybe Prelude.Text,
    -- | The total number of Amazon EC2 reservation hours that you used. It\'s
    -- converted to normalized units. Normalized units are available only for
    -- Amazon EC2 usage after November 11, 2017.
    ReservationAggregates -> Maybe Text
totalActualUnits :: Prelude.Maybe Prelude.Text
  }
  deriving (ReservationAggregates -> ReservationAggregates -> Bool
(ReservationAggregates -> ReservationAggregates -> Bool)
-> (ReservationAggregates -> ReservationAggregates -> Bool)
-> Eq ReservationAggregates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservationAggregates -> ReservationAggregates -> Bool
$c/= :: ReservationAggregates -> ReservationAggregates -> Bool
== :: ReservationAggregates -> ReservationAggregates -> Bool
$c== :: ReservationAggregates -> ReservationAggregates -> Bool
Prelude.Eq, ReadPrec [ReservationAggregates]
ReadPrec ReservationAggregates
Int -> ReadS ReservationAggregates
ReadS [ReservationAggregates]
(Int -> ReadS ReservationAggregates)
-> ReadS [ReservationAggregates]
-> ReadPrec ReservationAggregates
-> ReadPrec [ReservationAggregates]
-> Read ReservationAggregates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservationAggregates]
$creadListPrec :: ReadPrec [ReservationAggregates]
readPrec :: ReadPrec ReservationAggregates
$creadPrec :: ReadPrec ReservationAggregates
readList :: ReadS [ReservationAggregates]
$creadList :: ReadS [ReservationAggregates]
readsPrec :: Int -> ReadS ReservationAggregates
$creadsPrec :: Int -> ReadS ReservationAggregates
Prelude.Read, Int -> ReservationAggregates -> ShowS
[ReservationAggregates] -> ShowS
ReservationAggregates -> String
(Int -> ReservationAggregates -> ShowS)
-> (ReservationAggregates -> String)
-> ([ReservationAggregates] -> ShowS)
-> Show ReservationAggregates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservationAggregates] -> ShowS
$cshowList :: [ReservationAggregates] -> ShowS
show :: ReservationAggregates -> String
$cshow :: ReservationAggregates -> String
showsPrec :: Int -> ReservationAggregates -> ShowS
$cshowsPrec :: Int -> ReservationAggregates -> ShowS
Prelude.Show, (forall x. ReservationAggregates -> Rep ReservationAggregates x)
-> (forall x. Rep ReservationAggregates x -> ReservationAggregates)
-> Generic ReservationAggregates
forall x. Rep ReservationAggregates x -> ReservationAggregates
forall x. ReservationAggregates -> Rep ReservationAggregates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReservationAggregates x -> ReservationAggregates
$cfrom :: forall x. ReservationAggregates -> Rep ReservationAggregates x
Prelude.Generic)

-- |
-- Create a value of 'ReservationAggregates' 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:
--
-- 'purchasedHours', 'reservationAggregates_purchasedHours' - How many reservation hours that you purchased.
--
-- 'totalActualHours', 'reservationAggregates_totalActualHours' - The total number of reservation hours that you used.
--
-- 'utilizationPercentage', 'reservationAggregates_utilizationPercentage' - The percentage of reservation time that you used.
--
-- 'totalAmortizedFee', 'reservationAggregates_totalAmortizedFee' - The total cost of your reservation. It\'s amortized over the reservation
-- period.
--
-- 'unusedUnits', 'reservationAggregates_unusedUnits' - The number of Amazon EC2 reservation hours that you didn\'t use. It\'s
-- converted to normalized units. Normalized units are available only for
-- Amazon EC2 usage after November 11, 2017.
--
-- 'unrealizedSavings', 'reservationAggregates_unrealizedSavings' - The unrealized savings because of purchasing and using a reservation.
--
-- 'rICostForUnusedHours', 'reservationAggregates_rICostForUnusedHours' - The cost of unused hours for your reservation.
--
-- 'unusedHours', 'reservationAggregates_unusedHours' - The number of reservation hours that you didn\'t use.
--
-- 'realizedSavings', 'reservationAggregates_realizedSavings' - The realized savings because of purchasing and using a reservation.
--
-- 'purchasedUnits', 'reservationAggregates_purchasedUnits' - The number of Amazon EC2 reservation hours that you purchased. It\'s
-- converted to normalized units. Normalized units are available only for
-- Amazon EC2 usage after November 11, 2017.
--
-- 'amortizedUpfrontFee', 'reservationAggregates_amortizedUpfrontFee' - The upfront cost of your reservation. It\'s amortized over the
-- reservation period.
--
-- 'amortizedRecurringFee', 'reservationAggregates_amortizedRecurringFee' - The monthly cost of your reservation. It\'s amortized over the
-- reservation period.
--
-- 'utilizationPercentageInUnits', 'reservationAggregates_utilizationPercentageInUnits' - The percentage of Amazon EC2 reservation time that you used. It\'s
-- converted to normalized units. Normalized units are available only for
-- Amazon EC2 usage after November 11, 2017.
--
-- 'netRISavings', 'reservationAggregates_netRISavings' - How much you saved due to purchasing and utilizing reservation. Amazon
-- Web Services calculates this by subtracting @TotalAmortizedFee@ from
-- @OnDemandCostOfRIHoursUsed@.
--
-- 'onDemandCostOfRIHoursUsed', 'reservationAggregates_onDemandCostOfRIHoursUsed' - How much your reservation costs if charged On-Demand rates.
--
-- 'totalPotentialRISavings', 'reservationAggregates_totalPotentialRISavings' - How much you might save if you use your entire reservation.
--
-- 'totalActualUnits', 'reservationAggregates_totalActualUnits' - The total number of Amazon EC2 reservation hours that you used. It\'s
-- converted to normalized units. Normalized units are available only for
-- Amazon EC2 usage after November 11, 2017.
newReservationAggregates ::
  ReservationAggregates
newReservationAggregates :: ReservationAggregates
newReservationAggregates =
  ReservationAggregates' :: 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
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReservationAggregates
ReservationAggregates'
    { $sel:purchasedHours:ReservationAggregates' :: Maybe Text
purchasedHours =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:totalActualHours:ReservationAggregates' :: Maybe Text
totalActualHours = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:utilizationPercentage:ReservationAggregates' :: Maybe Text
utilizationPercentage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:totalAmortizedFee:ReservationAggregates' :: Maybe Text
totalAmortizedFee = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:unusedUnits:ReservationAggregates' :: Maybe Text
unusedUnits = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:unrealizedSavings:ReservationAggregates' :: Maybe Text
unrealizedSavings = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:rICostForUnusedHours:ReservationAggregates' :: Maybe Text
rICostForUnusedHours = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:unusedHours:ReservationAggregates' :: Maybe Text
unusedHours = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:realizedSavings:ReservationAggregates' :: Maybe Text
realizedSavings = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:purchasedUnits:ReservationAggregates' :: Maybe Text
purchasedUnits = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:amortizedUpfrontFee:ReservationAggregates' :: Maybe Text
amortizedUpfrontFee = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:amortizedRecurringFee:ReservationAggregates' :: Maybe Text
amortizedRecurringFee = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:utilizationPercentageInUnits:ReservationAggregates' :: Maybe Text
utilizationPercentageInUnits = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:netRISavings:ReservationAggregates' :: Maybe Text
netRISavings = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:onDemandCostOfRIHoursUsed:ReservationAggregates' :: Maybe Text
onDemandCostOfRIHoursUsed = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:totalPotentialRISavings:ReservationAggregates' :: Maybe Text
totalPotentialRISavings = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:totalActualUnits:ReservationAggregates' :: Maybe Text
totalActualUnits = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | How many reservation hours that you purchased.
reservationAggregates_purchasedHours :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_purchasedHours :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_purchasedHours = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
purchasedHours :: Maybe Text
$sel:purchasedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
purchasedHours} -> Maybe Text
purchasedHours) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:purchasedHours:ReservationAggregates' :: Maybe Text
purchasedHours = Maybe Text
a} :: ReservationAggregates)

-- | The total number of reservation hours that you used.
reservationAggregates_totalActualHours :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_totalActualHours :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_totalActualHours = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
totalActualHours :: Maybe Text
$sel:totalActualHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
totalActualHours} -> Maybe Text
totalActualHours) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:totalActualHours:ReservationAggregates' :: Maybe Text
totalActualHours = Maybe Text
a} :: ReservationAggregates)

-- | The percentage of reservation time that you used.
reservationAggregates_utilizationPercentage :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_utilizationPercentage :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_utilizationPercentage = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
utilizationPercentage :: Maybe Text
$sel:utilizationPercentage:ReservationAggregates' :: ReservationAggregates -> Maybe Text
utilizationPercentage} -> Maybe Text
utilizationPercentage) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:utilizationPercentage:ReservationAggregates' :: Maybe Text
utilizationPercentage = Maybe Text
a} :: ReservationAggregates)

-- | The total cost of your reservation. It\'s amortized over the reservation
-- period.
reservationAggregates_totalAmortizedFee :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_totalAmortizedFee :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_totalAmortizedFee = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
totalAmortizedFee :: Maybe Text
$sel:totalAmortizedFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
totalAmortizedFee} -> Maybe Text
totalAmortizedFee) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:totalAmortizedFee:ReservationAggregates' :: Maybe Text
totalAmortizedFee = Maybe Text
a} :: ReservationAggregates)

-- | The number of Amazon EC2 reservation hours that you didn\'t use. It\'s
-- converted to normalized units. Normalized units are available only for
-- Amazon EC2 usage after November 11, 2017.
reservationAggregates_unusedUnits :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_unusedUnits :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_unusedUnits = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
unusedUnits :: Maybe Text
$sel:unusedUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
unusedUnits} -> Maybe Text
unusedUnits) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:unusedUnits:ReservationAggregates' :: Maybe Text
unusedUnits = Maybe Text
a} :: ReservationAggregates)

-- | The unrealized savings because of purchasing and using a reservation.
reservationAggregates_unrealizedSavings :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_unrealizedSavings :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_unrealizedSavings = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
unrealizedSavings :: Maybe Text
$sel:unrealizedSavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
unrealizedSavings} -> Maybe Text
unrealizedSavings) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:unrealizedSavings:ReservationAggregates' :: Maybe Text
unrealizedSavings = Maybe Text
a} :: ReservationAggregates)

-- | The cost of unused hours for your reservation.
reservationAggregates_rICostForUnusedHours :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_rICostForUnusedHours :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_rICostForUnusedHours = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
rICostForUnusedHours :: Maybe Text
$sel:rICostForUnusedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
rICostForUnusedHours} -> Maybe Text
rICostForUnusedHours) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:rICostForUnusedHours:ReservationAggregates' :: Maybe Text
rICostForUnusedHours = Maybe Text
a} :: ReservationAggregates)

-- | The number of reservation hours that you didn\'t use.
reservationAggregates_unusedHours :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_unusedHours :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_unusedHours = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
unusedHours :: Maybe Text
$sel:unusedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
unusedHours} -> Maybe Text
unusedHours) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:unusedHours:ReservationAggregates' :: Maybe Text
unusedHours = Maybe Text
a} :: ReservationAggregates)

-- | The realized savings because of purchasing and using a reservation.
reservationAggregates_realizedSavings :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_realizedSavings :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_realizedSavings = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
realizedSavings :: Maybe Text
$sel:realizedSavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
realizedSavings} -> Maybe Text
realizedSavings) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:realizedSavings:ReservationAggregates' :: Maybe Text
realizedSavings = Maybe Text
a} :: ReservationAggregates)

-- | The number of Amazon EC2 reservation hours that you purchased. It\'s
-- converted to normalized units. Normalized units are available only for
-- Amazon EC2 usage after November 11, 2017.
reservationAggregates_purchasedUnits :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_purchasedUnits :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_purchasedUnits = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
purchasedUnits :: Maybe Text
$sel:purchasedUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
purchasedUnits} -> Maybe Text
purchasedUnits) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:purchasedUnits:ReservationAggregates' :: Maybe Text
purchasedUnits = Maybe Text
a} :: ReservationAggregates)

-- | The upfront cost of your reservation. It\'s amortized over the
-- reservation period.
reservationAggregates_amortizedUpfrontFee :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_amortizedUpfrontFee :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_amortizedUpfrontFee = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
amortizedUpfrontFee :: Maybe Text
$sel:amortizedUpfrontFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
amortizedUpfrontFee} -> Maybe Text
amortizedUpfrontFee) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:amortizedUpfrontFee:ReservationAggregates' :: Maybe Text
amortizedUpfrontFee = Maybe Text
a} :: ReservationAggregates)

-- | The monthly cost of your reservation. It\'s amortized over the
-- reservation period.
reservationAggregates_amortizedRecurringFee :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_amortizedRecurringFee :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_amortizedRecurringFee = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
amortizedRecurringFee :: Maybe Text
$sel:amortizedRecurringFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
amortizedRecurringFee} -> Maybe Text
amortizedRecurringFee) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:amortizedRecurringFee:ReservationAggregates' :: Maybe Text
amortizedRecurringFee = Maybe Text
a} :: ReservationAggregates)

-- | The percentage of Amazon EC2 reservation time that you used. It\'s
-- converted to normalized units. Normalized units are available only for
-- Amazon EC2 usage after November 11, 2017.
reservationAggregates_utilizationPercentageInUnits :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_utilizationPercentageInUnits :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_utilizationPercentageInUnits = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
utilizationPercentageInUnits :: Maybe Text
$sel:utilizationPercentageInUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
utilizationPercentageInUnits} -> Maybe Text
utilizationPercentageInUnits) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:utilizationPercentageInUnits:ReservationAggregates' :: Maybe Text
utilizationPercentageInUnits = Maybe Text
a} :: ReservationAggregates)

-- | How much you saved due to purchasing and utilizing reservation. Amazon
-- Web Services calculates this by subtracting @TotalAmortizedFee@ from
-- @OnDemandCostOfRIHoursUsed@.
reservationAggregates_netRISavings :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_netRISavings :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_netRISavings = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
netRISavings :: Maybe Text
$sel:netRISavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
netRISavings} -> Maybe Text
netRISavings) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:netRISavings:ReservationAggregates' :: Maybe Text
netRISavings = Maybe Text
a} :: ReservationAggregates)

-- | How much your reservation costs if charged On-Demand rates.
reservationAggregates_onDemandCostOfRIHoursUsed :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_onDemandCostOfRIHoursUsed :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_onDemandCostOfRIHoursUsed = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
onDemandCostOfRIHoursUsed :: Maybe Text
$sel:onDemandCostOfRIHoursUsed:ReservationAggregates' :: ReservationAggregates -> Maybe Text
onDemandCostOfRIHoursUsed} -> Maybe Text
onDemandCostOfRIHoursUsed) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:onDemandCostOfRIHoursUsed:ReservationAggregates' :: Maybe Text
onDemandCostOfRIHoursUsed = Maybe Text
a} :: ReservationAggregates)

-- | How much you might save if you use your entire reservation.
reservationAggregates_totalPotentialRISavings :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_totalPotentialRISavings :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_totalPotentialRISavings = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
totalPotentialRISavings :: Maybe Text
$sel:totalPotentialRISavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
totalPotentialRISavings} -> Maybe Text
totalPotentialRISavings) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:totalPotentialRISavings:ReservationAggregates' :: Maybe Text
totalPotentialRISavings = Maybe Text
a} :: ReservationAggregates)

-- | The total number of Amazon EC2 reservation hours that you used. It\'s
-- converted to normalized units. Normalized units are available only for
-- Amazon EC2 usage after November 11, 2017.
reservationAggregates_totalActualUnits :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_totalActualUnits :: (Maybe Text -> f (Maybe Text))
-> ReservationAggregates -> f ReservationAggregates
reservationAggregates_totalActualUnits = (ReservationAggregates -> Maybe Text)
-> (ReservationAggregates -> Maybe Text -> ReservationAggregates)
-> Lens
     ReservationAggregates
     ReservationAggregates
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationAggregates' {Maybe Text
totalActualUnits :: Maybe Text
$sel:totalActualUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
totalActualUnits} -> Maybe Text
totalActualUnits) (\s :: ReservationAggregates
s@ReservationAggregates' {} Maybe Text
a -> ReservationAggregates
s {$sel:totalActualUnits:ReservationAggregates' :: Maybe Text
totalActualUnits = Maybe Text
a} :: ReservationAggregates)

instance Core.FromJSON ReservationAggregates where
  parseJSON :: Value -> Parser ReservationAggregates
parseJSON =
    String
-> (Object -> Parser ReservationAggregates)
-> Value
-> Parser ReservationAggregates
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReservationAggregates"
      ( \Object
x ->
          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
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ReservationAggregates
ReservationAggregates'
            (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
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> ReservationAggregates)
-> 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
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"PurchasedHours")
            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
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> 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
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"TotalActualHours")
            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
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> 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
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"UtilizationPercentage")
            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
   -> Maybe Text
   -> ReservationAggregates)
-> 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
      -> Maybe Text
      -> ReservationAggregates)
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
"TotalAmortizedFee")
            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
   -> ReservationAggregates)
-> 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
      -> ReservationAggregates)
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
"UnusedUnits")
            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
   -> ReservationAggregates)
-> 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
      -> ReservationAggregates)
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
"UnrealizedSavings")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"RICostForUnusedHours")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"UnusedHours")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"RealizedSavings")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"PurchasedUnits")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"AmortizedUpfrontFee")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> ReservationAggregates)
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
"AmortizedRecurringFee")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> ReservationAggregates)
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
"UtilizationPercentageInUnits")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> ReservationAggregates)
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
"NetRISavings")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ReservationAggregates)
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
"OnDemandCostOfRIHoursUsed")
            Parser (Maybe Text -> Maybe Text -> ReservationAggregates)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ReservationAggregates)
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
"TotalPotentialRISavings")
            Parser (Maybe Text -> ReservationAggregates)
-> Parser (Maybe Text) -> Parser ReservationAggregates
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
"TotalActualUnits")
      )

instance Prelude.Hashable ReservationAggregates

instance Prelude.NFData ReservationAggregates