revolt_api 0.6.5

Open source user-first chat platform.
Documentation
/*
 * 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
    }
}