{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

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

-- |
-- Module      : Amazonka.Budgets.Types.BudgetType
-- 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.BudgetType
  ( BudgetType
      ( ..,
        BudgetType_COST,
        BudgetType_RI_COVERAGE,
        BudgetType_RI_UTILIZATION,
        BudgetType_SAVINGS_PLANS_COVERAGE,
        BudgetType_SAVINGS_PLANS_UTILIZATION,
        BudgetType_USAGE
      ),
  )
where

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

-- | The type of a budget. It must be one of the following types:
--
-- @COST@, @USAGE@, @RI_UTILIZATION@, @RI_COVERAGE@,
-- @SAVINGS_PLANS_UTILIZATION@, or @SAVINGS_PLANS_COVERAGE@.
newtype BudgetType = BudgetType'
  { BudgetType -> Text
fromBudgetType ::
      Core.Text
  }
  deriving stock
    ( Int -> BudgetType -> ShowS
[BudgetType] -> ShowS
BudgetType -> String
(Int -> BudgetType -> ShowS)
-> (BudgetType -> String)
-> ([BudgetType] -> ShowS)
-> Show BudgetType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BudgetType] -> ShowS
$cshowList :: [BudgetType] -> ShowS
show :: BudgetType -> String
$cshow :: BudgetType -> String
showsPrec :: Int -> BudgetType -> ShowS
$cshowsPrec :: Int -> BudgetType -> ShowS
Prelude.Show,
      ReadPrec [BudgetType]
ReadPrec BudgetType
Int -> ReadS BudgetType
ReadS [BudgetType]
(Int -> ReadS BudgetType)
-> ReadS [BudgetType]
-> ReadPrec BudgetType
-> ReadPrec [BudgetType]
-> Read BudgetType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BudgetType]
$creadListPrec :: ReadPrec [BudgetType]
readPrec :: ReadPrec BudgetType
$creadPrec :: ReadPrec BudgetType
readList :: ReadS [BudgetType]
$creadList :: ReadS [BudgetType]
readsPrec :: Int -> ReadS BudgetType
$creadsPrec :: Int -> ReadS BudgetType
Prelude.Read,
      BudgetType -> BudgetType -> Bool
(BudgetType -> BudgetType -> Bool)
-> (BudgetType -> BudgetType -> Bool) -> Eq BudgetType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BudgetType -> BudgetType -> Bool
$c/= :: BudgetType -> BudgetType -> Bool
== :: BudgetType -> BudgetType -> Bool
$c== :: BudgetType -> BudgetType -> Bool
Prelude.Eq,
      Eq BudgetType
Eq BudgetType
-> (BudgetType -> BudgetType -> Ordering)
-> (BudgetType -> BudgetType -> Bool)
-> (BudgetType -> BudgetType -> Bool)
-> (BudgetType -> BudgetType -> Bool)
-> (BudgetType -> BudgetType -> Bool)
-> (BudgetType -> BudgetType -> BudgetType)
-> (BudgetType -> BudgetType -> BudgetType)
-> Ord BudgetType
BudgetType -> BudgetType -> Bool
BudgetType -> BudgetType -> Ordering
BudgetType -> BudgetType -> BudgetType
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: BudgetType -> BudgetType -> BudgetType
$cmin :: BudgetType -> BudgetType -> BudgetType
max :: BudgetType -> BudgetType -> BudgetType
$cmax :: BudgetType -> BudgetType -> BudgetType
>= :: BudgetType -> BudgetType -> Bool
$c>= :: BudgetType -> BudgetType -> Bool
> :: BudgetType -> BudgetType -> Bool
$c> :: BudgetType -> BudgetType -> Bool
<= :: BudgetType -> BudgetType -> Bool
$c<= :: BudgetType -> BudgetType -> Bool
< :: BudgetType -> BudgetType -> Bool
$c< :: BudgetType -> BudgetType -> Bool
compare :: BudgetType -> BudgetType -> Ordering
$ccompare :: BudgetType -> BudgetType -> Ordering
$cp1Ord :: Eq BudgetType
Prelude.Ord,
      (forall x. BudgetType -> Rep BudgetType x)
