{-# 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.Budgets.Types.BudgetPerformanceHistory
-- 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.Budgets.Types.BudgetPerformanceHistory where

import Amazonka.Budgets.Types.BudgetType
import Amazonka.Budgets.Types.BudgetedAndActualAmounts
import Amazonka.Budgets.Types.CostTypes
import Amazonka.Budgets.Types.TimeUnit
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A history of the state of a budget at the end of the budget\'s specified
-- time period.
--
-- /See:/ 'newBudgetPerformanceHistory' smart constructor.
data BudgetPerformanceHistory = BudgetPerformanceHistory'
  { -- | A list of amounts of cost or usage that you created budgets for,
    -- compared to your actual costs or usage.
    BudgetPerformanceHistory -> Maybe [BudgetedAndActualAmounts]
budgetedAndActualAmountsList :: Prelude.Maybe [BudgetedAndActualAmounts],
    BudgetPerformanceHistory -> Maybe TimeUnit
timeUnit :: Prelude.Maybe TimeUnit,
    BudgetPerformanceHistory -> Maybe Text
budgetName :: Prelude.Maybe Prelude.Text,
    BudgetPerformanceHistory -> Maybe BudgetType
budgetType :: Prelude.Maybe BudgetType,
    -- | The history of the cost types for a budget during the specified time
    -- period.
    BudgetPerformanceHistory -> Maybe CostTypes
costTypes :: Prelude.Maybe CostTypes,
    -- | The history of the cost filters for a budget during the specified time
    -- period.
    BudgetPerformanceHistory -> Maybe (HashMap Text [Text])
costFilters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text])
  }
  deriving (BudgetPerformanceHistory -> BudgetPerformanceHistory -> Bool
(BudgetPerformanceHistory -> BudgetPerformanceHistory -> Bool)
-> (BudgetPerformanceHistory -> BudgetPerformanceHistory -> Bool)
-> Eq BudgetPerformanceHistory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BudgetPerformanceHistory -> BudgetPerformanceHistory -> Bool
$c/= :: BudgetPerformanceHistory -> BudgetPerformanceHistory -> Bool
== :: BudgetPerformanceHistory -> BudgetPerformanceHistory -> Bool
$c== :: BudgetPerformanceHistory -> BudgetPerformanceHistory -> Bool
Prelude.Eq, ReadPrec [BudgetPerformanceHistory]
ReadPrec BudgetPerformanceHistory
Int -> ReadS BudgetPerformanceHistory
ReadS [BudgetPerformanceHistory]
(Int -> ReadS BudgetPerformanceHistory)
-> ReadS [BudgetPerformanceHistory]
-> ReadPrec BudgetPerformanceHistory
-> ReadPrec [BudgetPerformanceHistory]
-> Read BudgetPerformanceHistory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BudgetPerformanceHistory]
$creadListPrec :: ReadPrec [BudgetPerformanceHistory]
readPrec :: ReadPrec BudgetPerformanceHistory
$creadPrec :: ReadPrec BudgetPerformanceHistory
readList :: ReadS [BudgetPerformanceHistory]
$creadList :: ReadS [BudgetPerformanceHistory]
readsPrec :: Int -> ReadS BudgetPerformanceHistory
$creadsPrec :: Int -> ReadS BudgetPerformanceHistory
Prelude.Read, Int -> BudgetPerformanceHistory -> ShowS
[BudgetPerformanceHistory] -> ShowS
BudgetPerformanceHistory -> String
(Int -> BudgetPerformanceHistory -> ShowS)
-> (BudgetPerformanceHistory -> String)
-> ([BudgetPerformanceHistory] -> ShowS)
-> Show BudgetPerformanceHistory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BudgetPerformanceHistory] -> ShowS
$cshowList :: [BudgetPerformanceHistory] -> ShowS
show :: BudgetPerformanceHistory -> String
$cshow :: BudgetPerformanceHistory -> String
showsPrec :: Int -> BudgetPerformanceHistory -> ShowS
$cshowsPrec :: Int -> BudgetPerformanceHistory -> ShowS
Prelude.Show, (forall x.
 BudgetPerformanceHistory -> Rep BudgetPerformanceHistory x)
