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

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

/// NodeDevice is an instance of a particular device.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct NodeDevice {
    /// HealthDescription is used to provide a human readable description of why
    /// the device may be unhealthy.
    #[serde(rename = "HealthDescription")]
    pub health_description: String,

    /// Locality stores HW locality information for the node to optionally be
    /// used when making placement decisions.
    #[serde(rename = "Locality", skip_serializing_if = "Option::is_none")]
    pub locality: Option<super::NodeDeviceLocality>,

    /// ID is the ID of the device.
    #[serde(rename = "ID")]
    pub id: String,

    /// Healthy captures whether the device is healthy.
    #[serde(rename = "Healthy")]
    pub healthy: bool,
}
