{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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.Prelude as Prelude

newtype PortProtocol = PortProtocol'
  { PortProtocol -> Text
fromPortProtocol ::
      Core.Text
  }
  deriving stock
    ( Int -> PortProtocol -> ShowS
[PortProtocol] -> ShowS
PortProtocol -> String
(Int -> PortProtocol -> ShowS)
-> (PortProtocol -> String)
-> ([PortProtocol] -> ShowS)
-> Show PortProtocol
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]
(Int -> ReadS PortProtocol)
-> ReadS [PortProtocol]
-> ReadPrec PortProtocol
-> ReadPrec [PortProtocol]
-> Read 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
(PortProtocol -> PortProtocol -> Bool)
-> (PortProtocol -> PortProtocol -> Bool) -> Eq PortProtocol
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
Eq PortProtocol
-> (PortProtocol -> PortProtocol -> Ordering)
-> (PortProtocol -> PortProtocol -> Bool)
-> (PortProtocol -> PortProtocol -> Bool)
-> (PortProtocol -> PortProtocol -> Bool)
-> (PortProtocol -> PortProtocol -> Bool)
-> (PortProtocol -> PortProtocol -> PortProtocol)
-> (PortProtocol -> PortProtocol -> PortProtocol)
-> Ord 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
$cp1Ord :: Eq PortProtocol
Prelude.Ord,
      (forall x. PortProtocol -> Rep PortProtocol x)
-> (forall x. Rep PortProtocol x -> PortProtocol)
-> Generic PortProtocol
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
    ( Int -> PortProtocol -> Int
PortProtocol -> Int
(Int -> PortProtocol -> Int)
-> (PortProtocol -> Int) -> Hashable PortProtocol
forall 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 -> ()
(PortProtocol -> ()) -> NFData PortProtocol
forall a. (a -> ()) -> NFData a
rnf :: PortProtocol -> ()
$crnf :: PortProtocol -> ()
Prelude.NFData,
      Text -> Either String PortProtocol
(Text -> Either String PortProtocol) -> FromText PortProtocol
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String PortProtocol
$cfromText :: Text -> Either String PortProtocol
Core.FromText,
      PortProtocol -> Text
(PortProtocol -> Text) -> ToText PortProtocol
forall a. (a -> Text) -> ToText a
toText :: PortProtocol -> Text
$ctoText :: PortProtocol -> Text
Core.ToText,
      PortProtocol -> ByteString
(PortProtocol -> ByteString) -> ToByteString PortProtocol
forall a. (a -> ByteString) -> ToByteString a
toBS :: PortProtocol -> ByteString
$ctoBS :: PortProtocol -> ByteString
Core.ToByteString,
      PortProtocol -> ByteStringBuilder
(PortProtocol -> ByteStringBuilder) -> ToLog PortProtocol
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: PortProtocol -> ByteStringBuilder
$cbuild :: PortProtocol -> ByteStringBuilder
Core.ToLog,
      HeaderName -> PortProtocol -> [Header]
(HeaderName -> PortProtocol -> [Header]) -> ToHeader PortProtocol
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> PortProtocol -> [Header]
$ctoHeader :: HeaderName -> PortProtocol -> [Header]
Core.ToHeader,
      PortProtocol -> QueryString
(PortProtocol -> QueryString) -> ToQuery PortProtocol
forall a. (a -> QueryString) -> ToQuery a
toQuery :: PortProtocol -> QueryString
$ctoQuery :: PortProtocol -> QueryString
Core.ToQuery,
      Value -> Parser [PortProtocol]
Value -> Parser PortProtocol
(Value -> Parser PortProtocol)
-> (Value -> Parser [PortProtocol]) -> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [PortProtocol]
FromJSONKeyFunction PortProtocol
FromJSONKeyFunction PortProtocol
-> FromJSONKeyFunction [PortProtocol] -> FromJSONKey PortProtocol
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [PortProtocol]
$cfromJSONKeyList :: FromJSONKeyFunction [PortProtocol]
fromJSONKey :: FromJSONKeyFunction PortProtocol
$cfromJSONKey :: FromJSONKeyFunction PortProtocol
Core.FromJSONKey,
      [PortProtocol] -> Encoding
[PortProtocol] -> Value
PortProtocol -> Encoding
PortProtocol -> Value
(PortProtocol -> Value)
-> (PortProtocol -> Encoding)
-> ([PortProtocol] -> Value)
-> ([PortProtocol] -> Encoding)
-> ToJSON PortProtocol
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
Core.ToJSON,
      ToJSONKeyFunction [PortProtocol]
ToJSONKeyFunction PortProtocol
ToJSONKeyFunction PortProtocol
-> ToJSONKeyFunction [PortProtocol] -> ToJSONKey PortProtocol
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [PortProtocol]
$ctoJSONKeyList :: ToJSONKeyFunction [PortProtocol]
toJSONKey :: ToJSONKeyFunction PortProtocol
$ctoJSONKey :: ToJSONKeyFunction PortProtocol
Core.ToJSONKey,
      [Node] -> Either String PortProtocol
([Node] -> Either String PortProtocol) -> FromXML PortProtocol
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String PortProtocol
$cparseXML :: [Node] -> Either String PortProtocol
Core.FromXML,
      PortProtocol -> XML
(PortProtocol -> XML) -> ToXML PortProtocol
forall a. (a -> XML) -> ToXML a
toXML :: PortProtocol -> XML
$ctoXML :: PortProtocol -> XML
Core.ToXML
    )

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

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

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

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

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