-> (forall x.
    Rep BudgetPerformanceHistory x -> BudgetPerformanceHistory)
-> Generic BudgetPerformanceHistory
forall x.
Rep BudgetPerformanceHistory x -> BudgetPerformanceHistory
forall x.
BudgetPerformanceHistory -> Rep BudgetPerformanceHistory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BudgetPerformanceHistory x -> BudgetPerformanceHistory
$cfrom :: forall x.
BudgetPerformanceHistory -> Rep BudgetPerformanceHistory x
Prelude.Generic)

-- |
-- Create a value of 'BudgetPerformanceHistory' 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:
--
-- 'budgetedAndActualAmountsList', 'budgetPerformanceHistory_budgetedAndActualAmountsList' - A list of amounts of cost or usage that you created budgets for,
-- compared to your actual costs or usage.
--
-- 'timeUnit', 'budgetPerformanceHistory_timeUnit' - Undocumented member.
--
-- 'budgetName', 'budgetPerformanceHistory_budgetName' - Undocumented member.
--
-- 'budgetType', 'budgetPerformanceHistory_budgetType' - Undocumented member.
--
-- 'costTypes', 'budgetPerformanceHistory_costTypes' - The history of the cost types for a budget during the specified time
-- period.
--
-- 'costFilters', 'budgetPerformanceHistory_costFilters' - The history of the cost filters for a budget during the specified time
-- period.
newBudgetPerformanceHistory ::
  BudgetPerformanceHistory
newBudgetPerformanceHistory :: BudgetPerformanceHistory
newBudgetPerformanceHistory =
  BudgetPerformanceHistory' :: Maybe [BudgetedAndActualAmounts]
-> Maybe TimeUnit
-> Maybe Text
-> Maybe BudgetType
-> Maybe CostTypes
-> Maybe (HashMap Text [Text])
-> BudgetPerformanceHistory
BudgetPerformanceHistory'
    { $sel:budgetedAndActualAmountsList:BudgetPerformanceHistory' :: Maybe [BudgetedAndActualAmounts]
budgetedAndActualAmountsList =
        Maybe [BudgetedAndActualAmounts]
forall a. Maybe a
Prelude.Nothing,
      $sel:timeUnit:BudgetPerformanceHistory' :: Maybe TimeUnit
timeUnit = Maybe TimeUnit
forall a. Maybe a
Prelude.Nothing,
      $sel:budgetName:BudgetPerformanceHistory' :: Maybe Text
budgetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:budgetType:BudgetPerformanceHistory' :: Maybe BudgetType
budgetType = Maybe BudgetType
forall a. Maybe a
Prelude.Nothing,
      $sel:costTypes:BudgetPerformanceHistory' :: Maybe CostTypes
costTypes = Maybe CostTypes
forall a. Maybe a
Prelude.Nothing,
      $sel:costFilters:BudgetPerformanceHistory' :: Maybe (HashMap Text [Text])
costFilters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing
    }

-- | A list of amounts of cost or usage that you created budgets for,
-- compared to your actual costs or usage.
budgetPerformanceHistory_budgetedAndActualAmountsList :: Lens.Lens' BudgetPerformanceHistory (Prelude.Maybe [BudgetedAndActualAmounts])
budgetPerformanceHistory_budgetedAndActualAmountsList :: (Maybe [BudgetedAndActualAmounts]
 -> f (Maybe [BudgetedAndActualAmounts]))
-> BudgetPerformanceHistory -> f BudgetPerformanceHistory
budgetPerformanceHistory_budgetedAndActualAmountsList = (BudgetPerformanceHistory -> Maybe [BudgetedAndActualAmounts])
-> (BudgetPerformanceHistory
    -> Maybe [BudgetedAndActualAmounts] -> BudgetPerformanceHistory)
-> Lens
     BudgetPerformanceHistory
     BudgetPerformanceHistory
     (Maybe [BudgetedAndActualAmounts])
     (Maybe [BudgetedAndActualAmounts])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BudgetPerformanceHistory' {Maybe [BudgetedAndActualAmounts]
