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

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

/// NodeListStub is a subset of information returned during
/// node list operations.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct NodeListStub {
    #[serde(rename = "Drivers")]
    pub drivers: std::collections::HashMap<String, super::DriverInfo>,

    #[serde(rename = "NodeResources", skip_serializing_if = "Option::is_none")]
    pub node_resources: Option<super::NodeResources>,

    #[serde(rename = "LastDrain", skip_serializing_if = "Option::is_none")]
    pub last_drain: Option<super::DrainMetadata>,

    #[serde(rename = "CreateIndex")]
    pub create_index: u64,

    #[serde(rename = "ModifyIndex")]
    pub modify_index: u64,

    #[serde(rename = "ID")]
    pub id: String,

    #[serde(rename = "NodeClass")]
    pub node_class: String,

    #[serde(rename = "Version")]
    pub version: String,

    #[serde(rename = "SchedulingEligibility")]
    pub scheduling_eligibility: String,

    #[serde(rename = "StatusDescription")]
    pub status_description: String,

    #[serde(rename = "Name")]
    pub name: String,

    #[serde(rename = "NodePool")]
    pub node_pool: String,

    #[serde(rename = "Drain")]
    pub drain: bool,

    #[serde(rename = "ReservedResources", skip_serializing_if = "Option::is_none")]
    pub reserved_resources: Option<super::NodeReservedResources>,

    #[serde(rename = "Datacenter")]
    pub datacenter: String,

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

    #[serde(rename = "Status")]
    pub status: String,

    #[serde(rename = "Address")]
    pub address: String,
}
