{-# 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.RateKey
-- 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.RateKey
  ( RateKey
      ( ..,
        RateKey_IP
      ),
  )
where

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

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

pattern RateKey_IP :: RateKey
pattern $bRateKey_IP :: RateKey
$mRateKey_IP :: forall r. RateKey -> (Void# -> r) -> (Void# -> r) -> r
RateKey_IP = RateKey' "IP"

{-# COMPLETE
  RateKey_IP,
  RateKey'
  #-}