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