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

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

/// JobListStub is used to return a subset of information about
/// jobs during 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 JobListStub {
    #[serde(rename = "ParentID")]
    pub parent_id: String,

    #[serde(
        rename = "Datacenters",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub datacenters: Vec<String>,

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

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

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

    #[serde(rename = "Namespace", skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,

    #[serde(rename = "Periodic")]
    pub periodic: bool,

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

    #[serde(rename = "Type")]
    pub r#type: String,

    #[serde(rename = "Priority")]
    pub priority: i64,

    #[serde(rename = "ParameterizedJob")]
    pub parameterized_job: bool,

    #[serde(rename = "Stop")]
    pub stop: bool,

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

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

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

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

    #[serde(rename = "JobModifyIndex")]
    pub job_modify_index: u64,

    #[serde(rename = "SubmitTime")]
    pub submit_time: i64,
}
