{-# 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.VirtualGatewayPortProtocol
-- 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.VirtualGatewayPortProtocol
  ( VirtualGatewayPortProtocol
      ( ..,
        VirtualGatewayPortProtocol_Grpc,
        VirtualGatewayPortProtocol_Http,
        VirtualGatewayPortProtocol_Http2
      ),
  )
where

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

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

pattern VirtualGatewayPortProtocol_Grpc :: VirtualGatewayPortProtocol
pattern $bVirtualGatewayPortProtocol_Grpc :: VirtualGatewayPortProtocol
$mVirtualGatewayPortProtocol_Grpc :: forall {r}.
VirtualGatewayPortProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
VirtualGatewayPortProtocol_Grpc = VirtualGatewayPortProtocol' "grpc"

pattern VirtualGatewayPortProtocol_Http :: VirtualGatewayPortProtocol
pattern $bVirtualGatewayPortProtocol_Http :: VirtualGatewayPortProtocol
$mVirtualGatewayPortProtocol_Http :: forall {r}.
VirtualGatewayPortProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
VirtualGatewayPortProtocol_Http = VirtualGatewayPortProtocol' "http"

pattern VirtualGatewayPortProtocol_Http2 :: VirtualGatewayPortProtocol
pattern $bVirtualGatewayPortProtocol_Http2 :: VirtualGatewayPortProtocol
$mVirtualGatewayPortProtocol_Http2 :: forall {r}.
VirtualGatewayPortProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
VirtualGatewayPortProtocol_Http2 = VirtualGatewayPortProtocol' "http2"

{-# COMPLETE
  VirtualGatewayPortProtocol_Grpc,
  VirtualGatewayPortProtocol_Http,
  VirtualGatewayPortProtocol_Http2,
  VirtualGatewayPortProtocol'
  #-}