Skip to main content

hanzo_client/models/
node_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 NodeView {
16    /// Caps is the capability list the node reported. It is a self-report, useful to SHOW and never load-bearing: what a node may actually be asked to do is decided at the socket by the deployment's allowlist.
17    #[serde(rename = "caps", skip_serializing_if = "Option::is_none")]
18    pub caps: Option<Vec<String>>,
19    /// Commands is the command list the node reported. Same standing as Caps: a self-report, checked again at the socket before anything runs.
20    #[serde(rename = "commands", skip_serializing_if = "Option::is_none")]
21    pub commands: Option<Vec<String>>,
22    /// ConnectedAt is when this node's socket was established, RFC3339 UTC.
23    #[serde(rename = "connectedAt", skip_serializing_if = "Option::is_none")]
24    pub connected_at: Option<String>,
25    /// DisplayName is the human name the node reported for itself.
26    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
27    pub display_name: Option<String>,
28    /// ID is the node's own identifier within the org — the value POST /v1/node/{id}/invoke addresses it by.
29    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
30    pub id: Option<String>,
31    /// Platform is the operating system and architecture the node reported.
32    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
33    pub platform: Option<String>,
34    /// Version is the node agent's own version string.
35    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
36    pub version: Option<String>,
37}
38
39impl NodeView {
40    pub fn new() -> NodeView {
41        NodeView {
42            caps: None,
43            commands: None,
44            connected_at: None,
45            display_name: None,
46            id: None,
47            platform: None,
48            version: None,
49        }
50    }
51}
52