{-# 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.WAF.Types.WafRuleType
-- 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.WAF.Types.WafRuleType
  ( WafRuleType
      ( ..,
        WafRuleType_GROUP,
        WafRuleType_RATE_BASED,
        WafRuleType_REGULAR
      ),
  )
where

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

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

pattern WafRuleType_GROUP :: WafRuleType
pattern $bWafRuleType_GROUP :: WafRuleType
$mWafRuleType_GROUP :: forall {r}. WafRuleType -> ((# #) -> r) -> ((# #) -> r) -> r
WafRuleType_GROUP = WafRuleType' "GROUP"

pattern WafRuleType_RATE_BASED :: WafRuleType
pattern $bWafRuleType_RATE_BASED :: WafRuleType
$mWafRuleType_RATE_BASED :: forall {r}. WafRuleType -> ((# #) -> r) -> ((# #) -> r) -> r
WafRuleType_RATE_BASED = WafRuleType' "RATE_BASED"

pattern WafRuleType_REGULAR :: WafRuleType
pattern $bWafRuleType_REGULAR :: WafRuleType
$mWafRuleType_REGULAR :: forall {r}. WafRuleType -> ((# #) -> r) -> ((# #) -> r) -> r
WafRuleType_REGULAR = WafRuleType' "REGULAR"

{-# COMPLETE
  WafRuleType_GROUP,
  WafRuleType_RATE_BASED,
  WafRuleType_REGULAR,
  WafRuleType'
  #-}