{-# 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.IoTWireless.Types.LogLevel
-- 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.IoTWireless.Types.LogLevel
  ( LogLevel
      ( ..,
        LogLevel_DISABLED,
        LogLevel_ERROR,
        LogLevel_INFO
      ),
  )
where

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

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

pattern LogLevel_DISABLED :: LogLevel
pattern $bLogLevel_DISABLED :: LogLevel
$mLogLevel_DISABLED :: forall r. LogLevel -> (Void# -> r) -> (Void# -> r) -> r
LogLevel_DISABLED = LogLevel' "DISABLED"

pattern LogLevel_ERROR :: LogLevel
pattern $bLogLevel_ERROR :: LogLevel
$mLogLevel_ERROR :: forall r. LogLevel -> (Void# -> r) -> (Void# -> r) -> r
LogLevel_ERROR = LogLevel' "ERROR"

pattern LogLevel_INFO :: LogLevel
pattern $bLogLevel_INFO :: LogLevel
$mLogLevel_INFO :: forall r. LogLevel -> (Void# -> r) -> (Void# -> r) -> r
LogLevel_INFO = LogLevel' "INFO"

{-# COMPLETE
  LogLevel_DISABLED,
  LogLevel_ERROR,
  LogLevel_INFO,
  LogLevel'
  #-}