module TD.Query.GetSavedMessagesTags
(GetSavedMessagesTags(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data GetSavedMessagesTags
= GetSavedMessagesTags
{ GetSavedMessagesTags -> Maybe Int
saved_messages_topic_id :: Maybe Int
}
deriving (GetSavedMessagesTags -> GetSavedMessagesTags -> Bool
(GetSavedMessagesTags -> GetSavedMessagesTags -> Bool)
-> (GetSavedMessagesTags -> GetSavedMessagesTags -> Bool)
-> Eq GetSavedMessagesTags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetSavedMessagesTags -> GetSavedMessagesTags -> Bool
== :: GetSavedMessagesTags -> GetSavedMessagesTags -> Bool
$c/= :: GetSavedMessagesTags -> GetSavedMessagesTags -> Bool
/= :: GetSavedMessagesTags -> GetSavedMessagesTags -> Bool
Eq, Int -> GetSavedMessagesTags -> ShowS
[GetSavedMessagesTags] -> ShowS
GetSavedMessagesTags -> String
(Int -> GetSavedMessagesTags -> ShowS)
-> (GetSavedMessagesTags -> String)
-> ([GetSavedMessagesTags] -> ShowS)
-> Show GetSavedMessagesTags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetSavedMessagesTags -> ShowS
showsPrec :: Int -> GetSavedMessagesTags -> ShowS
$cshow :: GetSavedMessagesTags -> String
show :: GetSavedMessagesTags -> String
$cshowList :: [GetSavedMessagesTags] -> ShowS
showList :: [GetSavedMessagesTags] -> ShowS
Show)
instance I.ShortShow GetSavedMessagesTags where
shortShow :: GetSavedMessagesTags -> String
shortShow
GetSavedMessagesTags
{ saved_messages_topic_id :: GetSavedMessagesTags -> Maybe Int
saved_messages_topic_id = Maybe Int
saved_messages_topic_id_
}
= String
"GetSavedMessagesTags"
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_
]
instance AT.ToJSON GetSavedMessagesTags where
toJSON :: GetSavedMessagesTags -> Value
toJSON
GetSavedMessagesTags
{ saved_messages_topic_id :: GetSavedMessagesTags -> Maybe Int
saved_messages_topic_id = Maybe Int
saved_messages_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
"getSavedMessagesTags"
, 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_
]