{-# 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.TransportProtocol
-- 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.TransportProtocol
  ( TransportProtocol
      ( ..,
        TransportProtocol_Tcp,
        TransportProtocol_Udp
      ),
  )
where

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

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

pattern TransportProtocol_Tcp :: TransportProtocol
pattern $bTransportProtocol_Tcp :: TransportProtocol
$mTransportProtocol_Tcp :: forall {r}. TransportProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
TransportProtocol_Tcp = TransportProtocol' "tcp"

pattern TransportProtocol_Udp :: TransportProtocol
pattern $bTransportProtocol_Udp :: TransportProtocol
$mTransportProtocol_Udp :: forall {r}. TransportProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
TransportProtocol_Udp = TransportProtocol' "udp"

{-# COMPLETE
  TransportProtocol_Tcp,
  TransportProtocol_Udp,
  TransportProtocol'
  #-}