{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.ChatPermissions where
import Data.Aeson (FromJSON (..), ToJSON (..))
import GHC.Generics (Generic)
import Telegram.Bot.API.Internal.Utils
data ChatPermissions = ChatPermissions
{ ChatPermissions -> Maybe Bool
chatPermissionsCanSendMessages :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanSendAudios :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanSendDocuments :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanSendPhotos :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanSendVideos :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanSendVideoNotes :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanSendVoiceNotes :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanSendPolls :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanSendOtherMessages :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanAddWebPagePreviews :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanChangeInfo :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanInviteUsers :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanPinMessages :: Maybe Bool
, ChatPermissions -> Maybe Bool
chatPermissionsCanManageTopics :: Maybe Bool
}
deriving (forall x. Rep ChatPermissions x -> ChatPermissions
forall x. ChatPermissions -> Rep ChatPermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChatPermissions x -> ChatPermissions
$cfrom :: forall x. ChatPermissions -> Rep ChatPermissions x
Generic, Int -> ChatPermissions -> ShowS
[ChatPermissions] -> ShowS
ChatPermissions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChatPermissions] -> ShowS
$cshowList :: [ChatPermissions] -> ShowS
show :: ChatPermissions -> String
$cshow :: ChatPermissions -> String
showsPrec :: Int -> ChatPermissions -> ShowS
$cshowsPrec :: Int -> ChatPermissions -> ShowS
Show)
instance ToJSON ChatPermissions where toJSON :: ChatPermissions -> 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 ChatPermissions where parseJSON :: Value -> Parser ChatPermissions
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON