nomad_client_rs/models/
job.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
4pub struct Job {
5    #[serde(rename = "Affinities", skip_serializing_if = "Option::is_none")]
6    pub affinities: Option<Vec<crate::models::Affinity>>,
7    #[serde(rename = "AllAtOnce", skip_serializing_if = "Option::is_none")]
8    pub all_at_once: Option<bool>,
9    #[serde(rename = "Constraints", skip_serializing_if = "Option::is_none")]
10    pub constraints: Option<Vec<crate::models::Constraint>>,
11    #[serde(rename = "ConsulNamespace", skip_serializing_if = "Option::is_none")]
12    pub consul_namespace: Option<String>,
13    #[serde(rename = "ConsulToken", skip_serializing_if = "Option::is_none")]
14    pub consul_token: Option<String>,
15    #[serde(rename = "CreateIndex", skip_serializing_if = "Option::is_none")]
16    pub create_index: Option<i32>,
17    #[serde(rename = "Datacenters", skip_serializing_if = "Option::is_none")]
18    pub datacenters: Option<Vec<String>>,
19    #[serde(
20        rename = "DispatchIdempotencyToken",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub dispatch_idempotency_token: Option<String>,
24    #[serde(rename = "Dispatched", skip_serializing_if = "Option::is_none")]
25    pub dispatched: Option<bool>,
26    #[serde(rename = "ID", skip_serializing_if = "Option::is_none")]
27    pub id: Option<String>,
28    #[serde(rename = "JobModifyIndex", skip_serializing_if = "Option::is_none")]
29    pub job_modify_index: Option<i32>,
30    #[serde(rename = "Meta", skip_serializing_if = "Option::is_none")]
31    pub meta: Option<::std::collections::HashMap<String, String>>,
32    #[serde(rename = "Migrate", skip_serializing_if = "Option::is_none")]
33    pub migrate: Option<crate::models::MigrateStrategy>,
34    #[serde(rename = "ModifyIndex", skip_serializing_if = "Option::is_none")]
35    pub modify_index: Option<i32>,
36    #[serde(rename = "Multiregion", skip_serializing_if = "Option::is_none")]
37    pub multiregion: Option<crate::models::Multiregion>,
38    #[serde(rename = "Name", skip_serializing_if = "Option::is_none")]
39    pub name: Option<String>,
40    #[serde(rename = "Namespace", skip_serializing_if = "Option::is_none")]
41    pub namespace: Option<String>,
42    #[serde(rename = "NomadTokenID", skip_serializing_if = "Option::is_none")]
43    pub nomad_token_id: Option<String>,
44    #[serde(rename = "ParameterizedJob", skip_serializing_if = "Option::is_none")]
45    pub parameterized_job: Option<crate::models::ParameterizedJobConfig>,
46    #[serde(rename = "ParentID", skip_serializing_if = "Option::is_none")]
47    pub parent_id: Option<String>,
48    #[serde(rename = "Payload", skip_serializing_if = "Option::is_none")]
49    pub payload: Option<String>,
50    #[serde(rename = "Periodic", skip_serializing_if = "Option::is_none")]
51    pub periodic: Option<crate::models::PeriodicConfig>,
52    #[serde(rename = "Priority", skip_serializing_if = "Option::is_none")]
53    pub priority: Option<i32>,
54    #[serde(rename = "Region", skip_serializing_if = "Option::is_none")]
55    pub region: Option<String>,
56    #[serde(rename = "Reschedule", skip_serializing_if = "Option::is_none")]
57    pub reschedule: Option<crate::models::ReschedulePolicy>,
58    #[serde(rename = "Spreads", skip_serializing_if = "Option::is_none")]
59    pub spreads: Option<Vec<crate::models::Spread>>,
60    #[serde(rename = "Stable", skip_serializing_if = "Option::is_none")]
61    pub stable: Option<bool>,
62    #[serde(rename = "Status", skip_serializing_if = "Option::is_none")]
63    pub status: Option<String>,
64    #[serde(rename = "StatusDescription", skip_serializing_if = "Option::is_none")]
65    pub status_description: Option<String>,
66    #[serde(rename = "Stop", skip_serializing_if = "Option::is_none")]
67    pub stop: Option<bool>,
68    #[serde(rename = "SubmitTime", skip_serializing_if = "Option::is_none")]
69    pub submit_time: Option<i64>,
70    #[serde(rename = "TaskGroups", skip_serializing_if = "Option::is_none")]
71    pub task_groups: Option<Vec<crate::models::TaskGroup>>,
72    #[serde(rename = "Type", skip_serializing_if = "Option::is_none")]
73    pub _type: Option<String>,
74    #[serde(rename = "Update", skip_serializing_if = "Option::is_none")]
75    pub update: Option<crate::models::UpdateStrategy>,
76    #[serde(rename = "VaultNamespace", skip_serializing_if = "Option::is_none")]
77    pub vault_namespace: Option<String>,
78    #[serde(rename = "VaultToken", skip_serializing_if = "Option::is_none")]
79    pub vault_token: Option<String>,
80    #[serde(rename = "Version", skip_serializing_if = "Option::is_none")]
81    pub version: Option<i32>,
82}