{-# 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.QuickSight.Types.UserRole
-- 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.QuickSight.Types.UserRole
  ( UserRole
      ( ..,
        UserRole_ADMIN,
        UserRole_AUTHOR,
        UserRole_READER,
        UserRole_RESTRICTED_AUTHOR,
        UserRole_RESTRICTED_READER
      ),
  )
where

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

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

pattern UserRole_ADMIN :: UserRole
pattern $bUserRole_ADMIN :: UserRole
$mUserRole_ADMIN :: forall r. UserRole -> (Void# -> r) -> (Void# -> r) -> r
UserRole_ADMIN = UserRole' "ADMIN"

pattern UserRole_AUTHOR :: UserRole
pattern $bUserRole_AUTHOR :: UserRole
$mUserRole_AUTHOR :: forall r. UserRole -> (Void# -> r) -> (Void# -> r) -> r
UserRole_AUTHOR = UserRole' "AUTHOR"

pattern UserRole_READER :: UserRole
pattern $bUserRole_READER :: UserRole
$mUserRole_READER :: forall r. UserRole -> (Void# -> r) -> (Void# -> r) -> r
UserRole_READER = UserRole' "READER"

pattern UserRole_RESTRICTED_AUTHOR :: UserRole
pattern $bUserRole_RESTRICTED_AUTHOR :: UserRole
$mUserRole_RESTRICTED_AUTHOR :: forall r. UserRole -> (Void# -> r) -> (Void# -> r) -> r
UserRole_RESTRICTED_AUTHOR = UserRole' "RESTRICTED_AUTHOR"

pattern UserRole_RESTRICTED_READER :: UserRole
pattern $bUserRole_RESTRICTED_READER :: UserRole
$mUserRole_RESTRICTED_READER :: forall r. UserRole -> (Void# -> r) -> (Void# -> r) -> r
UserRole_RESTRICTED_READER = UserRole' "RESTRICTED_READER"

{-# COMPLETE
  UserRole_ADMIN,
  UserRole_AUTHOR,
  UserRole_READER,
  UserRole_RESTRICTED_AUTHOR,
  UserRole_RESTRICTED_READER,
  UserRole'
  #-}