{-# 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.ChannelRole
-- 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.ChannelRole
  ( ChannelRole
      ( ..,
        ChannelRole_MASTER,
        ChannelRole_VIEWER
      ),
  )
where

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

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

pattern ChannelRole_MASTER :: ChannelRole
pattern $bChannelRole_MASTER :: ChannelRole
$mChannelRole_MASTER :: forall r. ChannelRole -> (Void# -> r) -> (Void# -> r) -> r
ChannelRole_MASTER = ChannelRole' "MASTER"

pattern ChannelRole_VIEWER :: ChannelRole
pattern $bChannelRole_VIEWER :: ChannelRole
$mChannelRole_VIEWER :: forall r. ChannelRole -> (Void# -> r) -> (Void# -> r) -> r
ChannelRole_VIEWER = ChannelRole' "VIEWER"

{-# COMPLETE
  ChannelRole_MASTER,
  ChannelRole_VIEWER,
  ChannelRole'
  #-}