{-# 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.WafActionType
-- 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.WafActionType
  ( WafActionType
      ( ..,
        WafActionType_ALLOW,
        WafActionType_BLOCK,
        WafActionType_COUNT
      ),
  )
where

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

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

pattern WafActionType_ALLOW :: WafActionType
pattern $bWafActionType_ALLOW :: WafActionType
$mWafActionType_ALLOW :: forall {r}. WafActionType -> ((# #) -> r) -> ((# #) -> r) -> r
WafActionType_ALLOW = WafActionType' "ALLOW"

pattern WafActionType_BLOCK :: WafActionType
pattern $bWafActionType_BLOCK :: WafActionType
$mWafActionType_BLOCK :: forall {r}. WafActionType -> ((# #) -> r) -> ((# #) -> r) -> r
WafActionType_BLOCK = WafActionType' "BLOCK"

pattern WafActionType_COUNT :: WafActionType
pattern $bWafActionType_COUNT :: WafActionType
$mWafActionType_COUNT :: forall {r}. WafActionType -> ((# #) -> r) -> ((# #) -> r) -> r
WafActionType_COUNT = WafActionType' "COUNT"

{-# COMPLETE
  WafActionType_ALLOW,
  WafActionType_BLOCK,
  WafActionType_COUNT,
  WafActionType'
  #-}