{-# 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.Chime.Types.OriginationRouteProtocol
-- 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.Chime.Types.OriginationRouteProtocol
  ( OriginationRouteProtocol
      ( ..,
        OriginationRouteProtocol_TCP,
        OriginationRouteProtocol_UDP
      ),
  )
where

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

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

pattern OriginationRouteProtocol_TCP :: OriginationRouteProtocol
pattern $bOriginationRouteProtocol_TCP :: OriginationRouteProtocol
$mOriginationRouteProtocol_TCP :: forall r.
OriginationRouteProtocol -> (Void# -> r) -> (Void# -> r) -> r
OriginationRouteProtocol_TCP = OriginationRouteProtocol' "TCP"

pattern OriginationRouteProtocol_UDP :: OriginationRouteProtocol
pattern $bOriginationRouteProtocol_UDP :: OriginationRouteProtocol
$mOriginationRouteProtocol_UDP :: forall r.
OriginationRouteProtocol -> (Void# -> r) -> (Void# -> r) -> r
OriginationRouteProtocol_UDP = OriginationRouteProtocol' "UDP"

{-# COMPLETE
  OriginationRouteProtocol_TCP,
  OriginationRouteProtocol_UDP,
  OriginationRouteProtocol'
  #-}