{-# 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.CustomRoutingProtocol
-- 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.CustomRoutingProtocol
  ( CustomRoutingProtocol
      ( ..,
        CustomRoutingProtocol_TCP,
        CustomRoutingProtocol_UDP
      ),
  )
where

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

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

pattern CustomRoutingProtocol_TCP :: CustomRoutingProtocol
pattern $bCustomRoutingProtocol_TCP :: CustomRoutingProtocol
$mCustomRoutingProtocol_TCP :: forall r.
CustomRoutingProtocol -> (Void# -> r) -> (Void# -> r) -> r
CustomRoutingProtocol_TCP = CustomRoutingProtocol' "TCP"

pattern CustomRoutingProtocol_UDP :: CustomRoutingProtocol
pattern $bCustomRoutingProtocol_UDP :: CustomRoutingProtocol
$mCustomRoutingProtocol_UDP :: forall r.
CustomRoutingProtocol -> (Void# -> r) -> (Void# -> r) -> r
CustomRoutingProtocol_UDP = CustomRoutingProtocol' "UDP"

{-# COMPLETE
  CustomRoutingProtocol_TCP,
  CustomRoutingProtocol_UDP,
  CustomRoutingProtocol'
  #-}