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
50
51
52
53
54
55
56
57
58
/*
* Revolt API
*
* Open source user-first chat platform.
*
* The version of the OpenAPI document: 0.6.5
* Contact: contact@revolt.chat
* Generated by: https://openapi-generator.tech
*/
/// InviteOneOf : Invite to a specific server channel
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InviteOneOf {
#[serde(rename = "type")]
pub r#type: RHashType,
/// Invite code
#[serde(rename = "_id")]
pub _id: String,
/// Id of the server this invite points to
#[serde(rename = "server")]
pub server: String,
/// Id of user who created this invite
#[serde(rename = "creator")]
pub creator: String,
/// Id of the server channel this invite points to
#[serde(rename = "channel")]
pub channel: String,
}
impl InviteOneOf {
/// Invite to a specific server channel
pub fn new(r#type: RHashType, _id: String, server: String, creator: String, channel: String) -> InviteOneOf {
InviteOneOf {
r#type,
_id,
server,
creator,
channel,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RHashType {
#[serde(rename = "Server")]
Server,
}
impl Default for RHashType {
fn default() -> RHashType {
Self::Server
}
}