budgetedAndActualAmountsList :: Maybe [BudgetedAndActualAmounts]
$sel:budgetedAndActualAmountsList:BudgetPerformanceHistory' :: BudgetPerformanceHistory -> Maybe [BudgetedAndActualAmounts]
budgetedAndActualAmountsList} -> Maybe [BudgetedAndActualAmounts]
budgetedAndActualAmountsList) (\s :: BudgetPerformanceHistory
s@BudgetPerformanceHistory' {} Maybe [BudgetedAndActualAmounts]
a -> BudgetPerformanceHistory
s {$sel:budgetedAndActualAmountsList:BudgetPerformanceHistory' :: Maybe [BudgetedAndActualAmounts]
budgetedAndActualAmountsList = Maybe [BudgetedAndActualAmounts]
a} :: BudgetPerformanceHistory) ((Maybe [BudgetedAndActualAmounts]
  -> f (Maybe [BudgetedAndActualAmounts]))
 -> BudgetPerformanceHistory -> f BudgetPerformanceHistory)
-> ((Maybe [BudgetedAndActualAmounts]
     -> f (Maybe [BudgetedAndActualAmounts]))
    -> Maybe [BudgetedAndActualAmounts]
    -> f (Maybe [BudgetedAndActualAmounts]))
-> (Maybe [BudgetedAndActualAmounts]
    -> f (Maybe [BudgetedAndActualAmounts]))
-> BudgetPerformanceHistory
-> f BudgetPerformanceHistory
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BudgetedAndActualAmounts]
  [BudgetedAndActualAmounts]
  [BudgetedAndActualAmounts]
  [BudgetedAndActualAmounts]
-> Iso
     (Maybe [BudgetedAndActualAmounts])
     (Maybe [BudgetedAndActualAmounts])
     (Maybe [BudgetedAndActualAmounts])
     (Maybe [BudgetedAndActualAmounts])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [BudgetedAndActualAmounts]
  [BudgetedAndActualAmounts]
  [BudgetedAndActualAmounts]
  [BudgetedAndActualAmounts]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
budgetPerformanceHistory_timeUnit :: Lens.Lens' BudgetPerformanceHistory (Prelude.Maybe TimeUnit)
budgetPerformanceHistory_timeUnit :: (Maybe TimeUnit -> f (Maybe TimeUnit))
-> BudgetPerformanceHistory -> f BudgetPerformanceHistory
budgetPerformanceHistory_timeUnit = (BudgetPerformanceHistory -> Maybe TimeUnit)
-> (BudgetPerformanceHistory
    -> Maybe TimeUnit -> BudgetPerformanceHistory)
-> Lens
     BudgetPerformanceHistory
     BudgetPerformanceHistory
     (Maybe TimeUnit)
     (Maybe TimeUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BudgetPerformanceHistory' {Maybe TimeUnit
timeUnit :: Maybe TimeUnit
$sel:timeUnit:BudgetPerformanceHistory' :: BudgetPerformanceHistory -> Maybe TimeUnit
timeUnit} -> Maybe TimeUnit
timeUnit) (\s :: BudgetPerformanceHistory
s@BudgetPerformanceHistory' {} Maybe TimeUnit
a -> BudgetPerformanceHistory
s {$sel:timeUnit:BudgetPerformanceHistory' :: Maybe TimeUnit
timeUnit = Maybe TimeUnit
a} :: BudgetPerformanceHistory)

-- | Undocumented member.
budgetPerformanceHistory_budgetName :: Lens.Lens' BudgetPerformanceHistory (Prelude.Maybe Prelude.Text)
budgetPerformanceHistory_budgetName :: (Maybe Text -> f (Maybe Text))
-> BudgetPerformanceHistory -> f BudgetPerformanceHistory
budgetPerformanceHistory_budgetName = (BudgetPerformanceHistory -> Maybe Text)
-> (BudgetPerformanceHistory
    -> Maybe Text -> BudgetPerformanceHistory)
