{-# 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.IPSetDescriptorType
-- 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.IPSetDescriptorType
  ( IPSetDescriptorType
      ( ..,
        IPSetDescriptorType_IPV4,
        IPSetDescriptorType_IPV6
      ),
  )
where

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

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

pattern IPSetDescriptorType_IPV4 :: IPSetDescriptorType
pattern $bIPSetDescriptorType_IPV4 :: IPSetDescriptorType
$mIPSetDescriptorType_IPV4 :: forall r. IPSetDescriptorType -> (Void# -> r) -> (Void# -> r) -> r
IPSetDescriptorType_IPV4 = IPSetDescriptorType' "IPV4"

pattern IPSetDescriptorType_IPV6 :: IPSetDescriptorType
pattern $bIPSetDescriptorType_IPV6 :: IPSetDescriptorType
$mIPSetDescriptorType_IPV6 :: forall r. IPSetDescriptorType -> (Void# -> r) -> (Void# -> r) -> r
IPSetDescriptorType_IPV6 = IPSetDescriptorType' "IPV6"

{-# COMPLETE
  IPSetDescriptorType_IPV4,
  IPSetDescriptorType_IPV6,
  IPSetDescriptorType'
  #-}