Skip to main content

hanzo_client/models/
tree_entry.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 TreeEntry {
16    /// Lang is the language the indexer parsed the file as (\"go\", \"python\", …), or empty when it recognised none — in which case Symbols is 0 because nothing was extracted, not because the file declares nothing.
17    #[serde(rename = "lang", skip_serializing_if = "Option::is_none")]
18    pub lang: Option<String>,
19    /// Path is the file, relative to the repo root. The list is ordered by it, so a reader can see module layout without sorting.
20    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
21    pub path: Option<String>,
22    /// Symbols is how many top-level declarations the file defines. A file with none is still listed: the file set is the authority here and the counts decorate it.
23    #[serde(rename = "symbols", skip_serializing_if = "Option::is_none")]
24    pub symbols: Option<i32>,
25}
26
27impl TreeEntry {
28    pub fn new() -> TreeEntry {
29        TreeEntry {
30            lang: None,
31            path: None,
32            symbols: None,
33        }
34    }
35}
36