hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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,
        }
    }
}