{-# 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.ChannelMode
-- 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.ChannelMode
  ( ChannelMode
      ( ..,
        ChannelMode_RESTRICTED,
        ChannelMode_UNRESTRICTED
      ),
  )
where

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

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

pattern ChannelMode_RESTRICTED :: ChannelMode
pattern $bChannelMode_RESTRICTED :: ChannelMode
$mChannelMode_RESTRICTED :: forall r. ChannelMode -> (Void# -> r) -> (Void# -> r) -> r
ChannelMode_RESTRICTED = ChannelMode' "RESTRICTED"

pattern ChannelMode_UNRESTRICTED :: ChannelMode
pattern $bChannelMode_UNRESTRICTED :: ChannelMode
$mChannelMode_UNRESTRICTED :: forall r. ChannelMode -> (Void# -> r) -> (Void# -> r) -> r
ChannelMode_UNRESTRICTED = ChannelMode' "UNRESTRICTED"

{-# COMPLETE
  ChannelMode_RESTRICTED,
  ChannelMode_UNRESTRICTED,
  ChannelMode'
  #-}