Skip to main content

clientapi_pbs/models/
nodes_tasks_get_status_response_data.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NodesTasksGetStatusResponseData {
16
17    /// 'OK', 'Error: <msg>', or 'unknown'.
18    #[serde(rename = "exitstatus", skip_serializing_if = "Option::is_none")]
19    pub exitstatus: Option<String>,
20
21    /// Worker ID (arbitrary ASCII string)
22    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
23    pub id: Option<String>,
24
25    /// Node name (or 'localhost')
26    #[serde(rename = "node")]
27    pub node: String,
28
29    /// The Unix PID.
30    #[serde(rename = "pid")]
31    pub pid: i64,
32
33    /// The Unix process start time from `/proc/pid/stat`
34    #[serde(rename = "pstart")]
35    pub pstart: i64,
36
37    /// The task start time (Epoch)
38    #[serde(rename = "starttime")]
39    pub starttime: i64,
40
41    /// 'running' or 'stopped'
42    #[serde(rename = "status")]
43    pub status: String,
44
45    /// The token ID part of an API token authentication id.  This alone does NOT uniquely identify the API token - use a full `Authid` for such use cases.
46    #[serde(rename = "tokenid", skip_serializing_if = "Option::is_none")]
47    pub tokenid: Option<String>,
48
49    /// Worker type (arbitrary ASCII string)
50    #[serde(rename = "type")]
51    pub r#type: String,
52
53    /// Unique Process/Task Identifier
54    #[serde(rename = "upid")]
55    pub upid: String,
56
57    /// User ID
58    #[serde(rename = "user")]
59    pub user: String,
60
61
62}
63
64impl NodesTasksGetStatusResponseData {
65    pub fn new(node: String, pid: i64, pstart: i64, starttime: i64, status: String, r#type: String, upid: String, user: String) -> NodesTasksGetStatusResponseData {
66        NodesTasksGetStatusResponseData {
67            
68            exitstatus: None,
69            
70            id: None,
71            
72            node,
73            
74            pid,
75            
76            pstart,
77            
78            starttime,
79            
80            status,
81            
82            tokenid: None,
83            
84            r#type,
85            
86            upid,
87            
88            user,
89            
90        }
91    }
92}
93
94