{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.ChatMemberUpdated where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Time.Clock.POSIX (POSIXTime)
import GHC.Generics (Generic)
import Telegram.Bot.API.Types.Chat
import Telegram.Bot.API.Types.ChatInviteLink
import Telegram.Bot.API.Types.ChatMember
import Telegram.Bot.API.Types.User
import Telegram.Bot.API.Internal.Utils
data ChatMemberUpdated = ChatMemberUpdated
{ ChatMemberUpdated -> Chat
chatMemberUpdatedChat :: Chat
, ChatMemberUpdated -> User
chatMemberUpdatedFrom :: User
, ChatMemberUpdated -> POSIXTime
chatMemberUpdatedDate :: POSIXTime
, ChatMemberUpdated -> ChatMember
chatMemberUpdatedOldChatMember :: ChatMember
, ChatMemberUpdated -> ChatMember
chatMemberUpdatedNewChatMember :: ChatMember
, ChatMemberUpdated -> Maybe ChatInviteLink
chatMemberUpdatedInviteLink :: Maybe ChatInviteLink
}
deriving (forall x. Rep ChatMemberUpdated x -> ChatMemberUpdated
forall x. ChatMemberUpdated -> Rep ChatMemberUpdated x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChatMemberUpdated x -> ChatMemberUpdated
$cfrom :: forall x. ChatMemberUpdated -> Rep ChatMemberUpdated x
Generic, Int -> ChatMemberUpdated -> ShowS
[ChatMemberUpdated] -> ShowS
ChatMemberUpdated -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChatMemberUpdated] -> ShowS
$cshowList :: [ChatMemberUpdated] -> ShowS
show :: ChatMemberUpdated -> String
$cshow :: ChatMemberUpdated -> String
showsPrec :: Int -> ChatMemberUpdated -> ShowS
$cshowsPrec :: Int -> ChatMemberUpdated -> ShowS
Show)
instance ToJSON ChatMemberUpdated where toJSON :: ChatMemberUpdated -> 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 ChatMemberUpdated where parseJSON :: Value -> Parser ChatMemberUpdated
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON