{-# 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.FilterBehavior
-- 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.FilterBehavior
  ( FilterBehavior
      ( ..,
        FilterBehavior_DROP,
        FilterBehavior_KEEP
      ),
  )
where

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

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

pattern FilterBehavior_DROP :: FilterBehavior
pattern $bFilterBehavior_DROP :: FilterBehavior
$mFilterBehavior_DROP :: forall {r}. FilterBehavior -> ((# #) -> r) -> ((# #) -> r) -> r
FilterBehavior_DROP = FilterBehavior' "DROP"

pattern FilterBehavior_KEEP :: FilterBehavior
pattern $bFilterBehavior_KEEP :: FilterBehavior
$mFilterBehavior_KEEP :: forall {r}. FilterBehavior -> ((# #) -> r) -> ((# #) -> r) -> r
FilterBehavior_KEEP = FilterBehavior' "KEEP"

{-# COMPLETE
  FilterBehavior_DROP,
  FilterBehavior_KEEP,
  FilterBehavior'
  #-}