revolt_api/models/
invite_one_of.rs

1/*
2 * Revolt API
3 *
4 * Open source user-first chat platform.
5 *
6 * The version of the OpenAPI document: 0.6.5
7 * Contact: contact@revolt.chat
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// InviteOneOf : Invite to a specific server channel
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct InviteOneOf {
17    #[serde(rename = "type")]
18    pub r#type: RHashType,
19    /// Invite code
20    #[serde(rename = "_id")]
21    pub _id: String,
22    /// Id of the server this invite points to
23    #[serde(rename = "server")]
24    pub server: String,
25    /// Id of user who created this invite
26    #[serde(rename = "creator")]
27    pub creator: String,
28    /// Id of the server channel this invite points to
29    #[serde(rename = "channel")]
30    pub channel: String,
31}
32
33impl InviteOneOf {
34    /// Invite to a specific server channel
35    pub fn new(r#type: RHashType, _id: String, server: String, creator: String, channel: String) -> InviteOneOf {
36        InviteOneOf {
37            r#type,
38            _id,
39            server,
40            creator,
41            channel,
42        }
43    }
44}
45
46/// 
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum RHashType {
49    #[serde(rename = "Server")]
50    Server,
51}
52
53impl Default for RHashType {
54    fn default() -> RHashType {
55        Self::Server
56    }
57}
58