{-# 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.WAFV2.Types.ActionValue
-- 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.WAFV2.Types.ActionValue
  ( ActionValue
      ( ..,
        ActionValue_ALLOW,
        ActionValue_BLOCK,
        ActionValue_CAPTCHA,
        ActionValue_CHALLENGE,
        ActionValue_COUNT,
        ActionValue_EXCLUDED_AS_COUNT
      ),
  )
where

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

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

pattern ActionValue_ALLOW :: ActionValue
pattern $bActionValue_ALLOW :: ActionValue
$mActionValue_ALLOW :: forall {r}. ActionValue -> ((# #) -> r) -> ((# #) -> r) -> r
ActionValue_ALLOW = ActionValue' "ALLOW"

pattern ActionValue_BLOCK :: ActionValue
pattern $bActionValue_BLOCK :: ActionValue
$mActionValue_BLOCK :: forall {r}. ActionValue -> ((# #) -> r) -> ((# #) -> r) -> r
ActionValue_BLOCK = ActionValue' "BLOCK"

pattern ActionValue_CAPTCHA :: ActionValue
pattern $bActionValue_CAPTCHA :: ActionValue
$mActionValue_CAPTCHA :: forall {r}. ActionValue -> ((# #) -> r) -> ((# #) -> r) -> r
ActionValue_CAPTCHA = ActionValue' "CAPTCHA"

pattern ActionValue_CHALLENGE :: ActionValue
pattern $bActionValue_CHALLENGE :: ActionValue
$mActionValue_CHALLENGE :: forall {r}. ActionValue -> ((# #) -> r) -> ((# #) -> r) -> r
ActionValue_CHALLENGE = ActionValue' "CHALLENGE"

pattern ActionValue_COUNT :: ActionValue
pattern $bActionValue_COUNT :: ActionValue
$mActionValue_COUNT :: forall {r}. ActionValue -> ((# #) -> r) -> ((# #) -> r) -> r
ActionValue_COUNT = ActionValue' "COUNT"

pattern ActionValue_EXCLUDED_AS_COUNT :: ActionValue
pattern $bActionValue_EXCLUDED_AS_COUNT :: ActionValue
$mActionValue_EXCLUDED_AS_COUNT :: forall {r}. ActionValue -> ((# #) -> r) -> ((# #) -> r) -> r
ActionValue_EXCLUDED_AS_COUNT = ActionValue' "EXCLUDED_AS_COUNT"

{-# COMPLETE
  ActionValue_ALLOW,
  ActionValue_BLOCK,
  ActionValue_CAPTCHA,
  ActionValue_CHALLENGE,
  ActionValue_COUNT,
  ActionValue_EXCLUDED_AS_COUNT,
  ActionValue'
  #-}