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

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

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

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

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

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

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