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
/*
 * 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 TaskEvent {
    #[serde(rename = "Type", skip_serializing_if = "Option::is_none")]
    pub _type: Option<String>,
    #[serde(rename = "Time", skip_serializing_if = "Option::is_none")]
    pub time: Option<i64>,
    #[serde(rename = "DisplayMessage", skip_serializing_if = "Option::is_none")]
    pub display_message: Option<String>,
    #[serde(rename = "Details", skip_serializing_if = "Option::is_none")]
    pub details: Option<::std::collections::HashMap<String, String>>,
    #[serde(rename = "FailsTask", skip_serializing_if = "Option::is_none")]
    pub fails_task: Option<bool>,
    #[serde(rename = "RestartReason", skip_serializing_if = "Option::is_none")]
    pub restart_reason: Option<String>,
    #[serde(rename = "SetupError", skip_serializing_if = "Option::is_none")]
    pub setup_error: Option<String>,
    #[serde(rename = "DriverError", skip_serializing_if = "Option::is_none")]
    pub driver_error: Option<String>,
    #[serde(rename = "DriverMessage", skip_serializing_if = "Option::is_none")]
    pub driver_message: Option<String>,
    #[serde(rename = "ExitCode", skip_serializing_if = "Option::is_none")]
    pub exit_code: Option<i32>,
    #[serde(rename = "Signal", skip_serializing_if = "Option::is_none")]
    pub signal: Option<i32>,
    #[serde(rename = "Message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[serde(rename = "KillReason", skip_serializing_if = "Option::is_none")]
    pub kill_reason: Option<String>,
    #[serde(rename = "KillTimeout", skip_serializing_if = "Option::is_none")]
    pub kill_timeout: Option<i64>,
    #[serde(rename = "KillError", skip_serializing_if = "Option::is_none")]
    pub kill_error: Option<String>,
    #[serde(rename = "StartDelay", skip_serializing_if = "Option::is_none")]
    pub start_delay: Option<i64>,
    #[serde(rename = "DownloadError", skip_serializing_if = "Option::is_none")]
    pub download_error: Option<String>,
    #[serde(rename = "ValidationError", skip_serializing_if = "Option::is_none")]
    pub validation_error: Option<String>,
    #[serde(rename = "DiskLimit", skip_serializing_if = "Option::is_none")]
    pub disk_limit: Option<i64>,
    #[serde(rename = "DiskSize", skip_serializing_if = "Option::is_none")]
    pub disk_size: Option<i64>,
    #[serde(rename = "FailedSibling", skip_serializing_if = "Option::is_none")]
    pub failed_sibling: Option<String>,
    #[serde(rename = "VaultError", skip_serializing_if = "Option::is_none")]
    pub vault_error: Option<String>,
    #[serde(rename = "TaskSignalReason", skip_serializing_if = "Option::is_none")]
    pub task_signal_reason: Option<String>,
    #[serde(rename = "TaskSignal", skip_serializing_if = "Option::is_none")]
    pub task_signal: Option<String>,
    #[serde(rename = "GenericSource", skip_serializing_if = "Option::is_none")]
    pub generic_source: Option<String>,
}

impl TaskEvent {
    pub fn new() -> TaskEvent {
        TaskEvent {
            _type: None,
            time: None,
            display_message: None,
            details: None,
            fails_task: None,
            restart_reason: None,
            setup_error: None,
            driver_error: None,
            driver_message: None,
            exit_code: None,
            signal: None,
            message: None,
            kill_reason: None,
            kill_timeout: None,
            kill_error: None,
            start_delay: None,
            download_error: None,
            validation_error: None,
            disk_limit: None,
            disk_size: None,
            failed_sibling: None,
            vault_error: None,
            task_signal_reason: None,
            task_signal: None,
            generic_source: None,
        }
    }
}