{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.ChatMember where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import Data.Time.Clock.POSIX (POSIXTime)
import GHC.Generics (Generic)
import Telegram.Bot.API.Types.User
import Telegram.Bot.API.Internal.Utils
data ChatMember = ChatMember
{ ChatMember -> User
chatMemberUser :: User
, ChatMember -> Text
chatMemberStatus :: Text
, ChatMember -> Maybe POSIXTime
chatMemberUntilDate :: Maybe POSIXTime
, ChatMember -> Maybe Bool
chatMemberIsAnonymous :: Maybe Bool
, ChatMember -> Maybe Text
chatMemberCustomTitle :: Maybe Text
, ChatMember -> Maybe Bool
chatMemberCanBeEdited :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanManageChat :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanDeleteMessages :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanManageVideoChats :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanRestrictMembers :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanPromoteMembers :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanChangeInfo :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanPostMessages :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanEditMessages :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanInviteUsers :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanPinMessages :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanManageTopics :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberIsMember :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendMessages :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendAudios :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendDocuments :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendPhotos :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendVideos :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendVideoNotes :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendVoiceNotes :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendPolls :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanSendOtherMessages :: Maybe Bool
, ChatMember -> Maybe Bool
chatMemberCanAddWebPagePreviews :: Maybe Bool
}
deriving (forall x. Rep ChatMember x -> ChatMember
forall x. ChatMember -> Rep ChatMember x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChatMember x -> ChatMember
$cfrom :: forall x. ChatMember -> Rep ChatMember x
Generic, Int -> ChatMember -> ShowS
[ChatMember] -> ShowS
ChatMember -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChatMember] -> ShowS
$cshowList :: [ChatMember] -> ShowS
show :: ChatMember -> String
$cshow :: ChatMember -> String
showsPrec :: Int -> ChatMember -> ShowS
$cshowsPrec :: Int -> ChatMember -> ShowS
Show)
instance ToJSON ChatMember where toJSON :: ChatMember -> 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 ChatMember where parseJSON :: Value -> Parser ChatMember
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON