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