{-# 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.ElastiCache.Types.IpDiscovery
-- 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.ElastiCache.Types.IpDiscovery
  ( IpDiscovery
      ( ..,
        IpDiscovery_Ipv4,
        IpDiscovery_Ipv6
      ),
  )
where

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

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

pattern IpDiscovery_Ipv4 :: IpDiscovery
pattern $bIpDiscovery_Ipv4 :: IpDiscovery
$mIpDiscovery_Ipv4 :: forall {r}. IpDiscovery -> ((# #) -> r) -> ((# #) -> r) -> r
IpDiscovery_Ipv4 = IpDiscovery' "ipv4"

pattern IpDiscovery_Ipv6 :: IpDiscovery
pattern $bIpDiscovery_Ipv6 :: IpDiscovery
$mIpDiscovery_Ipv6 :: forall {r}. IpDiscovery -> ((# #) -> r) -> ((# #) -> r) -> r
IpDiscovery_Ipv6 = IpDiscovery' "ipv6"

{-# COMPLETE
  IpDiscovery_Ipv4,
  IpDiscovery_Ipv6,
  IpDiscovery'
  #-}