{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CostExplorer.Types.ReservationAggregates where

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

-- | The aggregated numbers for your reservation usage.
--
-- /See:/ 'newReservationAggregates' smart constructor.
data ReservationAggregates = ReservationAggregates'
  { -- | The monthly cost of your reservation. It\'s amortized over the
    -- reservation period.
    ReservationAggregates -> Maybe Text
amortizedRecurringFee :: 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,
    -- | 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 many reservation hours that you purchased.
    ReservationAggregates -> Maybe Text
purchasedHours :: 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 cost of unused hours for your reservation.
    ReservationAggregates -> Maybe Text
rICostForUnusedHours :: Prelude.Maybe Prelude.Text,
    -- | The realized savings because of purchasing and using a reservation.
    ReservationAggregates -> Maybe Text
realizedSavings :: Prelude.Maybe Prelude.Text,
    -- | The total number of reservation hours that you used.
    ReservationAggregates -> Maybe Text
totalActualHours :: 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,
    -- | The total cost of your reservation. It\'s amortized over the reservation
    -- period.
    ReservationAggregates -> Maybe Text
totalAmortizedFee :: Prelude.Maybe Prelude.Text,
    -- | How much you might save if you use your entire reservation.
    ReservationAggregates -> Maybe Text
totalPotentialRISavings :: Prelude.Maybe Prelude.Text,
    -- | The unrealized savings because of purchasing and using a reservation.
    ReservationAggregates -> Maybe Text
unrealizedSavings :: Prelude.Maybe Prelude.Text,
    -- | The number of reservation hours that you didn\'t use.
    ReservationAggregates -> Maybe Text
unusedHours :: 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 percentage of reservation time that you used.
    ReservationAggregates -> Maybe Text
utilizationPercentage :: 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
  }
  deriving (ReservationAggregates -> ReservationAggregates -> Bool
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]
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
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. 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:
--
-- 'amortizedRecurringFee', 'reservationAggregates_amortizedRecurringFee' - The monthly cost of your reservation. It\'s amortized over the
-- reservation period.
--
-- 'amortizedUpfrontFee', 'reservationAggregates_amortizedUpfrontFee' - The upfront cost of your reservation. It\'s amortized over the
-- reservation period.
--
-- '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.
--
-- 'purchasedHours', 'reservationAggregates_purchasedHours' - How many reservation hours that you purchased.
--
-- '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.
--
-- 'rICostForUnusedHours', 'reservationAggregates_rICostForUnusedHours' - The cost of unused hours for your reservation.
--
-- 'realizedSavings', 'reservationAggregates_realizedSavings' - The realized savings because of purchasing and using a reservation.
--
-- 'totalActualHours', 'reservationAggregates_totalActualHours' - The total number of reservation hours that you used.
--
-- '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.
--
-- 'totalAmortizedFee', 'reservationAggregates_totalAmortizedFee' - The total cost of your reservation. It\'s amortized over the reservation
-- period.
--
-- 'totalPotentialRISavings', 'reservationAggregates_totalPotentialRISavings' - How much you might save if you use your entire reservation.
--
-- 'unrealizedSavings', 'reservationAggregates_unrealizedSavings' - The unrealized savings because of purchasing and using a reservation.
--
-- 'unusedHours', 'reservationAggregates_unusedHours' - The number of reservation hours that you didn\'t use.
--
-- '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.
--
-- 'utilizationPercentage', 'reservationAggregates_utilizationPercentage' - The percentage of reservation time that you used.
--
-- '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.
newReservationAggregates ::
  ReservationAggregates
newReservationAggregates :: ReservationAggregates
newReservationAggregates =
  ReservationAggregates'
    { $sel:amortizedRecurringFee:ReservationAggregates' :: Maybe Text
amortizedRecurringFee =
        forall a. Maybe a
Prelude.Nothing,
      $sel:amortizedUpfrontFee:ReservationAggregates' :: Maybe Text
amortizedUpfrontFee = forall a. Maybe a
Prelude.Nothing,
      $sel:netRISavings:ReservationAggregates' :: Maybe Text
netRISavings = forall a. Maybe a
Prelude.Nothing,
      $sel:onDemandCostOfRIHoursUsed:ReservationAggregates' :: Maybe Text
onDemandCostOfRIHoursUsed = forall a. Maybe a
Prelude.Nothing,
      $sel:purchasedHours:ReservationAggregates' :: Maybe Text
purchasedHours = forall a. Maybe a
Prelude.Nothing,
      $sel:purchasedUnits:ReservationAggregates' :: Maybe Text
purchasedUnits = forall a. Maybe a
Prelude.Nothing,
      $sel:rICostForUnusedHours:ReservationAggregates' :: Maybe Text
rICostForUnusedHours = forall a. Maybe a
Prelude.Nothing,
      $sel:realizedSavings:ReservationAggregates' :: Maybe Text
realizedSavings = forall a. Maybe a
Prelude.Nothing,
      $sel:totalActualHours:ReservationAggregates' :: Maybe Text
totalActualHours = forall a. Maybe a
Prelude.Nothing,
      $sel:totalActualUnits:ReservationAggregates' :: Maybe Text
totalActualUnits = forall a. Maybe a
Prelude.Nothing,
      $sel:totalAmortizedFee:ReservationAggregates' :: Maybe Text
totalAmortizedFee = forall a. Maybe a
Prelude.Nothing,
      $sel:totalPotentialRISavings:ReservationAggregates' :: Maybe Text
totalPotentialRISavings = forall a. Maybe a
Prelude.Nothing,
      $sel:unrealizedSavings:ReservationAggregates' :: Maybe Text
unrealizedSavings = forall a. Maybe a
Prelude.Nothing,
      $sel:unusedHours:ReservationAggregates' :: Maybe Text
unusedHours = forall a. Maybe a
Prelude.Nothing,
      $sel:unusedUnits:ReservationAggregates' :: Maybe Text
unusedUnits = forall a. Maybe a
Prelude.Nothing,
      $sel:utilizationPercentage:ReservationAggregates' :: Maybe Text
utilizationPercentage = forall a. Maybe a
Prelude.Nothing,
      $sel:utilizationPercentageInUnits:ReservationAggregates' :: Maybe Text
utilizationPercentageInUnits = forall a. Maybe a
Prelude.Nothing
    }

-- | The monthly cost of your reservation. It\'s amortized over the
-- reservation period.
reservationAggregates_amortizedRecurringFee :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_amortizedRecurringFee :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_amortizedRecurringFee = 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 upfront cost of your reservation. It\'s amortized over the
-- reservation period.
reservationAggregates_amortizedUpfrontFee :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_amortizedUpfrontFee :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_amortizedUpfrontFee = 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)

