Skip to main content

hanzo_client/models/
cd_app.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 CdApp {
16    /// Automated is whether CD applies git without being asked. It is cd.automated in the values file, rendered by the ApplicationSet's templatePatch — false means the Application reports drift and nothing moves.
17    #[serde(rename = "automated", skip_serializing_if = "Option::is_none")]
18    pub automated: Option<bool>,
19    /// Health is the workload's verdict: Healthy, Progressing, Degraded, Missing.
20    #[serde(rename = "health", skip_serializing_if = "Option::is_none")]
21    pub health: Option<String>,
22    /// Message is why, when Health is not Healthy.
23    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
24    pub message: Option<String>,
25    /// Name is the Application name the generator mints: <namespace>-<app>. It is the join key against a Declaration.
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28    /// Namespace is the DESTINATION namespace as the CR declares it — where the workload lands. For a fleet Application that is the org, but this is the OBSERVED field and not our model of it: the two can disagree, and a board whose whole job is drift must be able to show that they do.
29    #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
30    pub namespace: Option<String>,
31    #[serde(rename = "operationMessage", skip_serializing_if = "Option::is_none")]
32    pub operation_message: Option<String>,
33    /// Path is the values file CD renders against, relative to the chart source.
34    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
35    pub path: Option<String>,
36    /// Phase is the last sync operation's phase (Running, Succeeded, Failed) and OperationMessage is its message. A Failed phase with a Synced verdict is the shape a stuck Application takes.
37    #[serde(rename = "phase", skip_serializing_if = "Option::is_none")]
38    pub phase: Option<String>,
39    /// Project is the AppProject fence the sync is admitted under.
40    #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
41    pub project: Option<String>,
42    /// ReconciledAt is when CD last compared this Application.
43    #[serde(rename = "reconciledAt", skip_serializing_if = "Option::is_none")]
44    pub reconciled_at: Option<String>,
45    /// Revision is the universe commit CD last applied. Empty means it has not applied one — never assume it means main.
46    #[serde(rename = "revision", skip_serializing_if = "Option::is_none")]
47    pub revision: Option<String>,
48    /// SelfHeal is whether CD also corrects drift the cluster introduced.
49    #[serde(rename = "selfHeal", skip_serializing_if = "Option::is_none")]
50    pub self_heal: Option<bool>,
51    /// Sync is CD's verdict on git-versus-cluster: Synced, OutOfSync, or Unknown.
52    #[serde(rename = "sync", skip_serializing_if = "Option::is_none")]
53    pub sync: Option<String>,
54}
55
56impl CdApp {
57    pub fn new() -> CdApp {
58        CdApp {
59            automated: None,
60            health: None,
61            message: None,
62            name: None,
63            namespace: None,
64            operation_message: None,
65            path: None,
66            phase: None,
67            project: None,
68            reconciled_at: None,
69            revision: None,
70            self_heal: None,
71            sync: None,
72        }
73    }
74}
75