{-# 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.ThresholdType
-- 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.Budgets.Types.ThresholdType
  ( ThresholdType
      ( ..,
        ThresholdType_ABSOLUTE_VALUE,
        ThresholdType_PERCENTAGE
      ),
  )
where

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

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

pattern ThresholdType_ABSOLUTE_VALUE :: ThresholdType
pattern $bThresholdType_ABSOLUTE_VALUE :: ThresholdType
$mThresholdType_ABSOLUTE_VALUE :: forall {r}. ThresholdType -> ((# #) -> r) -> ((# #) -> r) -> r
ThresholdType_ABSOLUTE_VALUE = ThresholdType' "ABSOLUTE_VALUE"

pattern ThresholdType_PERCENTAGE :: ThresholdType
pattern $bThresholdType_PERCENTAGE :: ThresholdType
$mThresholdType_PERCENTAGE :: forall {r}. ThresholdType -> ((# #) -> r) -> ((# #) -> r) -> r
ThresholdType_PERCENTAGE = ThresholdType' "PERCENTAGE"

{-# COMPLETE
  ThresholdType_ABSOLUTE_VALUE,
  ThresholdType_PERCENTAGE,
  ThresholdType'
  #-}