revolt_api 0.5.5

Rust typings for the Revolt API.
Documentation
/*
 * 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
 */

/// Invite : Representation of an invite to a channel on Revolt



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Invite {
    #[serde(rename = "type")]
    pub _type: Type,
    /// 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 group channel this invite points to
    #[serde(rename = "channel")]
    pub channel: String,
}

impl Invite {
    /// Representation of an invite to a channel on Revolt
    pub fn new(_type: Type, _id: String, server: String, creator: String, channel: String) -> Invite {
        Invite {
            _type,
            _id,
            server,
            creator,
            channel,
        }
    }
}

/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "Group")]
    Group,
}

impl Default for Type {
    fn default() -> Type {
        Self::Group
    }
}