Skip to main content

clientapi_pve/models/
cluster_mapping_create_pci_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 ClusterMappingCreatePciRequest {
16
17    /// Description of the logical PCI device.
18    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
19    pub description: Option<String>,
20
21    /// The ID of the logical PCI mapping.
22    #[serde(rename = "id")]
23    pub id: String,
24
25    /// Marks the device(s) as being able to be live-migrated (Experimental). This needs hardware and driver support to work.
26    #[serde(rename = "live-migration-capable", skip_serializing_if = "Option::is_none")]
27    pub live_migration_capable: Option<models::PveBoolean>,
28
29    /// A list of maps for the cluster nodes.
30    #[serde(rename = "map")]
31    pub map: Vec<models::ClusterMappingCreatePciRequestMapInner>,
32
33    /// Marks the device(s) as being capable of providing mediated devices.
34    #[serde(rename = "mdev", skip_serializing_if = "Option::is_none")]
35    pub mdev: Option<models::PveBoolean>,
36
37
38}
39
40impl ClusterMappingCreatePciRequest {
41    pub fn new(id: String, map: Vec<models::ClusterMappingCreatePciRequestMapInner>) -> ClusterMappingCreatePciRequest {
42        ClusterMappingCreatePciRequest {
43            
44            description: None,
45            
46            id,
47            
48            live_migration_capable: None,
49            
50            map,
51            
52            mdev: None,
53            
54        }
55    }
56}
57
58