cloud_hypervisor_client/models/
pci_segment_config.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PciSegmentConfig {
16 #[serde(rename = "pci_segment")]
17 pub pci_segment: i32,
18 #[serde(
19 rename = "mmio32_aperture_weight",
20 skip_serializing_if = "Option::is_none"
21 )]
22 pub mmio32_aperture_weight: Option<i32>,
23 #[serde(
24 rename = "mmio64_aperture_weight",
25 skip_serializing_if = "Option::is_none"
26 )]
27 pub mmio64_aperture_weight: Option<i32>,
28}
29
30impl PciSegmentConfig {
31 pub fn new(pci_segment: i32) -> PciSegmentConfig {
32 PciSegmentConfig {
33 pci_segment,
34 mmio32_aperture_weight: None,
35 mmio64_aperture_weight: None,
36 }
37 }
38}