{-# 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.ApiGatewayV2.Types.LoggingLevel
-- 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.ApiGatewayV2.Types.LoggingLevel
  ( LoggingLevel
      ( ..,
        LoggingLevel_ERROR,
        LoggingLevel_INFO,
        LoggingLevel_OFF
      ),
  )
where

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

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

pattern LoggingLevel_ERROR :: LoggingLevel
pattern $bLoggingLevel_ERROR :: LoggingLevel
$mLoggingLevel_ERROR :: forall r. LoggingLevel -> (Void# -> r) -> (Void# -> r) -> r
LoggingLevel_ERROR = LoggingLevel' "ERROR"

pattern LoggingLevel_INFO :: LoggingLevel
pattern $bLoggingLevel_INFO :: LoggingLevel
$mLoggingLevel_INFO :: forall r. LoggingLevel -> (Void# -> r) -> (Void# -> r) -> r
LoggingLevel_INFO = LoggingLevel' "INFO"

pattern LoggingLevel_OFF :: LoggingLevel
pattern $bLoggingLevel_OFF :: LoggingLevel
$mLoggingLevel_OFF :: forall r. LoggingLevel -> (Void# -> r) -> (Void# -> r) -> r
LoggingLevel_OFF = LoggingLevel' "OFF"

{-# COMPLETE
  LoggingLevel_ERROR,
  LoggingLevel_INFO,
  LoggingLevel_OFF,
  LoggingLevel'
  #-}