/*
 * 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 PlatformConfig {
    #[serde(rename = "num_pci_segments", skip_serializing_if = "Option::is_none")]
    pub num_pci_segments: Option<i16>,
    #[serde(rename = "iommu_segments", skip_serializing_if = "Option::is_none")]
    pub iommu_segments: Option<Vec<i16>>,
    #[serde(
        rename = "iommu_address_width",
        skip_serializing_if = "Option::is_none"
    )]
    pub iommu_address_width: Option<u8>,
    #[serde(rename = "serial_number", skip_serializing_if = "Option::is_none")]
    pub serial_number: Option<String>,
    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
    pub uuid: Option<String>,
    #[serde(rename = "oem_strings", skip_serializing_if = "Option::is_none")]
    pub oem_strings: Option<Vec<String>>,
    #[serde(rename = "tdx", skip_serializing_if = "Option::is_none")]
    pub tdx: Option<bool>,
    #[serde(rename = "sev_snp", skip_serializing_if = "Option::is_none")]
    pub sev_snp: Option<bool>,
    #[serde(rename = "iommufd", skip_serializing_if = "Option::is_none")]
    pub iommufd: Option<bool>,
    #[serde(rename = "vfio_p2p_dma", skip_serializing_if = "Option::is_none")]
    pub vfio_p2p_dma: Option<bool>,
}

impl PlatformConfig {
    pub fn new() -> PlatformConfig {
        PlatformConfig {
            num_pci_segments: None,
            iommu_segments: None,
            iommu_address_width: None,
            serial_number: None,
            uuid: None,
            oem_strings: None,
            tdx: None,
            sev_snp: None,
            iommufd: None,
            vfio_p2p_dma: None,
        }
    }
}
