{-# 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.CloudWatch.Types.AnomalyDetectorType
-- 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.CloudWatch.Types.AnomalyDetectorType
  ( AnomalyDetectorType
      ( ..,
        AnomalyDetectorType_METRIC_MATH,
        AnomalyDetectorType_SINGLE_METRIC
      ),
  )
where

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

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

pattern AnomalyDetectorType_METRIC_MATH :: AnomalyDetectorType
pattern $bAnomalyDetectorType_METRIC_MATH :: AnomalyDetectorType
$mAnomalyDetectorType_METRIC_MATH :: forall {r}.
AnomalyDetectorType -> ((# #) -> r) -> ((# #) -> r) -> r
AnomalyDetectorType_METRIC_MATH = AnomalyDetectorType' "METRIC_MATH"

pattern AnomalyDetectorType_SINGLE_METRIC :: AnomalyDetectorType
pattern $bAnomalyDetectorType_SINGLE_METRIC :: AnomalyDetectorType
$mAnomalyDetectorType_SINGLE_METRIC :: forall {r}.
AnomalyDetectorType -> ((# #) -> r) -> ((# #) -> r) -> r
AnomalyDetectorType_SINGLE_METRIC = AnomalyDetectorType' "SINGLE_METRIC"

{-# COMPLETE
  AnomalyDetectorType_METRIC_MATH,
  AnomalyDetectorType_SINGLE_METRIC,
  AnomalyDetectorType'
  #-}