{-# 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.WorkMail.Types.MemberType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.WorkMail.Types.MemberType
  ( MemberType
      ( ..,
        MemberType_GROUP,
        MemberType_USER
      ),
  )
where

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

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

pattern MemberType_GROUP :: MemberType
pattern $bMemberType_GROUP :: MemberType
$mMemberType_GROUP :: forall {r}. MemberType -> ((# #) -> r) -> ((# #) -> r) -> r
MemberType_GROUP = MemberType' "GROUP"

pattern MemberType_USER :: MemberType
pattern $bMemberType_USER :: MemberType
$mMemberType_USER :: forall {r}. MemberType -> ((# #) -> r) -> ((# #) -> r) -> r
MemberType_USER = MemberType' "USER"

{-# COMPLETE
  MemberType_GROUP,
  MemberType_USER,
  MemberType'
  #-}