{-# 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.NotificationType
-- 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.NotificationType
  ( NotificationType
      ( ..,
        NotificationType_ACTUAL,
        NotificationType_FORECASTED
      ),
  )
where

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

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

pattern NotificationType_ACTUAL :: NotificationType
pattern $bNotificationType_ACTUAL :: NotificationType
$mNotificationType_ACTUAL :: forall r. NotificationType -> (Void# -> r) -> (Void# -> r) -> r
NotificationType_ACTUAL = NotificationType' "ACTUAL"

pattern NotificationType_FORECASTED :: NotificationType
pattern $bNotificationType_FORECASTED :: NotificationType
$mNotificationType_FORECASTED :: forall r. NotificationType -> (Void# -> r) -> (Void# -> r) -> r
NotificationType_FORECASTED = NotificationType' "FORECASTED"

{-# COMPLETE
  NotificationType_ACTUAL,
  NotificationType_FORECASTED,
  NotificationType'
  #-}