{-# 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.ChannelPrivacy
-- 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.ChannelPrivacy
  ( ChannelPrivacy
      ( ..,
        ChannelPrivacy_PRIVATE,
        ChannelPrivacy_PUBLIC
      ),
  )
where

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

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

pattern ChannelPrivacy_PRIVATE :: ChannelPrivacy
pattern $bChannelPrivacy_PRIVATE :: ChannelPrivacy
$mChannelPrivacy_PRIVATE :: forall r. ChannelPrivacy -> (Void# -> r) -> (Void# -> r) -> r
ChannelPrivacy_PRIVATE = ChannelPrivacy' "PRIVATE"

pattern ChannelPrivacy_PUBLIC :: ChannelPrivacy
pattern $bChannelPrivacy_PUBLIC :: ChannelPrivacy
$mChannelPrivacy_PUBLIC :: forall r. ChannelPrivacy -> (Void# -> r) -> (Void# -> r) -> r
ChannelPrivacy_PUBLIC = ChannelPrivacy' "PUBLIC"

{-# COMPLETE
  ChannelPrivacy_PRIVATE,
  ChannelPrivacy_PUBLIC,
  ChannelPrivacy'
  #-}