{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.ChatAdministratorRights where
import Data.Aeson (FromJSON (..), ToJSON (..))
import GHC.Generics (Generic)
import Telegram.Bot.API.Internal.Utils
data ChatAdministratorRights = ChatAdministratorRights
{ ChatAdministratorRights -> Bool
chatAdministratorRightsIsAnonymous :: Bool
, ChatAdministratorRights -> Bool
chatAdministratorRightsCanManageChat :: Bool
, ChatAdministratorRights -> Bool
chatAdministratorRightsCanDeleteMessages :: Bool
, ChatAdministratorRights -> Bool
chatAdministratorRightsCanManageVideoChats :: Bool
, ChatAdministratorRights -> Bool
chatAdministratorRightsCanRestrictMembers :: Bool
, ChatAdministratorRights -> Bool
chatAdministratorRightsCanPromoteMembers :: Bool
, ChatAdministratorRights -> Bool
chatAdministratorRightsCanChangeInfo :: Bool
, ChatAdministratorRights -> Bool
chatAdministratorRightsCanInviteUsers :: Bool
, ChatAdministratorRights -> Maybe Bool
chatAdministratorRightsCanPostMessages :: Maybe Bool
, ChatAdministratorRights -> Maybe Bool
chatAdministratorRightsCanEditMessages :: Maybe Bool
, ChatAdministratorRights -> Maybe Bool
chatAdministratorRightsCanPinMessages :: Maybe Bool
, ChatAdministratorRights -> Maybe Bool
chatAdministratorRightsCanManageTopics :: Maybe Bool
}
deriving (forall x. Rep ChatAdministratorRights x -> ChatAdministratorRights
forall x. ChatAdministratorRights -> Rep ChatAdministratorRights x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChatAdministratorRights x -> ChatAdministratorRights
$cfrom :: forall x. ChatAdministratorRights -> Rep ChatAdministratorRights x
Generic, Int -> ChatAdministratorRights -> ShowS
[ChatAdministratorRights] -> ShowS
ChatAdministratorRights -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChatAdministratorRights] -> ShowS
$cshowList :: [ChatAdministratorRights] -> ShowS
show :: ChatAdministratorRights -> String
$cshow :: ChatAdministratorRights -> String
showsPrec :: Int -> ChatAdministratorRights -> ShowS
$cshowsPrec :: Int -> ChatAdministratorRights -> ShowS
Show)
instance ToJSON ChatAdministratorRights where toJSON :: ChatAdministratorRights -> Value
toJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON ChatAdministratorRights where parseJSON :: Value -> Parser ChatAdministratorRights
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON