module Calamity.Types.Model.Guild.Overwrite
( Overwrite(..) ) where
import Calamity.Internal.AesonThings
import Calamity.Types.Snowflake
import Data.Aeson
import Data.Text.Lazy ( Text )
import Data.Word
import GHC.Generics
import TextShow
import qualified TextShow.Generic as TSG
data Overwrite = Overwrite
{ Overwrite -> Snowflake Overwrite
id :: Snowflake Overwrite
, Overwrite -> Text
type_ :: Text
, Overwrite -> Word64
allow :: Word64
, Overwrite -> Word64
deny :: Word64
}
deriving ( Overwrite -> Overwrite -> Bool
(Overwrite -> Overwrite -> Bool)
-> (Overwrite -> Overwrite -> Bool) -> Eq Overwrite
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Overwrite -> Overwrite -> Bool
$c/= :: Overwrite -> Overwrite -> Bool
== :: Overwrite -> Overwrite -> Bool
$c== :: Overwrite -> Overwrite -> Bool
Eq, Int -> Overwrite -> ShowS
[Overwrite] -> ShowS
Overwrite -> String
(Int -> Overwrite -> ShowS)
-> (Overwrite -> String)
-> ([Overwrite] -> ShowS)
-> Show Overwrite
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Overwrite] -> ShowS
$cshowList :: [Overwrite] -> ShowS
show :: Overwrite -> String
$cshow :: Overwrite -> String
showsPrec :: Int -> Overwrite -> ShowS
$cshowsPrec :: Int -> Overwrite -> ShowS
Show, (forall x. Overwrite -> Rep Overwrite x)
-> (forall x. Rep Overwrite x -> Overwrite) -> Generic Overwrite
forall x. Rep Overwrite x -> Overwrite
forall x. Overwrite -> Rep Overwrite x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Overwrite x -> Overwrite
$cfrom :: forall x. Overwrite -> Rep Overwrite x
Generic )
deriving ( Int -> Overwrite -> Builder
Int -> Overwrite -> Text
Int -> Overwrite -> Text
[Overwrite] -> Builder
[Overwrite] -> Text
[Overwrite] -> Text
Overwrite -> Builder
Overwrite -> Text
Overwrite -> Text
(Int -> Overwrite -> Builder)
-> (Overwrite -> Builder)
-> ([Overwrite] -> Builder)
-> (Int -> Overwrite -> Text)
-> (Overwrite -> Text)
-> ([Overwrite] -> Text)
-> (Int -> Overwrite -> Text)
-> (Overwrite -> Text)
-> ([Overwrite] -> Text)
-> TextShow Overwrite
forall a.
(Int -> a -> Builder)
-> (a -> Builder)
-> ([a] -> Builder)
-> (Int -> a -> Text)
-> (a -> Text)
-> ([a] -> Text)
-> (Int -> a -> Text)
-> (a -> Text)
-> ([a] -> Text)
-> TextShow a
showtlList :: [Overwrite] -> Text
$cshowtlList :: [Overwrite] -> Text
showtl :: Overwrite -> Text
$cshowtl :: Overwrite -> Text
showtlPrec :: Int -> Overwrite -> Text
$cshowtlPrec :: Int -> Overwrite -> Text
showtList :: [Overwrite] -> Text
$cshowtList :: [Overwrite] -> Text
showt :: Overwrite -> Text
$cshowt :: Overwrite -> Text
showtPrec :: Int -> Overwrite -> Text
$cshowtPrec :: Int -> Overwrite -> Text
showbList :: [Overwrite] -> Builder
$cshowbList :: [Overwrite] -> Builder
showb :: Overwrite -> Builder
$cshowb :: Overwrite -> Builder
showbPrec :: Int -> Overwrite -> Builder
$cshowbPrec :: Int -> Overwrite -> Builder
TextShow ) via TSG.FromGeneric Overwrite
deriving ( [Overwrite] -> Encoding
[Overwrite] -> Value
Overwrite -> Encoding
Overwrite -> Value
(Overwrite -> Value)
-> (Overwrite -> Encoding)
-> ([Overwrite] -> Value)
-> ([Overwrite] -> Encoding)
-> ToJSON Overwrite
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Overwrite] -> Encoding
$ctoEncodingList :: [Overwrite] -> Encoding
toJSONList :: [Overwrite] -> Value
$ctoJSONList :: [Overwrite] -> Value
toEncoding :: Overwrite -> Encoding
$ctoEncoding :: Overwrite -> Encoding
toJSON :: Overwrite -> Value
$ctoJSON :: Overwrite -> Value
ToJSON, Value -> Parser [Overwrite]
Value -> Parser Overwrite
(Value -> Parser Overwrite)
-> (Value -> Parser [Overwrite]) -> FromJSON Overwrite
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Overwrite]
$cparseJSONList :: Value -> Parser [Overwrite]
parseJSON :: Value -> Parser Overwrite
$cparseJSON :: Value -> Parser Overwrite
FromJSON ) via CalamityJSON Overwrite
deriving ( HasID Overwrite ) via HasIDField "id" Overwrite