{-# 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.WAFRegional.Types.PredicateType
-- 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.WAFRegional.Types.PredicateType
  ( PredicateType
      ( ..,
        PredicateType_ByteMatch,
        PredicateType_GeoMatch,
        PredicateType_IPMatch,
        PredicateType_RegexMatch,
        PredicateType_SizeConstraint,
        PredicateType_SqlInjectionMatch,
        PredicateType_XssMatch
      ),
  )
where

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

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

pattern PredicateType_ByteMatch :: PredicateType
pattern $bPredicateType_ByteMatch :: PredicateType
$mPredicateType_ByteMatch :: forall r. PredicateType -> (Void# -> r) -> (Void# -> r) -> r
PredicateType_ByteMatch = PredicateType' "ByteMatch"

pattern PredicateType_GeoMatch :: PredicateType
pattern $bPredicateType_GeoMatch :: PredicateType
$mPredicateType_GeoMatch :: forall r. PredicateType -> (Void# -> r) -> (Void# -> r) -> r
PredicateType_GeoMatch = PredicateType' "GeoMatch"

pattern PredicateType_IPMatch :: PredicateType
pattern $bPredicateType_IPMatch :: PredicateType
$mPredicateType_IPMatch :: forall r. PredicateType -> (Void# -> r) -> (Void# -> r) -> r
PredicateType_IPMatch = PredicateType' "IPMatch"

pattern PredicateType_RegexMatch :: PredicateType
pattern $bPredicateType_RegexMatch :: PredicateType
$mPredicateType_RegexMatch :: forall r. PredicateType -> (Void# -> r) -> (Void# -> r) -> r
PredicateType_RegexMatch = PredicateType' "RegexMatch"

pattern PredicateType_SizeConstraint :: PredicateType
pattern $bPredicateType_SizeConstraint :: PredicateType
$mPredicateType_SizeConstraint :: forall r. PredicateType -> (Void# -> r) -> (Void# -> r) -> r
PredicateType_SizeConstraint = PredicateType' "SizeConstraint"

pattern PredicateType_SqlInjectionMatch :: PredicateType
pattern $bPredicateType_SqlInjectionMatch :: PredicateType
$mPredicateType_SqlInjectionMatch :: forall r. PredicateType -> (Void# -> r) -> (Void# -> r) -> r
PredicateType_SqlInjectionMatch = PredicateType' "SqlInjectionMatch"

pattern PredicateType_XssMatch :: PredicateType
pattern $bPredicateType_XssMatch :: PredicateType
$mPredicateType_XssMatch :: forall r. PredicateType -> (Void# -> r) -> (Void# -> r) -> r
PredicateType_XssMatch = PredicateType' "XssMatch"

{-# COMPLETE
  PredicateType_ByteMatch,
  PredicateType_GeoMatch,
  PredicateType_IPMatch,
  PredicateType_RegexMatch,
  PredicateType_SizeConstraint,
  PredicateType_SqlInjectionMatch,
  PredicateType_XssMatch,
  PredicateType'
  #-}