{-# 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.LookoutMetrics.Types.AlertType
-- 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.LookoutMetrics.Types.AlertType
  ( AlertType
      ( ..,
        AlertType_LAMBDA,
        AlertType_SNS
      ),
  )
where

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

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

pattern AlertType_LAMBDA :: AlertType
pattern $bAlertType_LAMBDA :: AlertType
$mAlertType_LAMBDA :: forall {r}. AlertType -> ((# #) -> r) -> ((# #) -> r) -> r
AlertType_LAMBDA = AlertType' "LAMBDA"

pattern AlertType_SNS :: AlertType
pattern $bAlertType_SNS :: AlertType
$mAlertType_SNS :: forall {r}. AlertType -> ((# #) -> r) -> ((# #) -> r) -> r
AlertType_SNS = AlertType' "SNS"

{-# COMPLETE
  AlertType_LAMBDA,
  AlertType_SNS,
  AlertType'
  #-}