-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathabout_data.rs
More file actions
48 lines (45 loc) · 1.33 KB
/
about_data.rs
File metadata and controls
48 lines (45 loc) · 1.33 KB
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
/*
* Devolutions PEDM API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AboutData {
#[serde(rename = "CurrentRequestCount")]
pub current_request_count: i32,
/// The time of the most recent request. This can be `None` if `/about` is the first request made.
#[serde(rename = "LastRequestTime", skip_serializing_if = "Option::is_none")]
pub last_request_time: Option<String>,
#[serde(rename = "RunId")]
pub run_id: i32,
#[serde(rename = "StartTime")]
pub start_time: String,
#[serde(rename = "StartupRequestCount")]
pub startup_request_count: i32,
#[serde(rename = "Version")]
pub version: String,
}
impl AboutData {
pub fn new(
current_request_count: i32,
run_id: i32,
start_time: String,
startup_request_count: i32,
version: String,
) -> AboutData {
AboutData {
current_request_count,
last_request_time: None,
run_id,
start_time,
startup_request_count,
version,
}
}
}