hanzo_client/models/tree_node.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 TreeNode {
16 /// Children is this node's direct children, each a whole node, so the array nests to the depth of the flow. A leaf carries null rather than an empty array. The subtree is materialised in full, up to 10000 nodes, out of one indexed read of the root; nothing is walked node by node.
17 #[serde(rename = "children", skip_serializing_if = "Option::is_none")]
18 pub children: Option<Vec<models::TreeNode>>,
19 /// Session is this node's own session, carrying its event count and its direct fan-out. It is the same shape the list and detail reads answer with, minus the last-event preview, which the tree does not fetch.
20 #[serde(rename = "session", skip_serializing_if = "Option::is_none")]
21 pub session: Option<Box<models::SessionView>>,
22}
23
24impl TreeNode {
25 pub fn new() -> TreeNode {
26 TreeNode {
27 children: None,
28 session: None,
29 }
30 }
31}
32