module TD.Query.ReadAllMessageThreadMentions
(ReadAllMessageThreadMentions(..)
, defaultReadAllMessageThreadMentions
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data ReadAllMessageThreadMentions
= ReadAllMessageThreadMentions
{ ReadAllMessageThreadMentions -> Maybe Int
chat_id :: Maybe Int
, ReadAllMessageThreadMentions -> Maybe Int
message_thread_id :: Maybe Int
}
deriving (ReadAllMessageThreadMentions
-> ReadAllMessageThreadMentions -> Bool
(ReadAllMessageThreadMentions
-> ReadAllMessageThreadMentions -> Bool)
-> (ReadAllMessageThreadMentions
-> ReadAllMessageThreadMentions -> Bool)
-> Eq ReadAllMessageThreadMentions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadAllMessageThreadMentions
-> ReadAllMessageThreadMentions -> Bool
== :: ReadAllMessageThreadMentions
-> ReadAllMessageThreadMentions -> Bool
$c/= :: ReadAllMessageThreadMentions
-> ReadAllMessageThreadMentions -> Bool
/= :: ReadAllMessageThreadMentions
-> ReadAllMessageThreadMentions -> Bool
Eq, Int -> ReadAllMessageThreadMentions -> ShowS
[ReadAllMessageThreadMentions] -> ShowS
ReadAllMessageThreadMentions -> String
(Int -> ReadAllMessageThreadMentions -> ShowS)
-> (ReadAllMessageThreadMentions -> String)
-> ([ReadAllMessageThreadMentions] -> ShowS)
-> Show ReadAllMessageThreadMentions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReadAllMessageThreadMentions -> ShowS
showsPrec :: Int -> ReadAllMessageThreadMentions -> ShowS
$cshow :: ReadAllMessageThreadMentions -> String
show :: ReadAllMessageThreadMentions -> String
$cshowList :: [ReadAllMessageThreadMentions] -> ShowS
showList :: [ReadAllMessageThreadMentions] -> ShowS
Show)
instance I.ShortShow ReadAllMessageThreadMentions where
shortShow :: ReadAllMessageThreadMentions -> String
shortShow
ReadAllMessageThreadMentions
{ chat_id :: ReadAllMessageThreadMentions -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_thread_id :: ReadAllMessageThreadMentions -> Maybe Int
message_thread_id = Maybe Int
message_thread_id_
}
= String
"ReadAllMessageThreadMentions"
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
"message_thread_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
message_thread_id_
]
instance AT.ToJSON ReadAllMessageThreadMentions where
toJSON :: ReadAllMessageThreadMentions -> Value
toJSON
ReadAllMessageThreadMentions
{ chat_id :: ReadAllMessageThreadMentions -> Maybe Int
chat_id = Maybe Int
chat_id_
, message_thread_id :: ReadAllMessageThreadMentions -> Maybe Int
message_thread_id = Maybe Int
message_thread_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
"readAllMessageThreadMentions"
, 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
"message_thread_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
message_thread_id_
]
defaultReadAllMessageThreadMentions :: ReadAllMessageThreadMentions
defaultReadAllMessageThreadMentions :: ReadAllMessageThreadMentions
defaultReadAllMessageThreadMentions =
ReadAllMessageThreadMentions
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, message_thread_id :: Maybe Int
message_thread_id = Maybe Int
forall a. Maybe a
Nothing
}