{-# 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.EC2.Types.TunnelInsideIpVersion
-- 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.EC2.Types.TunnelInsideIpVersion
  ( TunnelInsideIpVersion
      ( ..,
        TunnelInsideIpVersion_Ipv4,
        TunnelInsideIpVersion_Ipv6
      ),
  )
where

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

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

pattern TunnelInsideIpVersion_Ipv4 :: TunnelInsideIpVersion
pattern $bTunnelInsideIpVersion_Ipv4 :: TunnelInsideIpVersion
$mTunnelInsideIpVersion_Ipv4 :: forall {r}.
TunnelInsideIpVersion -> ((# #) -> r) -> ((# #) -> r) -> r
TunnelInsideIpVersion_Ipv4 = TunnelInsideIpVersion' "ipv4"

pattern TunnelInsideIpVersion_Ipv6 :: TunnelInsideIpVersion
pattern $bTunnelInsideIpVersion_Ipv6 :: TunnelInsideIpVersion
$mTunnelInsideIpVersion_Ipv6 :: forall {r}.
TunnelInsideIpVersion -> ((# #) -> r) -> ((# #) -> r) -> r
TunnelInsideIpVersion_Ipv6 = TunnelInsideIpVersion' "ipv6"

{-# COMPLETE
  TunnelInsideIpVersion_Ipv4,
  TunnelInsideIpVersion_Ipv6,
  TunnelInsideIpVersion'
  #-}