1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Revolt API
*
* Open source user-first chat platform.
*
* The version of the OpenAPI document: 0.5.5
* Contact: contact@revolt.chat
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct OptionsMessageSearch {
/// Full-text search query See [MongoDB documentation](https://docs.mongodb.com/manual/text-search/#-text-operator) for more information.
#[serde(rename = "query")]
pub query: String,
/// Maximum number of messages to fetch
#[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
/// Message id before which messages should be fetched
#[serde(rename = "before", skip_serializing_if = "Option::is_none")]
pub before: Option<String>,
/// Message id after which messages should be fetched
#[serde(rename = "after", skip_serializing_if = "Option::is_none")]
pub after: Option<String>,
/// Message sort direction By default, it will be sorted by relevance.
#[serde(rename = "sort", skip_serializing_if = "Option::is_none")]
pub sort: Option<Box<crate::models::MessageSort>>,
/// Whether to include user (and member, if server channel) objects
#[serde(rename = "include_users", skip_serializing_if = "Option::is_none")]
pub include_users: Option<bool>,
}
impl OptionsMessageSearch {
pub fn new(query: String) -> OptionsMessageSearch {
OptionsMessageSearch {
query,
limit: None,
before: None,
after: None,
sort: None,
include_users: None,
}
}
}