foxclient 6.1.0

Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application's access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
Documentation
/*
 * Fox API
 *
 * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application's access to the API. In future, this may be a mandatory requirement.  To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit.  The requests may be logged for analytics and development purposes. 
 *
 * The version of the OpenAPI document: 6.1.0
 * Contact: admin@orangefox.tech
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WikiPageResponse {
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Always `false` on public responses — drafts are filtered out by the query.
    #[serde(rename = "draft")]
    pub draft: bool,
    /// Last path segment.
    #[serde(rename = "file_name")]
    pub file_name: String,
    #[serde(rename = "icon", skip_serializing_if = "Option::is_none")]
    pub icon: Option<String>,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "image", skip_serializing_if = "Option::is_none")]
    pub image: Option<String>,
    #[serde(rename = "last_updated")]
    pub last_updated: String,
    #[serde(rename = "noindex")]
    pub noindex: bool,
    /// Parent folder path, \"\" at the root.
    #[serde(rename = "parent_path")]
    pub parent_path: String,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "title")]
    pub title: String,
    /// \"md\" or \"json\". Named `type` to match FoxWiki's `WikiPageShort`.
    #[serde(rename = "type")]
    pub r#type: String,
    #[serde(rename = "content")]
    pub content: String,
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// Set when the page is a device page owned by its maintainer.
    #[serde(rename = "device_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub device_id: Option<Option<String>>,
    #[serde(rename = "revision")]
    pub revision: i32,
    #[serde(rename = "updated_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<Option<String>>,
}

impl WikiPageResponse {
    pub fn new(draft: bool, file_name: String, id: String, last_updated: String, noindex: bool, parent_path: String, path: String, title: String, r#type: String, content: String, created_at: String, revision: i32) -> WikiPageResponse {
        WikiPageResponse {
            description: None,
            draft,
            file_name,
            icon: None,
            id,
            image: None,
            last_updated,
            noindex,
            parent_path,
            path,
            title,
            r#type,
            content,
            created_at,
            device_id: None,
            revision,
            updated_at: None,
        }
    }
}