Skip to main content

clientapi_pve/models/
lxc_migrate_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 LxcMigrateVmRequest {
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    /// Use online/live migration.
22    #[serde(rename = "online", skip_serializing_if = "Option::is_none")]
23    pub online: Option<models::PveBoolean>,
24
25    /// Use restart migration
26    #[serde(rename = "restart", skip_serializing_if = "Option::is_none")]
27    pub restart: Option<models::PveBoolean>,
28
29    /// Target node.
30    #[serde(rename = "target")]
31    pub target: String,
32
33    /// Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.
34    #[serde(rename = "target-storage", skip_serializing_if = "Option::is_none")]
35    pub target_storage: Option<String>,
36
37    /// Timeout in seconds for shutdown for restart migration
38    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
39    pub timeout: Option<i64>,
40
41
42}
43
44impl LxcMigrateVmRequest {
45    pub fn new(target: String) -> LxcMigrateVmRequest {
46        LxcMigrateVmRequest {
47            
48            bwlimit: None,
49            
50            online: None,
51            
52            restart: None,
53            
54            target,
55            
56            target_storage: None,
57            
58            timeout: None,
59            
60        }
61    }
62}
63
64