{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.MessageReactionUpdated 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.Common
import Telegram.Bot.API.Types.ReactionType
import Telegram.Bot.API.Types.User
import Telegram.Bot.API.Internal.Utils
data MessageReactionUpdated = MessageReactionUpdated
{ MessageReactionUpdated -> Chat
messageReactionUpdatedChat :: Chat
, MessageReactionUpdated -> MessageId
messageReactionUpdatedMessageId :: MessageId
, MessageReactionUpdated -> Maybe User
messageReactionUpdatedUser :: Maybe User
, MessageReactionUpdated -> Maybe Chat
messageReactionUpdatedActorChat :: Maybe Chat
, MessageReactionUpdated -> POSIXTime
messageReactionUpdatedDate :: POSIXTime
, MessageReactionUpdated -> [ReactionType]
messageReactionUpdatedOldReaction :: [ReactionType]
, MessageReactionUpdated -> [ReactionType]
messageReactionUpdatedNewReaction :: [ReactionType]
}
deriving ((forall x. MessageReactionUpdated -> Rep MessageReactionUpdated x)
-> (forall x.
Rep MessageReactionUpdated x -> MessageReactionUpdated)
-> Generic MessageReactionUpdated
forall x. Rep MessageReactionUpdated x -> MessageReactionUpdated
forall x. MessageReactionUpdated -> Rep MessageReactionUpdated x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. MessageReactionUpdated -> Rep MessageReactionUpdated x
from :: forall x. MessageReactionUpdated -> Rep MessageReactionUpdated x
$cto :: forall x. Rep MessageReactionUpdated x -> MessageReactionUpdated
to :: forall x. Rep MessageReactionUpdated x -> MessageReactionUpdated
Generic, Int -> MessageReactionUpdated -> ShowS
[MessageReactionUpdated] -> ShowS
MessageReactionUpdated -> String
(Int -> MessageReactionUpdated -> ShowS)
-> (MessageReactionUpdated -> String)
-> ([MessageReactionUpdated] -> ShowS)
-> Show MessageReactionUpdated
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MessageReactionUpdated -> ShowS
showsPrec :: Int -> MessageReactionUpdated -> ShowS
$cshow :: MessageReactionUpdated -> String
show :: MessageReactionUpdated -> String
$cshowList :: [MessageReactionUpdated] -> ShowS
showList :: [MessageReactionUpdated] -> ShowS
Show)
instance ToJSON MessageReactionUpdated where toJSON :: MessageReactionUpdated -> Value
toJSON = MessageReactionUpdated -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON MessageReactionUpdated where parseJSON :: Value -> Parser MessageReactionUpdated
parseJSON = Value -> Parser MessageReactionUpdated
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON