/*
 * Cloud Hypervisor API
 *
 * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
 *
 * The version of the OpenAPI document: 0.3.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PciSegmentConfig {
    #[serde(rename = "pci_segment")]
    pub pci_segment: i16,
    #[serde(
        rename = "mmio32_aperture_weight",
        skip_serializing_if = "Option::is_none"
    )]
    pub mmio32_aperture_weight: Option<i32>,
    #[serde(
        rename = "mmio64_aperture_weight",
        skip_serializing_if = "Option::is_none"
    )]
    pub mmio64_aperture_weight: Option<i32>,
}

impl PciSegmentConfig {
    pub fn new(pci_segment: i16) -> PciSegmentConfig {
        PciSegmentConfig {
            pci_segment,
            mmio32_aperture_weight: None,
            mmio64_aperture_weight: None,
        }
    }
}
