hanzo_client/models/argo_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 ArgoNode {
16 /// CreatedAt is the object's creationTimestamp, RFC 3339 UTC to the second. Absent when the object carries none.
17 #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
18 pub created_at: Option<String>,
19 #[serde(rename = "group", skip_serializing_if = "Option::is_none")]
20 pub group: Option<String>,
21 /// Health is the node's own derived health. Always present on a node of this tree; a kind with no health signal of its own reports Healthy, since a ConfigMap existing IS its healthy state.
22 #[serde(rename = "health", skip_serializing_if = "Option::is_none")]
23 pub health: Option<Box<models::ArgoHealth>>,
24 /// Images are the container images running on this node. Always absent — the tag travels as the \"Image Tag\" chip in Info instead, which is where the SPA reads it on a node.
25 #[serde(rename = "images", skip_serializing_if = "Option::is_none")]
26 pub images: Option<Vec<String>>,
27 /// Info are the chips shown on the node. At most one: the image tag — the RUNNING tag on a Deployment, ReplicaSet or Pod, and the DECLARED tag on the App CR at the root. Absent on a node that carries no image at all.
28 #[serde(rename = "info", skip_serializing_if = "Option::is_none")]
29 pub info: Option<Vec<models::ArgoInfoItem>>,
30 #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
31 pub kind: Option<String>,
32 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
33 pub name: Option<String>,
34 #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
35 pub namespace: Option<String>,
36 /// ParentRefs are the node's edges UPWARD, which is how the SPA draws the DAG from this flat list. Exactly one entry where present: a depth-1 object points at the App CR, a ReplicaSet at its Deployment, a Pod at its ReplicaSet (or at the Deployment whose selector matches it, when the ReplicaSet is gone). Absent on the root.
37 #[serde(rename = "parentRefs", skip_serializing_if = "Option::is_none")]
38 pub parent_refs: Option<Vec<models::ArgoResourceRef>>,
39 /// ResourceVersion is the k8s version a watch would resume from. Always empty: the tree is rebuilt from live reads on every request, including on every frame of the SSE stream, so there is no revision to resume from.
40 #[serde(rename = "resourceVersion", skip_serializing_if = "Option::is_none")]
41 pub resource_version: Option<String>,
42 #[serde(rename = "uid", skip_serializing_if = "Option::is_none")]
43 pub uid: Option<String>,
44 #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
45 pub version: Option<String>,
46}
47
48impl ArgoNode {
49 pub fn new() -> ArgoNode {
50 ArgoNode {
51 created_at: None,
52 group: None,
53 health: None,
54 images: None,
55 info: None,
56 kind: None,
57 name: None,
58 namespace: None,
59 parent_refs: None,
60 resource_version: None,
61 uid: None,
62 version: None,
63 }
64 }
65}
66