{-# 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.PermissionType
-- 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.PermissionType
  ( PermissionType
      ( ..,
        PermissionType_FULL_ACCESS,
        PermissionType_SEND_AS,
        PermissionType_SEND_ON_BEHALF
      ),
  )
where

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

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

pattern PermissionType_FULL_ACCESS :: PermissionType
pattern $bPermissionType_FULL_ACCESS :: PermissionType
$mPermissionType_FULL_ACCESS :: forall {r}. PermissionType -> ((# #) -> r) -> ((# #) -> r) -> r
PermissionType_FULL_ACCESS = PermissionType' "FULL_ACCESS"

pattern PermissionType_SEND_AS :: PermissionType
pattern $bPermissionType_SEND_AS :: PermissionType
$mPermissionType_SEND_AS :: forall {r}. PermissionType -> ((# #) -> r) -> ((# #) -> r) -> r
PermissionType_SEND_AS = PermissionType' "SEND_AS"

pattern PermissionType_SEND_ON_BEHALF :: PermissionType
pattern $bPermissionType_SEND_ON_BEHALF :: PermissionType
$mPermissionType_SEND_ON_BEHALF :: forall {r}. PermissionType -> ((# #) -> r) -> ((# #) -> r) -> r
PermissionType_SEND_ON_BEHALF = PermissionType' "SEND_ON_BEHALF"

{-# COMPLETE
  PermissionType_FULL_ACCESS,
  PermissionType_SEND_AS,
  PermissionType_SEND_ON_BEHALF,
  PermissionType'
  #-}