-- | 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 :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_netRISavings = 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 :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_onDemandCostOfRIHoursUsed = 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 many reservation hours that you purchased.
reservationAggregates_purchasedHours :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_purchasedHours :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_purchasedHours = 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 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 :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_purchasedUnits = 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 cost of unused hours for your reservation.
reservationAggregates_rICostForUnusedHours :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_rICostForUnusedHours :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_rICostForUnusedHours = 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 realized savings because of purchasing and using a reservation.
reservationAggregates_realizedSavings :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_realizedSavings :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_realizedSavings = 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 total number of reservation hours that you used.
reservationAggregates_totalActualHours :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_totalActualHours :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_totalActualHours = 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 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 :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_totalActualUnits = 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)

-- | The total cost of your reservation. It\'s amortized over the reservation
-- period.
reservationAggregates_totalAmortizedFee :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_totalAmortizedFee :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_totalAmortizedFee = 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)

-- | How much you might save if you use your entire reservation.
reservationAggregates_totalPotentialRISavings :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_totalPotentialRISavings :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_totalPotentialRISavings = 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 unrealized savings because of purchasing and using a reservation.
reservationAggregates_unrealizedSavings :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_unrealizedSavings :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_unrealizedSavings = 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 number of reservation hours that you didn\'t use.
reservationAggregates_unusedHours :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_unusedHours :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_unusedHours = 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 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 :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_unusedUnits = 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 percentage of reservation time that you used.
reservationAggregates_utilizationPercentage :: Lens.Lens' ReservationAggregates (Prelude.Maybe Prelude.Text)
reservationAggregates_utilizationPercentage :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_utilizationPercentage = 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 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 :: Lens' ReservationAggregates (Maybe Text)
reservationAggregates_utilizationPercentageInUnits = 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)

