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
 */

/// Error : Possible API Errors



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Error {
    #[serde(rename = "type")]
    pub r#type: RHashType,
    #[serde(rename = "max")]
    pub max: i32,
    #[serde(rename = "permission")]
    pub permission: crate::models::UserPermission,
    #[serde(rename = "operation")]
    pub operation: String,
    #[serde(rename = "collection")]
    pub collection: String,
    #[serde(rename = "error")]
    pub error: String,
    #[serde(rename = "with")]
    pub with: String,
}

impl Error {
    /// Possible API Errors
    pub fn new(r#type: RHashType, max: i32, permission: crate::models::UserPermission, operation: String, collection: String, error: String, with: String) -> Error {
        Error {
            r#type,
            max,
            permission,
            operation,
            collection,
            error,
            with,
        }
    }
}

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

impl Default for RHashType {
    fn default() -> RHashType {
        Self::FailedValidation
    }
}