Skip to main content

clientapi_pve/models/
nodes_storage_create_content_request.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 NodesStorageCreateContentRequest {
16
17    /// The name of the file to create.
18    #[serde(rename = "filename")]
19    pub filename: String,
20
21    /// Format of the image.
22    #[serde(rename = "format", skip_serializing_if = "Option::is_none")]
23    pub format: Option<models::PveFormatFormatEnum>,
24
25    /// Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)
26    #[serde(rename = "size")]
27    pub size: String,
28
29    /// Specify owner VM
30    #[serde(rename = "vmid")]
31    pub vmid: i32,
32
33
34}
35
36impl NodesStorageCreateContentRequest {
37    pub fn new(filename: String, size: String, vmid: i32) -> NodesStorageCreateContentRequest {
38        NodesStorageCreateContentRequest {
39            
40            filename,
41            
42            format: None,
43            
44            size,
45            
46            vmid,
47            
48        }
49    }
50}
51
52