{-# 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.WorkDocs.Types.RolePermissionType
-- 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.WorkDocs.Types.RolePermissionType
  ( RolePermissionType
      ( ..,
        RolePermissionType_DIRECT,
        RolePermissionType_INHERITED
      ),
  )
where

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

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

pattern RolePermissionType_DIRECT :: RolePermissionType
pattern $bRolePermissionType_DIRECT :: RolePermissionType
$mRolePermissionType_DIRECT :: forall {r}. RolePermissionType -> ((# #) -> r) -> ((# #) -> r) -> r
RolePermissionType_DIRECT = RolePermissionType' "DIRECT"

pattern RolePermissionType_INHERITED :: RolePermissionType
pattern $bRolePermissionType_INHERITED :: RolePermissionType
$mRolePermissionType_INHERITED :: forall {r}. RolePermissionType -> ((# #) -> r) -> ((# #) -> r) -> r
RolePermissionType_INHERITED = RolePermissionType' "INHERITED"

{-# COMPLETE
  RolePermissionType_DIRECT,
  RolePermissionType_INHERITED,
  RolePermissionType'
  #-}