/*
 * This is an auto-generated file.
 * Any manual changes may be overwritten without notice!
 */

use derive_builder::Builder;
use serde::{Deserialize, Serialize};

/// NUMAResource contains the NUMA affinity request for scheduling purposes.
///
/// Applies only to Nomad Enterprise.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct NUMAResource {
    /// Affinity must be one of "none", "prefer", "require".
    #[serde(rename = "Affinity")]
    pub affinity: String,

    /// Devices is the subset of devices requested by the task that must share
    /// the same numa node, along with the tasks reserved cpu cores.
    #[serde(
        rename = "Devices",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub devices: Vec<String>,
}
