clientapi-pve 2026.5.24

Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
Documentation
/*
 * Proxmox Virtual Environment API
 *
 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
 *
 * The version of the OpenAPI document: 9.x
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct QemuMigrateVmPreconditionResponseData {

    /// List of nodes allowed for migration.
    #[serde(rename = "allowed_nodes", skip_serializing_if = "Option::is_none")]
    pub allowed_nodes: Option<Vec<String>>,

    /// HA resources, which will be migrated to the same target node as the VM, because these are in positive affinity with the VM.
    #[serde(rename = "dependent-ha-resources", skip_serializing_if = "Option::is_none")]
    pub dependent_ha_resources: Option<Vec<String>>,

    /// Whether the VM host supports migrating additional VM state, such as conntrack entries.
    #[serde(rename = "has-dbus-vmstate")]
    pub has_dbus_vmstate: models::PveBoolean,

    /// List local disks including CD-Rom, unused and not referenced disks
    #[serde(rename = "local_disks")]
    pub local_disks: Vec<models::QemuMigrateVmPreconditionResponseDataLocalDisksInner>,

    /// List local resources (e.g. pci, usb) that block migration.
    #[serde(rename = "local_resources")]
    pub local_resources: Vec<String>,

    /// Object of mapped resources with additional information such if they're live migratable.
    #[serde(rename = "mapped-resource-info")]
    pub mapped_resource_info: serde_json::Value,

    /// List of mapped resources e.g. pci, usb. Deprecated, use 'mapped-resource-info' instead.
    #[serde(rename = "mapped-resources")]
    pub mapped_resources: Vec<String>,

    #[serde(rename = "not_allowed_nodes", skip_serializing_if = "Option::is_none")]
    pub not_allowed_nodes: Option<Box<models::QemuMigrateVmPreconditionResponseDataNotAllowedNodes>>,

    /// Determines if the VM is running.
    #[serde(rename = "running")]
    pub running: models::PveBoolean,


}

impl QemuMigrateVmPreconditionResponseData {
    pub fn new(has_dbus_vmstate: models::PveBoolean, local_disks: Vec<models::QemuMigrateVmPreconditionResponseDataLocalDisksInner>, local_resources: Vec<String>, mapped_resource_info: serde_json::Value, mapped_resources: Vec<String>, running: models::PveBoolean) -> QemuMigrateVmPreconditionResponseData {
        QemuMigrateVmPreconditionResponseData {
            
            allowed_nodes: None,
            
            dependent_ha_resources: None,
            
            has_dbus_vmstate,
            
            local_disks,
            
            local_resources,
            
            mapped_resource_info,
            
            mapped_resources,
            
            not_allowed_nodes: None,
            
            running,
            
        }
    }
}