{-# 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.RateBasedStatementAggregateKeyType
-- 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.RateBasedStatementAggregateKeyType
  ( RateBasedStatementAggregateKeyType
      ( ..,
        RateBasedStatementAggregateKeyType_FORWARDED_IP,
        RateBasedStatementAggregateKeyType_IP
      ),
  )
where

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

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

pattern RateBasedStatementAggregateKeyType_FORWARDED_IP :: RateBasedStatementAggregateKeyType
pattern $bRateBasedStatementAggregateKeyType_FORWARDED_IP :: RateBasedStatementAggregateKeyType
$mRateBasedStatementAggregateKeyType_FORWARDED_IP :: forall {r}.
RateBasedStatementAggregateKeyType
-> ((# #) -> r) -> ((# #) -> r) -> r
RateBasedStatementAggregateKeyType_FORWARDED_IP = RateBasedStatementAggregateKeyType' "FORWARDED_IP"

pattern RateBasedStatementAggregateKeyType_IP :: RateBasedStatementAggregateKeyType
pattern $bRateBasedStatementAggregateKeyType_IP :: RateBasedStatementAggregateKeyType
$mRateBasedStatementAggregateKeyType_IP :: forall {r}.
RateBasedStatementAggregateKeyType
-> ((# #) -> r) -> ((# #) -> r) -> r
RateBasedStatementAggregateKeyType_IP = RateBasedStatementAggregateKeyType' "IP"

{-# COMPLETE
  RateBasedStatementAggregateKeyType_FORWARDED_IP,
  RateBasedStatementAggregateKeyType_IP,
  RateBasedStatementAggregateKeyType'
  #-}