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

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

/// NodeDeviceResource captures a set of devices sharing a common
/// vendor/type/device_name tuple.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct NodeDeviceResource {
    /// Instances are list of the devices matching the vendor/type/name
    #[serde(
        rename = "Instances",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub instances: Vec<super::NodeDevice>,

    #[serde(rename = "Attributes")]
    pub attributes: std::collections::HashMap<String, super::Attribute>,

    /// Vendor specifies the vendor of device
    #[serde(rename = "Vendor")]
    pub vendor: String,

    /// Type specifies the type of the device
    #[serde(rename = "Type")]
    pub r#type: String,

    /// Name specifies the specific model of the device
    #[serde(rename = "Name")]
    pub name: String,
}
