Skip to main content

hanzo_client/models/
device_view.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
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 DeviceView {
16    /// Accounts is every account the caller has signed in on this machine.
17    #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
18    pub accounts: Option<Vec<models::LinkView>>,
19    /// ActiveSessions is how many agent sessions the caller currently has running on this machine; 0 where the agent plane is not mounted.
20    #[serde(rename = "activeSessions", skip_serializing_if = "Option::is_none")]
21    pub active_sessions: Option<i32>,
22    /// Host is the machine's hostname label, from its most-recently-seen account.
23    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
24    pub host: Option<String>,
25    /// LastSeen is when any account on this machine last reported, RFC 3339 UTC.
26    #[serde(rename = "lastSeen", skip_serializing_if = "Option::is_none")]
27    pub last_seen: Option<String>,
28    /// Machine is the stable machine identifier.
29    #[serde(rename = "machine", skip_serializing_if = "Option::is_none")]
30    pub machine: Option<String>,
31    /// OS is the machine's operating system label.
32    #[serde(rename = "os", skip_serializing_if = "Option::is_none")]
33    pub os: Option<String>,
34}
35
36impl DeviceView {
37    pub fn new() -> DeviceView {
38        DeviceView {
39            accounts: None,
40            active_sessions: None,
41            host: None,
42            last_seen: None,
43            machine: None,
44            os: None,
45        }
46    }
47}
48