#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Job {
#[serde(rename = "Stop", skip_serializing_if = "Option::is_none")]
pub stop: Option<bool>,
#[serde(rename = "Region", skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "Namespace", skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
#[serde(rename = "ID", skip_serializing_if = "Option::is_none")]
pub ID: Option<String>,
#[serde(rename = "ParentID", skip_serializing_if = "Option::is_none")]
pub parent_id: Option<String>,
#[serde(rename = "Name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Type", skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
#[serde(rename = "Priority", skip_serializing_if = "Option::is_none")]
pub priority: Option<i32>,
#[serde(rename = "AllAtOnce", skip_serializing_if = "Option::is_none")]
pub all_at_once: Option<bool>,
#[serde(rename = "Datacenters", skip_serializing_if = "Option::is_none")]
pub datacenters: Option<Vec<String>>,
#[serde(rename = "Constraints", skip_serializing_if = "Option::is_none")]
pub constraints: Option<Vec<crate::models::Constraint>>,
#[serde(rename = "Affinities", skip_serializing_if = "Option::is_none")]
pub affinities: Option<Vec<crate::models::Affinity>>,
#[serde(rename = "TaskGroups", skip_serializing_if = "Option::is_none")]
pub task_groups: Option<Vec<crate::models::TaskGroup>>,
#[serde(rename = "Update", skip_serializing_if = "Option::is_none")]
pub update: Option<Box<crate::models::UpdateStrategy>>,
#[serde(rename = "Spreads", skip_serializing_if = "Option::is_none")]
pub spreads: Option<Vec<crate::models::Spread>>,
#[serde(rename = "Periodic", skip_serializing_if = "Option::is_none")]
pub periodic: Option<Box<crate::models::PeriodicConfig>>,
#[serde(rename = "ParameterizedJob", skip_serializing_if = "Option::is_none")]
pub parameterized_job: Option<Box<crate::models::ParameterizedJobConfig>>,
#[serde(rename = "Dispatched", skip_serializing_if = "Option::is_none")]
pub dispatched: Option<bool>,
#[serde(rename = "Payload", skip_serializing_if = "Option::is_none")]
pub payload: Option<String>,
#[serde(rename = "Reschedule", skip_serializing_if = "Option::is_none")]
pub reschedule: Option<Box<crate::models::ReschedulePolicy>>,
#[serde(rename = "Migrate", skip_serializing_if = "Option::is_none")]
pub migrate: Option<Box<crate::models::MigrateStrategy>>,
#[serde(rename = "Meta", skip_serializing_if = "Option::is_none")]
pub meta: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "ConsulToken", skip_serializing_if = "Option::is_none")]
pub consul_token: Option<String>,
#[serde(rename = "VaultToken", skip_serializing_if = "Option::is_none")]
pub vault_token: Option<String>,
#[serde(rename = "Status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusDescription", skip_serializing_if = "Option::is_none")]
pub status_description: Option<String>,
#[serde(rename = "Stable", skip_serializing_if = "Option::is_none")]
pub stable: Option<bool>,
#[serde(rename = "Version", skip_serializing_if = "Option::is_none")]
pub version: Option<i32>,
#[serde(rename = "SubmitTime", skip_serializing_if = "Option::is_none")]
pub submit_time: Option<i64>,
#[serde(rename = "CreateIndex", skip_serializing_if = "Option::is_none")]
pub create_index: Option<i32>,
#[serde(rename = "ModifyIndex", skip_serializing_if = "Option::is_none")]
pub modify_index: Option<i32>,
#[serde(rename = "JobModifyIndex", skip_serializing_if = "Option::is_none")]
pub job_modify_index: Option<i32>,
}
impl Job {
pub fn new() -> Job {
Job {
stop: None,
region: None,
namespace: None,
ID: None,
parent_id: None,
name: None,
_type: None,
priority: None,
all_at_once: None,
datacenters: None,
constraints: None,
affinities: None,
task_groups: None,
update: None,
spreads: None,
periodic: None,
parameterized_job: None,
dispatched: None,
payload: None,
reschedule: None,
migrate: None,
meta: None,
consul_token: None,
vault_token: None,
status: None,
status_description: None,
stable: None,
version: None,
submit_time: None,
create_index: None,
modify_index: None,
job_modify_index: None,
}
}
}