{-# 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.PositionalConstraint
-- 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.PositionalConstraint
  ( PositionalConstraint
      ( ..,
        PositionalConstraint_CONTAINS,
        PositionalConstraint_CONTAINS_WORD,
        PositionalConstraint_ENDS_WITH,
        PositionalConstraint_EXACTLY,
        PositionalConstraint_STARTS_WITH
      ),
  )
where

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

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

pattern PositionalConstraint_CONTAINS :: PositionalConstraint
pattern $bPositionalConstraint_CONTAINS :: PositionalConstraint
$mPositionalConstraint_CONTAINS :: forall r. PositionalConstraint -> (Void# -> r) -> (Void# -> r) -> r
PositionalConstraint_CONTAINS = PositionalConstraint' "CONTAINS"

pattern PositionalConstraint_CONTAINS_WORD :: PositionalConstraint
pattern $bPositionalConstraint_CONTAINS_WORD :: PositionalConstraint
$mPositionalConstraint_CONTAINS_WORD :: forall r. PositionalConstraint -> (Void# -> r) -> (Void# -> r) -> r
PositionalConstraint_CONTAINS_WORD = PositionalConstraint' "CONTAINS_WORD"

pattern PositionalConstraint_ENDS_WITH :: PositionalConstraint
pattern $bPositionalConstraint_ENDS_WITH :: PositionalConstraint
$mPositionalConstraint_ENDS_WITH :: forall r. PositionalConstraint -> (Void# -> r) -> (Void# -> r) -> r
PositionalConstraint_ENDS_WITH = PositionalConstraint' "ENDS_WITH"

pattern PositionalConstraint_EXACTLY :: PositionalConstraint
pattern $bPositionalConstraint_EXACTLY :: PositionalConstraint
$mPositionalConstraint_EXACTLY :: forall r. PositionalConstraint -> (Void# -> r) -> (Void# -> r) -> r
PositionalConstraint_EXACTLY = PositionalConstraint' "EXACTLY"

pattern PositionalConstraint_STARTS_WITH :: PositionalConstraint
pattern $bPositionalConstraint_STARTS_WITH :: PositionalConstraint
$mPositionalConstraint_STARTS_WITH :: forall r. PositionalConstraint -> (Void# -> r) -> (Void# -> r) -> r
PositionalConstraint_STARTS_WITH = PositionalConstraint' "STARTS_WITH"

{-# COMPLETE
  PositionalConstraint_CONTAINS,
  PositionalConstraint_CONTAINS_WORD,
  PositionalConstraint_ENDS_WITH,
  PositionalConstraint_EXACTLY,
  PositionalConstraint_STARTS_WITH,
  PositionalConstraint'
  #-}