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

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

/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct JobPlanResponse {
    #[serde(rename = "Diff", skip_serializing_if = "Option::is_none")]
    pub diff: Option<super::JobDiff>,

    #[serde(rename = "Annotations", skip_serializing_if = "Option::is_none")]
    pub annotations: Option<super::PlanAnnotations>,

    #[serde(rename = "FailedTGAllocs")]
    pub failed_tg_allocs: std::collections::HashMap<String, super::AllocationMetric>,

    #[serde(rename = "NextPeriodicLaunch")]
    pub next_periodic_launch: chrono::DateTime<chrono::Utc>,

    /// Warnings contains any warnings about the given job. These may include
    /// deprecation warnings.
    #[serde(rename = "Warnings")]
    pub warnings: String,

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

    #[serde(
        rename = "CreatedEvals",
        deserialize_with = "crate::deserialize_null_as_default"
    )]
    pub created_evals: Vec<super::Evaluation>,
}
