cloud_hypervisor_client/models/
cpu_affinity.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 CpuAffinity {
16    #[serde(rename = "vcpu")]
17    pub vcpu: i32,
18    #[serde(rename = "host_cpus")]
19    pub host_cpus: Vec<i32>,
20}
21
22impl CpuAffinity {
23    pub fn new(vcpu: i32, host_cpus: Vec<i32>) -> CpuAffinity {
24        CpuAffinity { vcpu, host_cpus }
25    }
26}