1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
 * Nomad
 *
 * Nomad OpenApi specification
 *
 * The version of the OpenAPI document: 0.11.0
 * 
 * Generated by: https://openapi-generator.tech
 */




#[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,
        }
    }
}