-> (forall x. Rep BudgetType x -> BudgetType) -> Generic BudgetType
forall x. Rep BudgetType x -> BudgetType
forall x. BudgetType -> Rep BudgetType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BudgetType x -> BudgetType
$cfrom :: forall x. BudgetType -> Rep BudgetType x
Prelude.Generic
    )
  deriving newtype
    ( Int -> BudgetType -> Int
BudgetType -> Int
(Int -> BudgetType -> Int)
-> (BudgetType -> Int) -> Hashable BudgetType
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: BudgetType -> Int
$chash :: BudgetType -> Int
hashWithSalt :: Int -> BudgetType -> Int
$chashWithSalt :: Int -> BudgetType -> Int
Prelude.Hashable,
      BudgetType -> ()
(BudgetType -> ()) -> NFData BudgetType
forall a. (a -> ()) -> NFData a
rnf :: BudgetType -> ()
$crnf :: BudgetType -> ()
Prelude.NFData,
      Text -> Either String BudgetType
(Text -> Either String BudgetType) -> FromText BudgetType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String BudgetType
$cfromText :: Text -> Either String BudgetType
Core.FromText,
      BudgetType -> Text
(BudgetType -> Text) -> ToText BudgetType
forall a. (a -> Text) -> ToText a
toText :: BudgetType -> Text
$ctoText :: BudgetType -> Text
Core.ToText,
      BudgetType -> ByteString
(BudgetType -> ByteString) -> ToByteString BudgetType
forall a. (a -> ByteString) -> ToByteString a
toBS :: BudgetType -> ByteString
$ctoBS :: BudgetType -> ByteString
Core.ToByteString,
      BudgetType -> ByteStringBuilder
(BudgetType -> ByteStringBuilder) -> ToLog BudgetType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: BudgetType -> ByteStringBuilder
$cbuild :: BudgetType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> BudgetType -> [Header]
(HeaderName -> BudgetType -> [Header]) -> ToHeader BudgetType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> BudgetType -> [Header]
$ctoHeader :: HeaderName -> BudgetType -> [Header]
Core.ToHeader,
      BudgetType -> QueryString
(BudgetType -> QueryString) -> ToQuery BudgetType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: BudgetType -> QueryString
$ctoQuery :: BudgetType -> QueryString
Core.ToQuery,
      Value -> Parser [BudgetType]
Value -> Parser BudgetType
(Value -> Parser BudgetType)
-> (Value -> Parser [BudgetType]) -> FromJSON BudgetType
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [BudgetType]
$cparseJSONList :: Value -> Parser [BudgetType]
parseJSON :: Value -> Parser BudgetType
$cparseJSON :: Value -> Parser BudgetType
Core.FromJSON,
      FromJSONKeyFunction [BudgetType]
FromJSONKeyFunction BudgetType
FromJSONKeyFunction BudgetType
-> FromJSONKeyFunction [BudgetType] -> FromJSONKey BudgetType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [BudgetType]
$cfromJSONKeyList :: FromJSONKeyFunction [BudgetType]
fromJSONKey :: FromJSONKeyFunction BudgetType
$cfromJSONKey :: FromJSONKeyFunction BudgetType
Core.FromJSONKey,
      [BudgetType] -> Encoding
[BudgetType] -> Value
BudgetType -> Encoding
BudgetType -> Value
(BudgetType -> Value)
-> (BudgetType -> Encoding)
-> ([BudgetType] -> Value)
-> ([BudgetType] -> Encoding)
-> ToJSON BudgetType
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [BudgetType] -> Encoding
$ctoEncodingList :: [BudgetType] -> Encoding
toJSONList :: [BudgetType] -> Value
$ctoJSONList :: [BudgetType] -> Value
toEncoding :: BudgetType -> Encoding
$ctoEncoding :: BudgetType -> Encoding
toJSON :: BudgetType -> Value
$ctoJSON :: BudgetType -> Value
Core.ToJSON,
      ToJSONKeyFunction [BudgetType]
ToJSONKeyFunction BudgetType
ToJSONKeyFunction BudgetType
-> ToJSONKeyFunction [BudgetType] -> ToJSONKey BudgetType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [BudgetType]
$ctoJSONKeyList :: ToJSONKeyFunction [BudgetType]
toJSONKey :: ToJSONKeyFunction BudgetType
$ctoJSONKey :: ToJSONKeyFunction BudgetType
Core.ToJSONKey,
      [Node] -> Either String BudgetType
([Node] -> Either String BudgetType) -> FromXML BudgetType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String BudgetType
$cparseXML :: [Node] -> Either String BudgetType
Core.FromXML,
      BudgetType -> XML
(BudgetType -> XML) -> ToXML BudgetType
forall a. (a -> XML) -> ToXML a
toXML :: BudgetType -> XML
$ctoXML :: BudgetType -> XML
Core.ToXML
    )

pattern BudgetType_COST :: BudgetType
pattern $bBudgetType_COST :: BudgetType
$mBudgetType_COST :: forall r. BudgetType -> (Void# -> r) -> (Void# -> r) -> r
BudgetType_COST = BudgetType' "COST"

pattern BudgetType_RI_COVERAGE :: BudgetType
pattern $bBudgetType_RI_COVERAGE :: BudgetType
$mBudgetType_RI_COVERAGE :: forall r. BudgetType -> (Void# -> r) -> (Void# -> r) -> r
BudgetType_RI_COVERAGE = BudgetType' "RI_COVERAGE"

pattern BudgetType_RI_UTILIZATION :: BudgetType
pattern $bBudgetType_RI_UTILIZATION :: BudgetType
$mBudgetType_RI_UTILIZATION :: forall r. BudgetType -> (Void# -> r) -> (Void# -> r) -> r
BudgetType_RI_UTILIZATION = BudgetType' "RI_UTILIZATION"

pattern BudgetType_SAVINGS_PLANS_COVERAGE :: BudgetType
pattern $bBudgetType_SAVINGS_PLANS_COVERAGE :: BudgetType
$mBudgetType_SAVINGS_PLANS_COVERAGE :: forall r. BudgetType -> (Void# -> r) -> (Void# -> r) -> r
BudgetType_SAVINGS_PLANS_COVERAGE = BudgetType' "SAVINGS_PLANS_COVERAGE"

pattern BudgetType_SAVINGS_PLANS_UTILIZATION :: BudgetType
pattern $bBudgetType_SAVINGS_PLANS_UTILIZATION :: BudgetType
$mBudgetType_SAVINGS_PLANS_UTILIZATION :: forall r. BudgetType -> (Void# -> r) -> (Void# -> r) -> r
BudgetType_SAVINGS_PLANS_UTILIZATION = BudgetType' "SAVINGS_PLANS_UTILIZATION"

pattern BudgetType_USAGE :: BudgetType
pattern $bBudgetType_USAGE :: BudgetType
$mBudgetType_USAGE :: forall r. BudgetType -> (Void# -> r) -> (Void# -> r) -> r
BudgetType_USAGE = BudgetType' "USAGE"

{-# COMPLETE
  BudgetType_COST,
  BudgetType_RI_COVERAGE,
  BudgetType_RI_UTILIZATION,
  BudgetType_SAVINGS_PLANS_COVERAGE,
  BudgetType_SAVINGS_PLANS_UTILIZATION,
  BudgetType_USAGE,
  BudgetType'
  #-}