module TD.Query.ReadAllForumTopicMentions
(ReadAllForumTopicMentions(..)
, defaultReadAllForumTopicMentions
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data ReadAllForumTopicMentions
= ReadAllForumTopicMentions
{ ReadAllForumTopicMentions -> Maybe Int
chat_id :: Maybe Int
, ReadAllForumTopicMentions -> Maybe Int
forum_topic_id :: Maybe Int
}
deriving (ReadAllForumTopicMentions -> ReadAllForumTopicMentions -> Bool
(ReadAllForumTopicMentions -> ReadAllForumTopicMentions -> Bool)
-> (ReadAllForumTopicMentions -> ReadAllForumTopicMentions -> Bool)
-> Eq ReadAllForumTopicMentions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadAllForumTopicMentions -> ReadAllForumTopicMentions -> Bool
== :: ReadAllForumTopicMentions -> ReadAllForumTopicMentions -> Bool
$c/= :: ReadAllForumTopicMentions -> ReadAllForumTopicMentions -> Bool
/= :: ReadAllForumTopicMentions -> ReadAllForumTopicMentions -> Bool
Eq, Int -> ReadAllForumTopicMentions -> ShowS
[ReadAllForumTopicMentions] -> ShowS
ReadAllForumTopicMentions -> String
(Int -> ReadAllForumTopicMentions -> ShowS)
-> (ReadAllForumTopicMentions -> String)
-> ([ReadAllForumTopicMentions] -> ShowS)
-> Show ReadAllForumTopicMentions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReadAllForumTopicMentions -> ShowS
showsPrec :: Int -> ReadAllForumTopicMentions -> ShowS
$cshow :: ReadAllForumTopicMentions -> String
show :: ReadAllForumTopicMentions -> String
$cshowList :: [ReadAllForumTopicMentions] -> ShowS
showList :: [ReadAllForumTopicMentions] -> ShowS
Show)
instance I.ShortShow ReadAllForumTopicMentions where
shortShow :: ReadAllForumTopicMentions -> String
shortShow
ReadAllForumTopicMentions
{ chat_id :: ReadAllForumTopicMentions -> Maybe Int
chat_id = Maybe Int
chat_id_
, forum_topic_id :: ReadAllForumTopicMentions -> Maybe Int
forum_topic_id = Maybe Int
forum_topic_id_
}
= String
"ReadAllForumTopicMentions"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
chat_id_
, String
"forum_topic_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
forum_topic_id_
]
instance AT.ToJSON ReadAllForumTopicMentions where
toJSON :: ReadAllForumTopicMentions -> Value
toJSON
ReadAllForumTopicMentions
{ chat_id :: ReadAllForumTopicMentions -> Maybe Int
chat_id = Maybe Int
chat_id_
, forum_topic_id :: ReadAllForumTopicMentions -> Maybe Int
forum_topic_id = Maybe Int
forum_topic_id_
}
= [Pair] -> Value
A.object
[ Key
"@type" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"readAllForumTopicMentions"
, Key
"chat_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
chat_id_
, Key
"forum_topic_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
forum_topic_id_
]
defaultReadAllForumTopicMentions :: ReadAllForumTopicMentions
defaultReadAllForumTopicMentions :: ReadAllForumTopicMentions
defaultReadAllForumTopicMentions =
ReadAllForumTopicMentions
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, forum_topic_id :: Maybe Int
forum_topic_id = Maybe Int
forall a. Maybe a
Nothing
}