{-# 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.AppStream.Types.PreferredProtocol
-- 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.AppStream.Types.PreferredProtocol
  ( PreferredProtocol
      ( ..,
        PreferredProtocol_TCP,
        PreferredProtocol_UDP
      ),
  )
where

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

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

pattern PreferredProtocol_TCP :: PreferredProtocol
pattern $bPreferredProtocol_TCP :: PreferredProtocol
$mPreferredProtocol_TCP :: forall {r}. PreferredProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
PreferredProtocol_TCP = PreferredProtocol' "TCP"

pattern PreferredProtocol_UDP :: PreferredProtocol
pattern $bPreferredProtocol_UDP :: PreferredProtocol
$mPreferredProtocol_UDP :: forall {r}. PreferredProtocol -> ((# #) -> r) -> ((# #) -> r) -> r
PreferredProtocol_UDP = PreferredProtocol' "UDP"

{-# COMPLETE
  PreferredProtocol_TCP,
  PreferredProtocol_UDP,
  PreferredProtocol'
  #-}