instance Data.FromJSON ReservationAggregates where
  parseJSON :: Value -> Parser ReservationAggregates
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.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'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AmortizedRecurringFee")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AmortizedUpfrontFee")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NetRISavings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OnDemandCostOfRIHoursUsed")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PurchasedHours")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PurchasedUnits")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RICostForUnusedHours")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RealizedSavings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TotalActualHours")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TotalActualUnits")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TotalAmortizedFee")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TotalPotentialRISavings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UnrealizedSavings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UnusedHours")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UnusedUnits")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UtilizationPercentage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UtilizationPercentageInUnits")
      )

instance Prelude.Hashable ReservationAggregates where
  hashWithSalt :: Int -> ReservationAggregates -> Int
hashWithSalt Int
_salt ReservationAggregates' {Maybe Text
utilizationPercentageInUnits :: Maybe Text
utilizationPercentage :: Maybe Text
unusedUnits :: Maybe Text
unusedHours :: Maybe Text
unrealizedSavings :: Maybe Text
totalPotentialRISavings :: Maybe Text
totalAmortizedFee :: Maybe Text
totalActualUnits :: Maybe Text
totalActualHours :: Maybe Text
realizedSavings :: Maybe Text
rICostForUnusedHours :: Maybe Text
purchasedUnits :: Maybe Text
purchasedHours :: Maybe Text
onDemandCostOfRIHoursUsed :: Maybe Text
netRISavings :: Maybe Text
amortizedUpfrontFee :: Maybe Text
amortizedRecurringFee :: Maybe Text
$sel:utilizationPercentageInUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:utilizationPercentage:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:unusedUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:unusedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:unrealizedSavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:totalPotentialRISavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:totalAmortizedFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:totalActualUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:totalActualHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:realizedSavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:rICostForUnusedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:purchasedUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:purchasedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:onDemandCostOfRIHoursUsed:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:netRISavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:amortizedUpfrontFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:amortizedRecurringFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
amortizedRecurringFee
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
amortizedUpfrontFee
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
netRISavings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
onDemandCostOfRIHoursUsed
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
purchasedHours
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
purchasedUnits
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
rICostForUnusedHours
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
realizedSavings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
totalActualHours
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
totalActualUnits
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
totalAmortizedFee
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
totalPotentialRISavings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
unrealizedSavings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
unusedHours
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
unusedUnits
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
utilizationPercentage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
utilizationPercentageInUnits

instance Prelude.NFData ReservationAggregates where
  rnf :: ReservationAggregates -> ()
rnf ReservationAggregates' {Maybe Text
utilizationPercentageInUnits :: Maybe Text
utilizationPercentage :: Maybe Text
unusedUnits :: Maybe Text
unusedHours :: Maybe Text
unrealizedSavings :: Maybe Text
totalPotentialRISavings :: Maybe Text
totalAmortizedFee :: Maybe Text
totalActualUnits :: Maybe Text
totalActualHours :: Maybe Text
realizedSavings :: Maybe Text
rICostForUnusedHours :: Maybe Text
purchasedUnits :: Maybe Text
purchasedHours :: Maybe Text
onDemandCostOfRIHoursUsed :: Maybe Text
netRISavings :: Maybe Text
amortizedUpfrontFee :: Maybe Text
amortizedRecurringFee :: Maybe Text
$sel:utilizationPercentageInUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:utilizationPercentage:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:unusedUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:unusedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:unrealizedSavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:totalPotentialRISavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:totalAmortizedFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:totalActualUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:totalActualHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:realizedSavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:rICostForUnusedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:purchasedUnits:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:purchasedHours:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:onDemandCostOfRIHoursUsed:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:netRISavings:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:amortizedUpfrontFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
$sel:amortizedRecurringFee:ReservationAggregates' :: ReservationAggregates -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
amortizedRecurringFee
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
amortizedUpfrontFee
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
netRISavings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
onDemandCostOfRIHoursUsed
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
purchasedHours
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
purchasedUnits
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
rICostForUnusedHours
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
realizedSavings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
totalActualHours
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
totalActualUnits
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
totalAmortizedFee
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
totalPotentialRISavings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
unrealizedSavings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
unusedHours
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
unusedUnits
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
utilizationPercentage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
utilizationPercentageInUnits