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

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

-- | The log level the user wants for their channel.
newtype LogLevel = LogLevel'
  { LogLevel -> Text
fromLogLevel ::
      Data.Text
  }
  deriving stock
    ( Int -> LogLevel -> ShowS
[LogLevel] -> ShowS
LogLevel -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq LogLevel
Int -> LogLevel -> Int
LogLevel -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: LogLevel -> ()
$crnf :: LogLevel -> ()
Prelude.NFData,
      Text -> Either String LogLevel
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String LogLevel
$cfromText :: Text -> Either String LogLevel
Data.FromText,
      LogLevel -> Text
forall a. (a -> Text) -> ToText a
toText :: LogLevel -> Text
$ctoText :: LogLevel -> Text
Data.ToText,
      LogLevel -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: LogLevel -> ByteString
$ctoBS :: LogLevel -> ByteString
Data.ToByteString,
      LogLevel -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: LogLevel -> ByteStringBuilder
$cbuild :: LogLevel -> ByteStringBuilder
Data.ToLog,
      HeaderName -> LogLevel -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> LogLevel -> [Header]
$ctoHeader :: HeaderName -> LogLevel -> [Header]
Data.ToHeader,
      LogLevel -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: LogLevel -> QueryString
$ctoQuery :: LogLevel -> QueryString
Data.ToQuery,
      Value -> Parser [LogLevel]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [LogLevel]
FromJSONKeyFunction LogLevel
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [LogLevel]
$cfromJSONKeyList :: FromJSONKeyFunction [LogLevel]
fromJSONKey :: FromJSONKeyFunction LogLevel
$cfromJSONKey :: FromJSONKeyFunction LogLevel
Data.FromJSONKey,
      [LogLevel] -> Encoding
[LogLevel] -> Value
LogLevel -> Encoding
LogLevel -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [LogLevel]
ToJSONKeyFunction LogLevel
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [LogLevel]
$ctoJSONKeyList :: ToJSONKeyFunction [LogLevel]
toJSONKey :: ToJSONKeyFunction LogLevel
$ctoJSONKey :: ToJSONKeyFunction LogLevel
Data.ToJSONKey,
      [Node] -> Either String LogLevel
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String LogLevel
$cparseXML :: [Node] -> Either String LogLevel
Data.FromXML,
      LogLevel -> XML
forall a. (a -> XML) -> ToXML a
toXML :: LogLevel -> XML
$ctoXML :: LogLevel -> XML
Data.ToXML
    )

pattern LogLevel_DEBUG :: LogLevel
pattern $bLogLevel_DEBUG :: LogLevel
$mLogLevel_DEBUG :: forall {r}. LogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
LogLevel_DEBUG = LogLevel' "DEBUG"

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

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

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

pattern LogLevel_WARNING :: LogLevel
pattern $bLogLevel_WARNING :: LogLevel
$mLogLevel_WARNING :: forall {r}. LogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
LogLevel_WARNING = LogLevel' "WARNING"

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