{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Grafana.Types.Role
( Role
( ..,
Role_ADMIN,
Role_EDITOR
),
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
newtype Role = Role' {Role -> Text
fromRole :: Core.Text}
deriving stock
( Int -> Role -> ShowS
[Role] -> ShowS
Role -> String
(Int -> Role -> ShowS)
-> (Role -> String) -> ([Role] -> ShowS) -> Show Role
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Role] -> ShowS
$cshowList :: [Role] -> ShowS
show :: Role -> String
$cshow :: Role -> String
showsPrec :: Int -> Role -> ShowS
$cshowsPrec :: Int -> Role -> ShowS
Prelude.Show,
ReadPrec [Role]
ReadPrec Role
Int -> ReadS Role
ReadS [Role]
(Int -> ReadS Role)
-> ReadS [Role] -> ReadPrec Role -> ReadPrec [Role] -> Read Role
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Role]
$creadListPrec :: ReadPrec [Role]
readPrec :: ReadPrec Role
$creadPrec :: ReadPrec Role
readList :: ReadS [Role]
$creadList :: ReadS [Role]
readsPrec :: Int -> ReadS Role
$creadsPrec :: Int -> ReadS Role
Prelude.Read,
Role -> Role -> Bool
(Role -> Role -> Bool) -> (Role -> Role -> Bool) -> Eq Role
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Role -> Role -> Bool
$c/= :: Role -> Role -> Bool
== :: Role -> Role -> Bool
$c== :: Role -> Role -> Bool
Prelude.Eq,
Eq Role
Eq Role
-> (Role -> Role -> Ordering)
-> (Role -> Role -> Bool)
-> (Role -> Role -> Bool)
-> (Role -> Role -> Bool)
-> (Role -> Role -> Bool)
-> (Role -> Role -> Role)
-> (Role -> Role -> Role)
-> Ord Role
Role -> Role -> Bool
Role -> Role -> Ordering
Role -> Role -> Role
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 :: Role -> Role -> Role
$cmin :: Role -> Role -> Role
max :: Role -> Role -> Role
$cmax :: Role -> Role -> Role
>= :: Role -> Role -> Bool
$c>= :: Role -> Role -> Bool
> :: Role -> Role -> Bool
$c> :: Role -> Role -> Bool
<= :: Role -> Role -> Bool
$c<= :: Role -> Role -> Bool
< :: Role -> Role -> Bool
$c< :: Role -> Role -> Bool
compare :: Role -> Role -> Ordering
$ccompare :: Role -> Role -> Ordering
$cp1Ord :: Eq Role
Prelude.Ord,
(forall x. Role -> Rep Role x)
-> (forall x. Rep Role x -> Role) -> Generic Role
forall x. Rep Role x -> Role
forall x. Role -> Rep Role x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Role x -> Role
$cfrom :: forall x. Role -> Rep Role x
Prelude.Generic
)
deriving newtype
( Int -> Role -> Int
Role -> Int
(Int -> Role -> Int) -> (Role -> Int) -> Hashable Role
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Role -> Int
$chash :: Role -> Int
hashWithSalt :: Int -> Role -> Int
$chashWithSalt :: Int -> Role -> Int
Prelude.Hashable,
Role -> ()
(Role -> ()) -> NFData Role
forall a. (a -> ()) -> NFData a
rnf :: Role -> ()
$crnf :: Role -> ()
Prelude.NFData,
Text -> Either String Role
(Text -> Either String Role) -> FromText Role
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String Role
$cfromText :: Text -> Either String Role
Core.FromText,
Role -> Text
(Role -> Text) -> ToText Role
forall a. (a -> Text) -> ToText a
toText :: Role -> Text
$ctoText :: Role -> Text
Core.ToText,
Role -> ByteString
(Role -> ByteString) -> ToByteString Role
forall a. (a -> ByteString) -> ToByteString a
toBS :: Role -> ByteString
$ctoBS :: Role -> ByteString
Core.ToByteString,
Role -> ByteStringBuilder
(Role -> ByteStringBuilder) -> ToLog Role
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: Role -> ByteStringBuilder
$cbuild :: Role -> ByteStringBuilder
Core.ToLog,
HeaderName -> Role -> [Header]
(HeaderName -> Role -> [Header]) -> ToHeader Role
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> Role -> [Header]
$ctoHeader :: HeaderName -> Role -> [Header]
Core.ToHeader,
Role -> QueryString
(Role -> QueryString) -> ToQuery Role
forall a. (a -> QueryString) -> ToQuery a
toQuery :: Role -> QueryString
$ctoQuery :: Role -> QueryString
Core.ToQuery,
Value -> Parser [Role]
Value -> Parser Role
(Value -> Parser Role) -> (Value -> Parser [Role]) -> FromJSON Role
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Role]
$cparseJSONList :: Value -> Parser [Role]
parseJSON :: Value -> Parser Role
$cparseJSON :: Value -> Parser Role
Core.FromJSON,
FromJSONKeyFunction [Role]
FromJSONKeyFunction Role
FromJSONKeyFunction Role
-> FromJSONKeyFunction [Role] -> FromJSONKey Role
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [Role]
$cfromJSONKeyList :: FromJSONKeyFunction [Role]
fromJSONKey :: FromJSONKeyFunction Role
$cfromJSONKey :: FromJSONKeyFunction Role
Core.FromJSONKey,
[Role] -> Encoding
[Role] -> Value
Role -> Encoding
Role -> Value
(Role -> Value)
-> (Role -> Encoding)
-> ([Role] -> Value)
-> ([Role] -> Encoding)
-> ToJSON Role
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Role] -> Encoding
$ctoEncodingList :: [Role] -> Encoding
toJSONList :: [Role] -> Value
$ctoJSONList :: [Role] -> Value
toEncoding :: Role -> Encoding
$ctoEncoding :: Role -> Encoding
toJSON :: Role -> Value
$ctoJSON :: Role -> Value
Core.ToJSON,
ToJSONKeyFunction [Role]
ToJSONKeyFunction Role
ToJSONKeyFunction Role
-> ToJSONKeyFunction [Role] -> ToJSONKey Role
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [Role]
$ctoJSONKeyList :: ToJSONKeyFunction [Role]
toJSONKey :: ToJSONKeyFunction Role
$ctoJSONKey :: ToJSONKeyFunction Role
Core.ToJSONKey,
[Node] -> Either String Role
([Node] -> Either String Role) -> FromXML Role
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String Role
$cparseXML :: [Node] -> Either String Role
Core.FromXML,
Role -> XML
(Role -> XML) -> ToXML Role
forall a. (a -> XML) -> ToXML a
toXML :: Role -> XML
$ctoXML :: Role -> XML
Core.ToXML
)
pattern Role_ADMIN :: Role
pattern $bRole_ADMIN :: Role
$mRole_ADMIN :: forall r. Role -> (Void# -> r) -> (Void# -> r) -> r
Role_ADMIN = Role' "ADMIN"
pattern Role_EDITOR :: Role
pattern $bRole_EDITOR :: Role
$mRole_EDITOR :: forall r. Role -> (Void# -> r) -> (Void# -> r) -> r
Role_EDITOR = Role' "EDITOR"
{-# COMPLETE
Role_ADMIN,
Role_EDITOR,
Role'
#-}