{-# 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.NotificationState
-- 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.NotificationState
  ( NotificationState
      ( ..,
        NotificationState_ALARM,
        NotificationState_OK
      ),
  )
where

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

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

pattern NotificationState_ALARM :: NotificationState
pattern $bNotificationState_ALARM :: NotificationState
$mNotificationState_ALARM :: forall r. NotificationState -> (Void# -> r) -> (Void# -> r) -> r
NotificationState_ALARM = NotificationState' "ALARM"

pattern NotificationState_OK :: NotificationState
pattern $bNotificationState_OK :: NotificationState
$mNotificationState_OK :: forall r. NotificationState -> (Void# -> r) -> (Void# -> r) -> r
NotificationState_OK = NotificationState' "OK"

{-# COMPLETE
  NotificationState_ALARM,
  NotificationState_OK,
  NotificationState'
  #-}