{-# 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.GeoMatchConstraintType
-- 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.GeoMatchConstraintType
  ( GeoMatchConstraintType
      ( ..,
        GeoMatchConstraintType_Country
      ),
  )
where

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

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

pattern GeoMatchConstraintType_Country :: GeoMatchConstraintType
pattern $bGeoMatchConstraintType_Country :: GeoMatchConstraintType
$mGeoMatchConstraintType_Country :: forall r.
GeoMatchConstraintType -> (Void# -> r) -> (Void# -> r) -> r
GeoMatchConstraintType_Country = GeoMatchConstraintType' "Country"

{-# COMPLETE
  GeoMatchConstraintType_Country,
  GeoMatchConstraintType'
  #-}