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

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

newtype LogFilter = LogFilter'
  { LogFilter -> Text
fromLogFilter ::
      Core.Text
  }
  deriving stock
    ( Int -> LogFilter -> ShowS
[LogFilter] -> ShowS
LogFilter -> String
(Int -> LogFilter -> ShowS)
-> (LogFilter -> String)
-> ([LogFilter] -> ShowS)
-> Show LogFilter
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]
(Int -> ReadS LogFilter)
-> ReadS [LogFilter]
-> ReadPrec LogFilter
-> ReadPrec [LogFilter]
-> Read 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
(LogFilter -> LogFilter -> Bool)
-> (LogFilter -> LogFilter -> Bool) -> Eq LogFilter
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
Eq LogFilter
-> (LogFilter -> LogFilter -> Ordering)
-> (LogFilter -> LogFilter -> Bool)
-> (LogFilter -> LogFilter -> Bool)
-> (LogFilter -> LogFilter -> Bool)
-> (LogFilter -> LogFilter -> Bool)
-> (LogFilter -> LogFilter -> LogFilter)
-> (LogFilter -> LogFilter -> LogFilter)
-> Ord 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
$cp1Ord :: Eq LogFilter
Prelude.Ord,
      (forall x. LogFilter -> Rep LogFilter x)
-> (forall x. Rep LogFilter x -> LogFilter) -> Generic LogFilter
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
    ( Int -> LogFilter -> Int
LogFilter -> Int
(Int -> LogFilter -> Int)
-> (LogFilter -> Int) -> Hashable LogFilter
forall 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 -> ()
(LogFilter -> ()) -> NFData LogFilter
forall a. (a -> ()) -> NFData a
rnf :: LogFilter -> ()
$crnf :: LogFilter -> ()
Prelude.NFData,
      Text -> Either String LogFilter
(Text -> Either String LogFilter) -> FromText LogFilter
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String LogFilter
$cfromText :: Text -> Either String LogFilter
Core.FromText,
      LogFilter -> Text
(LogFilter -> Text) -> ToText LogFilter
forall a. (a -> Text) -> ToText a
toText :: LogFilter -> Text
$ctoText :: LogFilter -> Text
Core.ToText,
      LogFilter -> ByteString
(LogFilter -> ByteString) -> ToByteString LogFilter
forall a. (a -> ByteString) -> ToByteString a
toBS :: LogFilter -> ByteString
$ctoBS :: LogFilter -> ByteString
Core.ToByteString,
      LogFilter -> ByteStringBuilder
(LogFilter -> ByteStringBuilder) -> ToLog LogFilter
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: LogFilter -> ByteStringBuilder
$cbuild :: LogFilter -> ByteStringBuilder
Core.ToLog,
      HeaderName -> LogFilter -> [Header]
(HeaderName -> LogFilter -> [Header]) -> ToHeader LogFilter
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> LogFilter -> [Header]
$ctoHeader :: HeaderName -> LogFilter -> [Header]
Core.ToHeader,
      LogFilter -> QueryString
(LogFilter -> QueryString) -> ToQuery LogFilter
forall a. (a -> QueryString) -> ToQuery a
toQuery :: LogFilter -> QueryString
$ctoQuery :: LogFilter -> QueryString
Core.ToQuery,
      Value -> Parser [LogFilter]
Value -> Parser LogFilter
(Value -> Parser LogFilter)
-> (Value -> Parser [LogFilter]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [LogFilter]
FromJSONKeyFunction LogFilter
FromJSONKeyFunction LogFilter
-> FromJSONKeyFunction [LogFilter] -> FromJSONKey LogFilter
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [LogFilter]
$cfromJSONKeyList :: FromJSONKeyFunction [LogFilter]
fromJSONKey :: FromJSONKeyFunction LogFilter
$cfromJSONKey :: FromJSONKeyFunction LogFilter
Core.FromJSONKey,
      [LogFilter] -> Encoding
[LogFilter] -> Value
LogFilter -> Encoding
LogFilter -> Value
(LogFilter -> Value)
-> (LogFilter -> Encoding)
-> ([LogFilter] -> Value)
-> ([LogFilter] -> Encoding)
-> ToJSON LogFilter
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
Core.ToJSON,
      ToJSONKeyFunction [LogFilter]
ToJSONKeyFunction LogFilter
ToJSONKeyFunction LogFilter
-> ToJSONKeyFunction [LogFilter] -> ToJSONKey LogFilter
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [LogFilter]
$ctoJSONKeyList :: ToJSONKeyFunction [LogFilter]
toJSONKey :: ToJSONKeyFunction LogFilter
$ctoJSONKey :: ToJSONKeyFunction LogFilter
Core.ToJSONKey,
      [Node] -> Either String LogFilter
([Node] -> Either String LogFilter) -> FromXML LogFilter
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String LogFilter
$cparseXML :: [Node] -> Either String LogFilter
Core.FromXML,
      LogFilter -> XML
(LogFilter -> XML) -> ToXML LogFilter
forall a. (a -> XML) -> ToXML a
toXML :: LogFilter -> XML
$ctoXML :: LogFilter -> XML
Core.ToXML
    )

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

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

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

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