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

/// Error : Possible API Errors



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

impl Error {
    /// Possible API Errors
    pub fn new(_type: Type, max: i32, permission: crate::models::UserPermission, operation: String, with: String) -> Error {
        Error {
            _type,
            max,
            permission,
            operation,
            with,
        }
    }
}

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

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