{-# 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.AlarmType
-- 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.CloudWatch.Types.AlarmType
  ( AlarmType
      ( ..,
        AlarmType_CompositeAlarm,
        AlarmType_MetricAlarm
      ),
  )
where

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

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

pattern AlarmType_CompositeAlarm :: AlarmType
pattern $bAlarmType_CompositeAlarm :: AlarmType
$mAlarmType_CompositeAlarm :: forall r. AlarmType -> (Void# -> r) -> (Void# -> r) -> r
AlarmType_CompositeAlarm = AlarmType' "CompositeAlarm"

pattern AlarmType_MetricAlarm :: AlarmType
pattern $bAlarmType_MetricAlarm :: AlarmType
$mAlarmType_MetricAlarm :: forall r. AlarmType -> (Void# -> r) -> (Void# -> r) -> r
AlarmType_MetricAlarm = AlarmType' "MetricAlarm"

{-# COMPLETE
  AlarmType_CompositeAlarm,
  AlarmType_MetricAlarm,
  AlarmType'
  #-}