{-# 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.JsonMatchScope
-- 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.JsonMatchScope
  ( JsonMatchScope
      ( ..,
        JsonMatchScope_ALL,
        JsonMatchScope_KEY,
        JsonMatchScope_VALUE
      ),
  )
where

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

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

pattern JsonMatchScope_ALL :: JsonMatchScope
pattern $bJsonMatchScope_ALL :: JsonMatchScope
$mJsonMatchScope_ALL :: forall {r}. JsonMatchScope -> ((# #) -> r) -> ((# #) -> r) -> r
JsonMatchScope_ALL = JsonMatchScope' "ALL"

pattern JsonMatchScope_KEY :: JsonMatchScope
pattern $bJsonMatchScope_KEY :: JsonMatchScope
$mJsonMatchScope_KEY :: forall {r}. JsonMatchScope -> ((# #) -> r) -> ((# #) -> r) -> r
JsonMatchScope_KEY = JsonMatchScope' "KEY"

pattern JsonMatchScope_VALUE :: JsonMatchScope
pattern $bJsonMatchScope_VALUE :: JsonMatchScope
$mJsonMatchScope_VALUE :: forall {r}. JsonMatchScope -> ((# #) -> r) -> ((# #) -> r) -> r
JsonMatchScope_VALUE = JsonMatchScope' "VALUE"

{-# COMPLETE
  JsonMatchScope_ALL,
  JsonMatchScope_KEY,
  JsonMatchScope_VALUE,
  JsonMatchScope'
  #-}