-> Lens
     BudgetPerformanceHistory
     BudgetPerformanceHistory
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BudgetPerformanceHistory' {Maybe Text
budgetName :: Maybe Text
$sel:budgetName:BudgetPerformanceHistory' :: BudgetPerformanceHistory -> Maybe Text
budgetName} -> Maybe Text
budgetName) (\s :: BudgetPerformanceHistory
s@BudgetPerformanceHistory' {} Maybe Text
a -> BudgetPerformanceHistory
s {$sel:budgetName:BudgetPerformanceHistory' :: Maybe Text
budgetName = Maybe Text
a} :: BudgetPerformanceHistory)

-- | Undocumented member.
budgetPerformanceHistory_budgetType :: Lens.Lens' BudgetPerformanceHistory (Prelude.Maybe BudgetType)
budgetPerformanceHistory_budgetType :: (Maybe BudgetType -> f (Maybe BudgetType))
-> BudgetPerformanceHistory -> f BudgetPerformanceHistory
budgetPerformanceHistory_budgetType = (BudgetPerformanceHistory -> Maybe BudgetType)
-> (BudgetPerformanceHistory
    -> Maybe BudgetType -> BudgetPerformanceHistory)
-> Lens
     BudgetPerformanceHistory
     BudgetPerformanceHistory
     (Maybe BudgetType)
     (Maybe BudgetType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BudgetPerformanceHistory' {Maybe BudgetType
budgetType :: Maybe BudgetType
$sel:budgetType:BudgetPerformanceHistory' :: BudgetPerformanceHistory -> Maybe BudgetType
budgetType} -> Maybe BudgetType
budgetType) (\s :: BudgetPerformanceHistory
s@BudgetPerformanceHistory' {} Maybe BudgetType
a -> BudgetPerformanceHistory
s {$sel:budgetType:BudgetPerformanceHistory' :: Maybe BudgetType
budgetType = Maybe BudgetType
a} :: BudgetPerformanceHistory)

-- | The history of the cost types for a budget during the specified time
-- period.
budgetPerformanceHistory_costTypes :: Lens.Lens' BudgetPerformanceHistory (Prelude.Maybe CostTypes)
budgetPerformanceHistory_costTypes :: (Maybe CostTypes -> f (Maybe CostTypes))
-> BudgetPerformanceHistory -> f BudgetPerformanceHistory
budgetPerformanceHistory_costTypes = (BudgetPerformanceHistory -> Maybe CostTypes)
-> (BudgetPerformanceHistory
    -> Maybe CostTypes -> BudgetPerformanceHistory)
-> Lens
     BudgetPerformanceHistory
     BudgetPerformanceHistory
     (Maybe CostTypes)
     (Maybe CostTypes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BudgetPerformanceHistory' {Maybe CostTypes
costTypes :: Maybe CostTypes
$sel:costTypes:BudgetPerformanceHistory' :: BudgetPerformanceHistory -> Maybe CostTypes
costTypes} -> Maybe CostTypes
costTypes) (\s :: BudgetPerformanceHistory
s@BudgetPerformanceHistory' {} Maybe CostTypes
a -> BudgetPerformanceHistory
s {$sel:costTypes:BudgetPerformanceHistory' :: Maybe CostTypes
costTypes = Maybe CostTypes
a} :: BudgetPerformanceHistory)

-- | The history of the cost filters for a budget during the specified time
-- period.
budgetPerformanceHistory_costFilters :: Lens.Lens' BudgetPerformanceHistory (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
budgetPerformanceHistory_costFilters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> BudgetPerformanceHistory -> f BudgetPerformanceHistory
budgetPerformanceHistory_costFilters = (BudgetPerformanceHistory -> Maybe (HashMap Text [Text]))
-> (BudgetPerformanceHistory
    -> Maybe (HashMap Text [Text]) -> BudgetPerformanceHistory)
