{-# 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.KinesisVideo.Types.ChannelProtocol
-- 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.KinesisVideo.Types.ChannelProtocol
  ( ChannelProtocol
      ( ..,
        ChannelProtocol_HTTPS,
        ChannelProtocol_WSS
      ),
  )
where

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

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

pattern ChannelProtocol_HTTPS :: ChannelProtocol
pattern $bChannelProtocol_HTTPS :: ChannelProtocol
$mChannelProtocol_HTTPS :: forall r. ChannelProtocol -> (Void# -> r) -> (Void# -> r) -> r
ChannelProtocol_HTTPS = ChannelProtocol' "HTTPS"

pattern ChannelProtocol_WSS :: ChannelProtocol
pattern $bChannelProtocol_WSS :: ChannelProtocol
$mChannelProtocol_WSS :: forall r. ChannelProtocol -> (Void# -> r) -> (Void# -> r) -> r
ChannelProtocol_WSS = ChannelProtocol' "WSS"

{-# COMPLETE
  ChannelProtocol_HTTPS,
  ChannelProtocol_WSS,
  ChannelProtocol'
  #-}