{-# 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.ApplicationInsights.Types.LogFilter
-- 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.ApplicationInsights.Types.LogFilter
  ( LogFilter
      ( ..,
        LogFilter_ERROR,
        LogFilter_INFO,
        LogFilter_WARN
      ),
  )
where

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

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

pattern LogFilter_ERROR :: LogFilter
pattern $bLogFilter_ERROR :: LogFilter
$mLogFilter_ERROR :: forall {r}. LogFilter -> ((# #) -> r) -> ((# #) -> r) -> r
LogFilter_ERROR = LogFilter' "ERROR"

pattern LogFilter_INFO :: LogFilter
pattern $bLogFilter_INFO :: LogFilter
$mLogFilter_INFO :: forall {r}. LogFilter -> ((# #) -> r) -> ((# #) -> r) -> r
LogFilter_INFO = LogFilter' "INFO"

pattern LogFilter_WARN :: LogFilter
pattern $bLogFilter_WARN :: LogFilter
$mLogFilter_WARN :: forall {r}. LogFilter -> ((# #) -> r) -> ((# #) -> r) -> r
LogFilter_WARN = LogFilter' "WARN"

{-# COMPLETE
  LogFilter_ERROR,
  LogFilter_INFO,
  LogFilter_WARN,
  LogFilter'
  #-}