-> Lens
     BudgetPerformanceHistory
     BudgetPerformanceHistory
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BudgetPerformanceHistory' {Maybe (HashMap Text [Text])
costFilters :: Maybe (HashMap Text [Text])
$sel:costFilters:BudgetPerformanceHistory' :: BudgetPerformanceHistory -> Maybe (HashMap Text [Text])
costFilters} -> Maybe (HashMap Text [Text])
costFilters) (\s :: BudgetPerformanceHistory
s@BudgetPerformanceHistory' {} Maybe (HashMap Text [Text])
a -> BudgetPerformanceHistory
s {$sel:costFilters:BudgetPerformanceHistory' :: Maybe (HashMap Text [Text])
costFilters = Maybe (HashMap Text [Text])
a} :: BudgetPerformanceHistory) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> BudgetPerformanceHistory -> f BudgetPerformanceHistory)
-> ((Maybe (HashMap Text [Text])
     -> f (Maybe (HashMap Text [Text])))
    -> Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> BudgetPerformanceHistory
-> f BudgetPerformanceHistory
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
-> Iso
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON BudgetPerformanceHistory where
  parseJSON :: Value -> Parser BudgetPerformanceHistory
parseJSON =
    String
-> (Object -> Parser BudgetPerformanceHistory)
-> Value
-> Parser BudgetPerformanceHistory
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BudgetPerformanceHistory"
      ( \Object
x ->
          Maybe [BudgetedAndActualAmounts]
-> Maybe TimeUnit
-> Maybe Text
-> Maybe BudgetType
-> Maybe CostTypes
-> Maybe (HashMap Text [Text])
-> BudgetPerformanceHistory
BudgetPerformanceHistory'
            (Maybe [BudgetedAndActualAmounts]
 -> Maybe TimeUnit
 -> Maybe Text
 -> Maybe BudgetType
 -> Maybe CostTypes
 -> Maybe (HashMap Text [Text])
 -> BudgetPerformanceHistory)
-> Parser (Maybe [BudgetedAndActualAmounts])
-> Parser
     (Maybe TimeUnit
      -> Maybe Text
      -> Maybe BudgetType
      -> Maybe CostTypes
      -> Maybe (HashMap Text [Text])
      -> BudgetPerformanceHistory)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [BudgetedAndActualAmounts]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BudgetedAndActualAmountsList"
                            Parser (Maybe (Maybe [BudgetedAndActualAmounts]))
-> Maybe [BudgetedAndActualAmounts]
-> Parser (Maybe [BudgetedAndActualAmounts])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [BudgetedAndActualAmounts]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe TimeUnit
   -> Maybe Text
   -> Maybe BudgetType
   -> Maybe CostTypes
   -> Maybe (HashMap Text [Text])
   -> BudgetPerformanceHistory)
-> Parser (Maybe TimeUnit)
-> Parser
     (Maybe Text
      -> Maybe BudgetType
      -> Maybe CostTypes
      -> Maybe (HashMap Text [Text])
      -> BudgetPerformanceHistory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TimeUnit)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TimeUnit")
            Parser
  (Maybe Text
   -> Maybe BudgetType
   -> Maybe CostTypes
   -> Maybe (HashMap Text [Text])
   -> BudgetPerformanceHistory)
-> Parser (Maybe Text)
-> Parser
     (Maybe BudgetType
      -> Maybe CostTypes
      -> Maybe (HashMap Text [Text])
      -> BudgetPerformanceHistory)
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
"BudgetName")
            Parser
  (Maybe BudgetType
   -> Maybe CostTypes
   -> Maybe (HashMap Text [Text])
   -> BudgetPerformanceHistory)
-> Parser (Maybe BudgetType)
-> Parser
     (Maybe CostTypes
      -> Maybe (HashMap Text [Text]) -> BudgetPerformanceHistory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BudgetType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BudgetType")
            Parser
  (Maybe CostTypes
   -> Maybe (HashMap Text [Text]) -> BudgetPerformanceHistory)
-> Parser (Maybe CostTypes)
-> Parser (Maybe (HashMap Text [Text]) -> BudgetPerformanceHistory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CostTypes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CostTypes")
            Parser (Maybe (HashMap Text [Text]) -> BudgetPerformanceHistory)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser BudgetPerformanceHistory
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CostFilters" Parser (Maybe (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text])
-> Parser (Maybe (HashMap Text [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text [Text])
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable BudgetPerformanceHistory

instance Prelude.NFData BudgetPerformanceHistory