{-# 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.IoT.Types.ViolationEventType
-- 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.IoT.Types.ViolationEventType
  ( ViolationEventType
      ( ..,
        ViolationEventType_Alarm_cleared,
        ViolationEventType_Alarm_invalidated,
        ViolationEventType_In_alarm
      ),
  )
where

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

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

pattern ViolationEventType_Alarm_cleared :: ViolationEventType
pattern $bViolationEventType_Alarm_cleared :: ViolationEventType
$mViolationEventType_Alarm_cleared :: forall {r}. ViolationEventType -> ((# #) -> r) -> ((# #) -> r) -> r
ViolationEventType_Alarm_cleared = ViolationEventType' "alarm-cleared"

pattern ViolationEventType_Alarm_invalidated :: ViolationEventType
pattern $bViolationEventType_Alarm_invalidated :: ViolationEventType
$mViolationEventType_Alarm_invalidated :: forall {r}. ViolationEventType -> ((# #) -> r) -> ((# #) -> r) -> r
ViolationEventType_Alarm_invalidated = ViolationEventType' "alarm-invalidated"

pattern ViolationEventType_In_alarm :: ViolationEventType
pattern $bViolationEventType_In_alarm :: ViolationEventType
$mViolationEventType_In_alarm :: forall {r}. ViolationEventType -> ((# #) -> r) -> ((# #) -> r) -> r
ViolationEventType_In_alarm = ViolationEventType' "in-alarm"

{-# COMPLETE
  ViolationEventType_Alarm_cleared,
  ViolationEventType_Alarm_invalidated,
  ViolationEventType_In_alarm,
  ViolationEventType'
  #-}