azisaba-graph 0.1.0-rc.2

An API for connecting and sharing data across Azisaba Network.
Documentation
/*
 * Azisaba Graph API
 *
 * An API for connecting and sharing data across Azisaba Network.
 *
 * The version of the OpenAPI document: 0.0.1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreatePatchNoteRequest {
    /// The target of the patch note.
    #[serde(rename = "target")]
    pub target: Target,
    /// The category of the patch note.
    #[serde(rename = "category")]
    pub category: Category,
    /// The title of the patch note.
    #[serde(rename = "title")]
    pub title: String,
    /// The body text of the patch note.
    #[serde(rename = "body")]
    pub body: String,
    /// The unique identifier of the player.
    #[serde(rename = "authorId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub author_id: Option<Option<uuid::Uuid>>,
    /// The image files attached to the patch note.
    #[serde(rename = "images", skip_serializing_if = "Option::is_none")]
    pub images: Option<Vec<std::path::PathBuf>>,
}

impl CreatePatchNoteRequest {
    pub fn new(target: Target, category: Category, title: String, body: String) -> CreatePatchNoteRequest {
        CreatePatchNoteRequest {
            target,
            category,
            title,
            body,
            author_id: None,
            images: None,
        }
    }
}
/// The target of the patch note.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Target {
    #[serde(rename = "general")]
    General,
    #[serde(rename = "creativePro")]
    CreativePro,
    #[serde(rename = "frontier")]
    Frontier,
    #[serde(rename = "life")]
    Life,
    #[serde(rename = "leonGunWar2")]
    LeonGunWar2,
    #[serde(rename = "sclat")]
    Sclat,
}

impl Default for Target {
    fn default() -> Target {
        Self::General
    }
}
/// The category of the patch note.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Category {
    #[serde(rename = "balance")]
    Balance,
    #[serde(rename = "event")]
    Event,
    #[serde(rename = "feature")]
    Feature,
    #[serde(rename = "fix")]
    Fix,
    #[serde(rename = "improvement")]
    Improvement,
    #[serde(rename = "map")]
    Map,
    #[serde(rename = "remove")]
    Remove,
}

impl Default for Category {
    fn default() -> Category {
        Self::Balance
    }
}