clientapi-pbs 2026.5.24

Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
Documentation
/*
 * Proxmox Backup Server API
 *
 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
 *
 * The version of the OpenAPI document: 9.x
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AdminDatastoreGetGcResponseData {

    #[serde(rename = "cache-stats", skip_serializing_if = "Option::is_none")]
    pub cache_stats: Option<Box<models::AdminDatastoreGetGcResponseDataCacheStats>>,

    /// Bytes used on disk.
    #[serde(rename = "disk-bytes")]
    pub disk_bytes: i64,

    /// Chunks used on disk.
    #[serde(rename = "disk-chunks")]
    pub disk_chunks: i64,

    /// Duration of last gc run
    #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
    pub duration: Option<i64>,

    /// Sum of bytes referred by index files.
    #[serde(rename = "index-data-bytes")]
    pub index_data_bytes: i64,

    /// Number of processed index files.
    #[serde(rename = "index-file-count")]
    pub index_file_count: i64,

    /// Endtime of the last gc run
    #[serde(rename = "last-run-endtime", skip_serializing_if = "Option::is_none")]
    pub last_run_endtime: Option<i64>,

    /// State of the last gc run
    #[serde(rename = "last-run-state", skip_serializing_if = "Option::is_none")]
    pub last_run_state: Option<String>,

    /// Time of the next gc run
    #[serde(rename = "next-run", skip_serializing_if = "Option::is_none")]
    pub next_run: Option<i64>,

    /// Sum of pending bytes (pending removal - kept for safety).
    #[serde(rename = "pending-bytes")]
    pub pending_bytes: i64,

    /// Number of pending chunks (pending removal - kept for safety).
    #[serde(rename = "pending-chunks")]
    pub pending_chunks: i64,

    /// Number of chunks marked as .bad by verify that have been removed by GC.
    #[serde(rename = "removed-bad")]
    pub removed_bad: i64,

    /// Sum of removed bytes.
    #[serde(rename = "removed-bytes")]
    pub removed_bytes: i64,

    /// Number of removed chunks.
    #[serde(rename = "removed-chunks")]
    pub removed_chunks: i64,

    /// Schedule of the gc job
    #[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
    pub schedule: Option<String>,

    /// Number of chunks still marked as .bad after garbage collection.
    #[serde(rename = "still-bad")]
    pub still_bad: i64,

    /// Datastore
    #[serde(rename = "store")]
    pub store: String,

    /// Unique Process/Task Identifier
    #[serde(rename = "upid", skip_serializing_if = "Option::is_none")]
    pub upid: Option<String>,


}

impl AdminDatastoreGetGcResponseData {
    pub fn new(disk_bytes: i64, disk_chunks: i64, index_data_bytes: i64, index_file_count: i64, pending_bytes: i64, pending_chunks: i64, removed_bad: i64, removed_bytes: i64, removed_chunks: i64, still_bad: i64, store: String) -> AdminDatastoreGetGcResponseData {
        AdminDatastoreGetGcResponseData {
            
            cache_stats: None,
            
            disk_bytes,
            
            disk_chunks,
            
            duration: None,
            
            index_data_bytes,
            
            index_file_count,
            
            last_run_endtime: None,
            
            last_run_state: None,
            
            next_run: None,
            
            pending_bytes,
            
            pending_chunks,
            
            removed_bad,
            
            removed_bytes,
            
            removed_chunks,
            
            schedule: None,
            
            still_bad,
            
            store,
            
            upid: None,
            
        }
    }
}