{-# 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.IoTSiteWise.Types.MonitorErrorCode
-- 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.IoTSiteWise.Types.MonitorErrorCode
  ( MonitorErrorCode
      ( ..,
        MonitorErrorCode_INTERNAL_FAILURE,
        MonitorErrorCode_LIMIT_EXCEEDED,
        MonitorErrorCode_VALIDATION_ERROR
      ),
  )
where

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

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

pattern MonitorErrorCode_INTERNAL_FAILURE :: MonitorErrorCode
pattern $bMonitorErrorCode_INTERNAL_FAILURE :: MonitorErrorCode
$mMonitorErrorCode_INTERNAL_FAILURE :: forall r. MonitorErrorCode -> (Void# -> r) -> (Void# -> r) -> r
MonitorErrorCode_INTERNAL_FAILURE = MonitorErrorCode' "INTERNAL_FAILURE"

pattern MonitorErrorCode_LIMIT_EXCEEDED :: MonitorErrorCode
pattern $bMonitorErrorCode_LIMIT_EXCEEDED :: MonitorErrorCode
$mMonitorErrorCode_LIMIT_EXCEEDED :: forall r. MonitorErrorCode -> (Void# -> r) -> (Void# -> r) -> r
MonitorErrorCode_LIMIT_EXCEEDED = MonitorErrorCode' "LIMIT_EXCEEDED"

pattern MonitorErrorCode_VALIDATION_ERROR :: MonitorErrorCode
pattern $bMonitorErrorCode_VALIDATION_ERROR :: MonitorErrorCode
$mMonitorErrorCode_VALIDATION_ERROR :: forall r. MonitorErrorCode -> (Void# -> r) -> (Void# -> r) -> r
MonitorErrorCode_VALIDATION_ERROR = MonitorErrorCode' "VALIDATION_ERROR"

{-# COMPLETE
  MonitorErrorCode_INTERNAL_FAILURE,
  MonitorErrorCode_LIMIT_EXCEEDED,
  MonitorErrorCode_VALIDATION_ERROR,
  MonitorErrorCode'
  #-}