{-# 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.ECS.Types.TransportProtocol
-- 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.ECS.Types.TransportProtocol
  ( TransportProtocol
      ( ..,
        TransportProtocol_Tcp,
        TransportProtocol_Udp
      ),
  )
where

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

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

pattern TransportProtocol_Tcp :: TransportProtocol
pattern $bTransportProtocol_Tcp :: TransportProtocol
$mTransportProtocol_Tcp :: forall r. TransportProtocol -> (Void# -> r) -> (Void# -> r) -> r
TransportProtocol_Tcp = TransportProtocol' "tcp"

pattern TransportProtocol_Udp :: TransportProtocol
pattern $bTransportProtocol_Udp :: TransportProtocol
$mTransportProtocol_Udp :: forall r. TransportProtocol -> (Void# -> r) -> (Void# -> r) -> r
TransportProtocol_Udp = TransportProtocol' "udp"

{-# COMPLETE
  TransportProtocol_Tcp,
  TransportProtocol_Udp,
  TransportProtocol'
  #-}