{-# 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.GlobalAccelerator.Types.IpAddressFamily
-- 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.GlobalAccelerator.Types.IpAddressFamily
  ( IpAddressFamily
      ( ..,
        IpAddressFamily_IPv4,
        IpAddressFamily_IPv6
      ),
  )
where

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

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

pattern IpAddressFamily_IPv4 :: IpAddressFamily
pattern $bIpAddressFamily_IPv4 :: IpAddressFamily
$mIpAddressFamily_IPv4 :: forall {r}. IpAddressFamily -> ((# #) -> r) -> ((# #) -> r) -> r
IpAddressFamily_IPv4 = IpAddressFamily' "IPv4"

pattern IpAddressFamily_IPv6 :: IpAddressFamily
pattern $bIpAddressFamily_IPv6 :: IpAddressFamily
$mIpAddressFamily_IPv6 :: forall {r}. IpAddressFamily -> ((# #) -> r) -> ((# #) -> r) -> r
IpAddressFamily_IPv6 = IpAddressFamily' "IPv6"

{-# COMPLETE
  IpAddressFamily_IPv4,
  IpAddressFamily_IPv6,
  IpAddressFamily'
  #-}