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
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeviceView {
/// Accounts is every account the caller has signed in on this machine.
#[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
pub accounts: Option<Vec<models::LinkView>>,
/// ActiveSessions is how many agent sessions the caller currently has running on this machine; 0 where the agent plane is not mounted.
#[serde(rename = "activeSessions", skip_serializing_if = "Option::is_none")]
pub active_sessions: Option<i32>,
/// Host is the machine's hostname label, from its most-recently-seen account.
#[serde(rename = "host", skip_serializing_if = "Option::is_none")]
pub host: Option<String>,
/// LastSeen is when any account on this machine last reported, RFC 3339 UTC.
#[serde(rename = "lastSeen", skip_serializing_if = "Option::is_none")]
pub last_seen: Option<String>,
/// Machine is the stable machine identifier.
#[serde(rename = "machine", skip_serializing_if = "Option::is_none")]
pub machine: Option<String>,
/// OS is the machine's operating system label.
#[serde(rename = "os", skip_serializing_if = "Option::is_none")]
pub os: Option<String>,
}
impl DeviceView {
pub fn new() -> DeviceView {
DeviceView {
accounts: None,
active_sessions: None,
host: None,
last_seen: None,
machine: None,
os: None,
}
}
}