Skip to main content

clientapi_pve/models/
lxc_clone_vm_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 LxcCloneVmRequest {
16
17    /// Override I/O bandwidth limit (in KiB/s).
18    #[serde(rename = "bwlimit", skip_serializing_if = "Option::is_none")]
19    pub bwlimit: Option<f64>,
20
21    /// Description for the new CT.
22    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
23    pub description: Option<String>,
24
25    /// Create a full copy of all disks. This is always done when you clone a normal CT. For CT templates, we try to create a linked clone by default.
26    #[serde(rename = "full", skip_serializing_if = "Option::is_none")]
27    pub full: Option<models::PveBoolean>,
28
29    /// Set a hostname for the new CT.
30    #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")]
31    pub hostname: Option<String>,
32
33    /// VMID for the clone.
34    #[serde(rename = "newid")]
35    pub newid: i32,
36
37    /// Add the new CT to the specified pool.
38    #[serde(rename = "pool", skip_serializing_if = "Option::is_none")]
39    pub pool: Option<String>,
40
41    /// The name of the snapshot.
42    #[serde(rename = "snapname", skip_serializing_if = "Option::is_none")]
43    pub snapname: Option<String>,
44
45    /// Target storage for full clone.
46    #[serde(rename = "storage", skip_serializing_if = "Option::is_none")]
47    pub storage: Option<String>,
48
49    /// Target node. Only allowed if the original VM is on shared storage.
50    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
51    pub target: Option<String>,
52
53
54}
55
56impl LxcCloneVmRequest {
57    pub fn new(newid: i32) -> LxcCloneVmRequest {
58        LxcCloneVmRequest {
59            
60            bwlimit: None,
61            
62            description: None,
63            
64            full: None,
65            
66            hostname: None,
67            
68            newid,
69            
70            pool: None,
71            
72            snapname: None,
73            
74            storage: None,
75            
76            target: None,
77            
78        }
79    }
80}
81
82