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

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

newtype AlertType = AlertType'
  { AlertType -> Text
fromAlertType ::
      Core.Text
  }
  deriving stock
    ( Int -> AlertType -> ShowS
[AlertType] -> ShowS
AlertType -> String
(Int -> AlertType -> ShowS)
-> (AlertType -> String)
-> ([AlertType] -> ShowS)
-> Show AlertType
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]
(Int -> ReadS AlertType)
-> ReadS [AlertType]
-> ReadPrec AlertType
-> ReadPrec [AlertType]
-> Read 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
(AlertType -> AlertType -> Bool)
-> (AlertType -> AlertType -> Bool) -> Eq AlertType
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
Eq AlertType
-> (AlertType -> AlertType -> Ordering)
-> (AlertType -> AlertType -> Bool)
-> (AlertType -> AlertType -> Bool)
-> (AlertType -> AlertType -> Bool)
-> (AlertType -> AlertType -> Bool)
-> (AlertType -> AlertType -> AlertType)
-> (AlertType -> AlertType -> AlertType)
-> Ord 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
$cp1Ord :: Eq AlertType
Prelude.Ord,
      (forall x. AlertType -> Rep AlertType x)
-> (forall x. Rep AlertType x -> AlertType) -> Generic AlertType
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
    ( Int -> AlertType -> Int
AlertType -> Int
(Int -> AlertType -> Int)
-> (AlertType -> Int) -> Hashable AlertType
forall 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 -> ()
(AlertType -> ()) -> NFData AlertType
forall a. (a -> ()) -> NFData a
rnf :: AlertType -> ()
$crnf :: AlertType -> ()
Prelude.NFData,
      Text -> Either String AlertType
(Text -> Either String AlertType) -> FromText AlertType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String AlertType
$cfromText :: Text -> Either String AlertType
Core.FromText,
      AlertType -> Text
(AlertType -> Text) -> ToText AlertType
forall a. (a -> Text) -> ToText a
toText :: AlertType -> Text
$ctoText :: AlertType -> Text
Core.ToText,
      AlertType -> ByteString
(AlertType -> ByteString) -> ToByteString AlertType
forall a. (a -> ByteString) -> ToByteString a
toBS :: AlertType -> ByteString
$ctoBS :: AlertType -> ByteString
Core.ToByteString,
      AlertType -> ByteStringBuilder
(AlertType -> ByteStringBuilder) -> ToLog AlertType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: AlertType -> ByteStringBuilder
$cbuild :: AlertType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> AlertType -> [Header]
(HeaderName -> AlertType -> [Header]) -> ToHeader AlertType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> AlertType -> [Header]
$ctoHeader :: HeaderName -> AlertType -> [Header]
Core.ToHeader,
      AlertType -> QueryString
(AlertType -> QueryString) -> ToQuery AlertType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: AlertType -> QueryString
$ctoQuery :: AlertType -> QueryString
Core.ToQuery,
      Value -> Parser [AlertType]
Value -> Parser AlertType
(Value -> Parser AlertType)
-> (Value -> Parser [AlertType]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [AlertType]
FromJSONKeyFunction AlertType
FromJSONKeyFunction AlertType
-> FromJSONKeyFunction [AlertType] -> FromJSONKey AlertType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [AlertType]
$cfromJSONKeyList :: FromJSONKeyFunction [AlertType]
fromJSONKey :: FromJSONKeyFunction AlertType
$cfromJSONKey :: FromJSONKeyFunction AlertType
Core.FromJSONKey,
      [AlertType] -> Encoding
[AlertType] -> Value
AlertType -> Encoding
AlertType -> Value
(AlertType -> Value)
-> (AlertType -> Encoding)
-> ([AlertType] -> Value)
-> ([AlertType] -> Encoding)
-> ToJSON AlertType
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
Core.ToJSON,
      ToJSONKeyFunction [AlertType]
ToJSONKeyFunction AlertType
ToJSONKeyFunction AlertType
-> ToJSONKeyFunction [AlertType] -> ToJSONKey AlertType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [AlertType]
$ctoJSONKeyList :: ToJSONKeyFunction [AlertType]
toJSONKey :: ToJSONKeyFunction AlertType
$ctoJSONKey :: ToJSONKeyFunction AlertType
Core.ToJSONKey,
      [Node] -> Either String AlertType
([Node] -> Either String AlertType) -> FromXML AlertType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String AlertType
$cparseXML :: [Node] -> Either String AlertType
Core.FromXML,
      AlertType -> XML
(AlertType -> XML) -> ToXML AlertType
forall a. (a -> XML) -> ToXML a
toXML :: AlertType -> XML
$ctoXML :: AlertType -> XML
Core.ToXML
    )

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

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

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