Skip to main content

cloud_hypervisor_client/models/
user_device_config.rs

1/*
2 * Cloud Hypervisor API
3 *
4 * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
5 *
6 * The version of the OpenAPI document: 0.3.0
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 UserDeviceConfig {
16    #[serde(rename = "socket")]
17    pub socket: String,
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<String>,
20    #[serde(rename = "pci_segment", skip_serializing_if = "Option::is_none")]
21    pub pci_segment: Option<i32>,
22    #[serde(rename = "pci_device_id", skip_serializing_if = "Option::is_none")]
23    pub pci_device_id: Option<i32>,
24}
25
26impl UserDeviceConfig {
27    pub fn new(socket: String) -> UserDeviceConfig {
28        UserDeviceConfig {
29            socket,
30            id: None,
31            pci_segment: None,
32            pci_device_id: None,
33        }
34    }
35}