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

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

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

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

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

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

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