/*
 * doqium - service-data REST API
 *
 * doqium - service-data REST API
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DetailedStats {
    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
    pub summary: Option<Box<models::UsageStats>>,
    /// List of all workspaces with details
    #[serde(rename = "workspaces")]
    pub workspaces: Vec<models::WorkspaceDetail>,
    /// List of all notebooks with details
    #[serde(rename = "notebooks")]
    pub notebooks: Vec<models::NotebookDetail>,
    /// List of all notes with details
    #[serde(rename = "notes")]
    pub notes: Vec<models::NoteDetail>,
    /// List of all attachments with details
    #[serde(rename = "attachments")]
    pub attachments: Vec<models::AttachmentDetail>,
    #[serde(rename = "orphaned", skip_serializing_if = "Option::is_none")]
    pub orphaned: Option<Box<models::OrphanedItems>>,
}

impl DetailedStats {
    pub fn new(
        workspaces: Vec<models::WorkspaceDetail>,
        notebooks: Vec<models::NotebookDetail>,
        notes: Vec<models::NoteDetail>,
        attachments: Vec<models::AttachmentDetail>,
    ) -> DetailedStats {
        DetailedStats {
            summary: None,
            workspaces,
            notebooks,
            notes,
            attachments,
            orphaned: None,
        }
    }
}
