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

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

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

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

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

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

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