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

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

/// JobSubmission is used to hold information about the original content of a job
/// specification being submitted to Nomad.
///
/// At any time a JobSubmission may be nil, indicating no information is known about
/// the job submission.
///
/// This struct was generated based on the Go types of the official Nomad API.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, Builder)]
pub struct JobSubmission {
    /// Source contains the original job definition (may be in the format of
    /// hcl1, hcl2, or json). HCL1 jobs can no longer be parsed.
    #[serde(rename = "Source")]
    pub source: String,

    /// Format indicates what the Source content was (hcl1, hcl2, or json). HCL1
    /// jobs can no longer be parsed.
    #[serde(rename = "Format")]
    pub format: String,

    /// VariableFlags contains the CLI "-var" flag arguments as submitted with the
    /// job (hcl2 only).
    #[serde(rename = "VariableFlags")]
    pub variable_flags: std::collections::HashMap<String, String>,

    /// Variables contains the opaque variables configuration as coming from
    /// a var-file or the WebUI variables input (hcl2 only).
    #[serde(rename = "Variables")]
    pub variables: String,
}
