{-# 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.GlobalAccelerator.Types.Protocol
-- 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.GlobalAccelerator.Types.Protocol
  ( Protocol
      ( ..,
        Protocol_TCP,
        Protocol_UDP
      ),
  )
where

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

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

pattern Protocol_TCP :: Protocol
pattern $bProtocol_TCP :: Protocol
$mProtocol_TCP :: forall r. Protocol -> (Void# -> r) -> (Void# -> r) -> r
Protocol_TCP = Protocol' "TCP"

pattern Protocol_UDP :: Protocol
pattern $bProtocol_UDP :: Protocol
$mProtocol_UDP :: forall r. Protocol -> (Void# -> r) -> (Void# -> r) -> r
Protocol_UDP = Protocol' "UDP"

{-# COMPLETE
  Protocol_TCP,
  Protocol_UDP,
  Protocol'
  #-}