{-# 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.AppMesh.Types.PortProtocol
-- 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.AppMesh.Types.PortProtocol
  ( PortProtocol
      ( ..,
        PortProtocol_Grpc,
        PortProtocol_Http,
        PortProtocol_Http2,
        PortProtocol_Tcp
      ),
  )
where

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

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

pattern PortProtocol_Grpc :: PortProtocol
pattern $bPortProtocol_Grpc :: PortProtocol
$mPortProtocol_Grpc :: forall {r}. PortProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
PortProtocol_Grpc = PortProtocol' "grpc"

pattern PortProtocol_Http :: PortProtocol
pattern $bPortProtocol_Http :: PortProtocol
$mPortProtocol_Http :: forall {r}. PortProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
PortProtocol_Http = PortProtocol' "http"

pattern PortProtocol_Http2 :: PortProtocol
pattern $bPortProtocol_Http2 :: PortProtocol
$mPortProtocol_Http2 :: forall {r}. PortProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
PortProtocol_Http2 = PortProtocol' "http2"

pattern PortProtocol_Tcp :: PortProtocol
pattern $bPortProtocol_Tcp :: PortProtocol
$mPortProtocol_Tcp :: forall {r}. PortProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
PortProtocol_Tcp = PortProtocol' "tcp"

{-# COMPLETE
  PortProtocol_Grpc,
  PortProtocol_Http,
  PortProtocol_Http2,
  PortProtocol_Tcp,
  PortProtocol'
  #-}