module TD.Query.GetSavedMessagesTopicMessageByDate
(GetSavedMessagesTopicMessageByDate(..)
, defaultGetSavedMessagesTopicMessageByDate
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data GetSavedMessagesTopicMessageByDate
= GetSavedMessagesTopicMessageByDate
{ GetSavedMessagesTopicMessageByDate -> Maybe Int
saved_messages_topic_id :: Maybe Int
, GetSavedMessagesTopicMessageByDate -> Maybe Int
date :: Maybe Int
}
deriving (GetSavedMessagesTopicMessageByDate
-> GetSavedMessagesTopicMessageByDate -> Bool
(GetSavedMessagesTopicMessageByDate
-> GetSavedMessagesTopicMessageByDate -> Bool)
-> (GetSavedMessagesTopicMessageByDate
-> GetSavedMessagesTopicMessageByDate -> Bool)
-> Eq GetSavedMessagesTopicMessageByDate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetSavedMessagesTopicMessageByDate
-> GetSavedMessagesTopicMessageByDate -> Bool
== :: GetSavedMessagesTopicMessageByDate
-> GetSavedMessagesTopicMessageByDate -> Bool
$c/= :: GetSavedMessagesTopicMessageByDate
-> GetSavedMessagesTopicMessageByDate -> Bool
/= :: GetSavedMessagesTopicMessageByDate
-> GetSavedMessagesTopicMessageByDate -> Bool
Eq, Int -> GetSavedMessagesTopicMessageByDate -> ShowS
[GetSavedMessagesTopicMessageByDate] -> ShowS
GetSavedMessagesTopicMessageByDate -> String
(Int -> GetSavedMessagesTopicMessageByDate -> ShowS)
-> (GetSavedMessagesTopicMessageByDate -> String)
-> ([GetSavedMessagesTopicMessageByDate] -> ShowS)
-> Show GetSavedMessagesTopicMessageByDate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetSavedMessagesTopicMessageByDate -> ShowS
showsPrec :: Int -> GetSavedMessagesTopicMessageByDate -> ShowS
$cshow :: GetSavedMessagesTopicMessageByDate -> String
show :: GetSavedMessagesTopicMessageByDate -> String
$cshowList :: [GetSavedMessagesTopicMessageByDate] -> ShowS
showList :: [GetSavedMessagesTopicMessageByDate] -> ShowS
Show)
instance I.ShortShow GetSavedMessagesTopicMessageByDate where
shortShow :: GetSavedMessagesTopicMessageByDate -> String
shortShow
GetSavedMessagesTopicMessageByDate
{ saved_messages_topic_id :: GetSavedMessagesTopicMessageByDate -> Maybe Int
saved_messages_topic_id = Maybe Int
saved_messages_topic_id_
, date :: GetSavedMessagesTopicMessageByDate -> Maybe Int
date = Maybe Int
date_
}
= String
"GetSavedMessagesTopicMessageByDate"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"saved_messages_topic_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
saved_messages_topic_id_
, String
"date" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
date_
]
instance AT.ToJSON GetSavedMessagesTopicMessageByDate where
toJSON :: GetSavedMessagesTopicMessageByDate -> Value
toJSON
GetSavedMessagesTopicMessageByDate
{ saved_messages_topic_id :: GetSavedMessagesTopicMessageByDate -> Maybe Int
saved_messages_topic_id = Maybe Int
saved_messages_topic_id_
, date :: GetSavedMessagesTopicMessageByDate -> Maybe Int
date = Maybe Int
date_
}
= [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
"getSavedMessagesTopicMessageByDate"
, Key
"saved_messages_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
saved_messages_topic_id_
, Key
"date" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
date_
]
defaultGetSavedMessagesTopicMessageByDate :: GetSavedMessagesTopicMessageByDate
defaultGetSavedMessagesTopicMessageByDate :: GetSavedMessagesTopicMessageByDate
defaultGetSavedMessagesTopicMessageByDate =
GetSavedMessagesTopicMessageByDate
{ saved_messages_topic_id :: Maybe Int
saved_messages_topic_id = Maybe Int
forall a. Maybe a
Nothing
, date :: Maybe Int
date = Maybe Int
forall a. Maybe a
Nothing
}