Skip to main content

clientapi_pve/models/
nodes_storage_info_response_data.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NodesStorageInfoResponseData {
16
17    /// Format identifier ('raw', 'qcow2', 'subvol', 'iso', 'tgz' ...)
18    #[serde(rename = "format")]
19    pub format: String,
20
21    /// Optional notes.
22    #[serde(rename = "notes", skip_serializing_if = "Option::is_none")]
23    pub notes: Option<String>,
24
25    /// The Path
26    #[serde(rename = "path")]
27    pub path: String,
28
29    /// Protection status. Currently only supported for backups.
30    #[serde(rename = "protected", skip_serializing_if = "Option::is_none")]
31    pub protected: Option<models::PveBoolean>,
32
33    /// Volume size in bytes.
34    #[serde(rename = "size")]
35    pub size: i64,
36
37    /// Used space. Please note that most storage plugins do not report anything useful here.
38    #[serde(rename = "used")]
39    pub used: i64,
40
41
42}
43
44impl NodesStorageInfoResponseData {
45    pub fn new(format: String, path: String, size: i64, used: i64) -> NodesStorageInfoResponseData {
46        NodesStorageInfoResponseData {
47            
48            format,
49            
50            notes: None,
51            
52            path,
53            
54            protected: None,
55            
56            size,
57            
58            used,
59            
60        }
61    }
62}
63
64