{-# 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.WAFRegional.Types.TextTransformation
-- 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.WAFRegional.Types.TextTransformation
  ( TextTransformation
      ( ..,
        TextTransformation_CMD_LINE,
        TextTransformation_COMPRESS_WHITE_SPACE,
        TextTransformation_HTML_ENTITY_DECODE,
        TextTransformation_LOWERCASE,
        TextTransformation_NONE,
        TextTransformation_URL_DECODE
      ),
  )
where

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

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

pattern TextTransformation_CMD_LINE :: TextTransformation
pattern $bTextTransformation_CMD_LINE :: TextTransformation
$mTextTransformation_CMD_LINE :: forall r. TextTransformation -> (Void# -> r) -> (Void# -> r) -> r
TextTransformation_CMD_LINE = TextTransformation' "CMD_LINE"

pattern TextTransformation_COMPRESS_WHITE_SPACE :: TextTransformation
pattern $bTextTransformation_COMPRESS_WHITE_SPACE :: TextTransformation
$mTextTransformation_COMPRESS_WHITE_SPACE :: forall r. TextTransformation -> (Void# -> r) -> (Void# -> r) -> r
TextTransformation_COMPRESS_WHITE_SPACE = TextTransformation' "COMPRESS_WHITE_SPACE"

pattern TextTransformation_HTML_ENTITY_DECODE :: TextTransformation
pattern $bTextTransformation_HTML_ENTITY_DECODE :: TextTransformation
$mTextTransformation_HTML_ENTITY_DECODE :: forall r. TextTransformation -> (Void# -> r) -> (Void# -> r) -> r
TextTransformation_HTML_ENTITY_DECODE = TextTransformation' "HTML_ENTITY_DECODE"

pattern TextTransformation_LOWERCASE :: TextTransformation
pattern $bTextTransformation_LOWERCASE :: TextTransformation
$mTextTransformation_LOWERCASE :: forall r. TextTransformation -> (Void# -> r) -> (Void# -> r) -> r
TextTransformation_LOWERCASE = TextTransformation' "LOWERCASE"

pattern TextTransformation_NONE :: TextTransformation
pattern $bTextTransformation_NONE :: TextTransformation
$mTextTransformation_NONE :: forall r. TextTransformation -> (Void# -> r) -> (Void# -> r) -> r
TextTransformation_NONE = TextTransformation' "NONE"

pattern TextTransformation_URL_DECODE :: TextTransformation
pattern $bTextTransformation_URL_DECODE :: TextTransformation
$mTextTransformation_URL_DECODE :: forall r. TextTransformation -> (Void# -> r) -> (Void# -> r) -> r
TextTransformation_URL_DECODE = TextTransformation' "URL_DECODE"

{-# COMPLETE
  TextTransformation_CMD_LINE,
  TextTransformation_COMPRESS_WHITE_SPACE,
  TextTransformation_HTML_ENTITY_DECODE,
  TextTransformation_LOWERCASE,
  TextTransformation_NONE,
  TextTransformation_URL_DECODE,
  TextTransformation'
  #-}