1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* Hanzo Cloud API
*
* 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/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GitOpsApp {
/// Automated is whether CD applies new commits without being asked. It reads the PRESENCE of spec.syncPolicy.automated, which is a block rather than a boolean; false means drift is reported and nothing moves.
#[serde(rename = "automated", skip_serializing_if = "Option::is_none")]
pub automated: Option<bool>,
/// Health is CD's verdict on the objects it manages, verbatim: Healthy, Progressing, Degraded, Suspended, Missing or Unknown.
#[serde(rename = "health", skip_serializing_if = "Option::is_none")]
pub health: Option<String>,
/// History is the recent deploy log, NEWEST FIRST and capped at ten. CD appends oldest-first and bounds the list itself; the reversal happens here so a caller never has to know the storage order to show what shipped last. Empty (never null) for an Application that has deployed nothing.
#[serde(rename = "history", skip_serializing_if = "Option::is_none")]
pub history: Option<Vec<models::GitOpsDeploy>>,
/// Name is what CD calls this tracked source, not the workload it deploys — the Application CR's own metadata.name. The fleet ApplicationSet mints these as <namespace>-<app>.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Namespace is where the Application OBJECT lives: CD's own controller namespace, which is the same one for every row here. It is NOT the destination the workloads land in — this endpoint lists cluster-wide and never reads spec.destination.
#[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
/// Operation is the last sync attempt and how it ended. Absent when CD has run none, which is the honest gap between \"never tried\" and \"tried and failed\".
#[serde(rename = "operation", skip_serializing_if = "Option::is_none")]
pub operation: Option<Box<models::GitOpsOperation>>,
/// Path is the directory inside that repository CD renders, relative to its root.
#[serde(rename = "path", skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Project is the AppProject fence the sync is admitted under: which repos this Application may pull from and which destinations it may write to. Empty when the CR declares none.
#[serde(rename = "project", skip_serializing_if = "Option::is_none")]
pub project: Option<String>,
/// ReconciledAt is when CD last COMPARED this Application against git, RFC 3339. It moves on every comparison, including ones that applied nothing.
#[serde(rename = "reconciledAt", skip_serializing_if = "Option::is_none")]
pub reconciled_at: Option<String>,
/// RepoURL is the git repository CD polls for this Application's desired state.
#[serde(rename = "repoURL", skip_serializing_if = "Option::is_none")]
pub repo_url: Option<String>,
/// Resources is how MANY objects CD manages for this Application (len(status.resources)) — a count, not the objects. Zero for an Application CD has not reconciled.
#[serde(rename = "resources", skip_serializing_if = "Option::is_none")]
pub resources: Option<i32>,
/// Revision is the commit CD last APPLIED (status.sync.revision). Empty means it has applied none — never read that as the head of TargetRevision.
#[serde(rename = "revision", skip_serializing_if = "Option::is_none")]
pub revision: Option<String>,
/// SelfHeal is whether CD also reverts changes made directly in the cluster (syncPolicy.automated.selfHeal). Meaningless unless Automated.
#[serde(rename = "selfHeal", skip_serializing_if = "Option::is_none")]
pub self_heal: Option<bool>,
/// Sync is CD's verdict on git versus cluster, verbatim: Synced, OutOfSync or Unknown. It is about the applied REVISION, so an Application can be Synced to a commit that is several behind the branch it tracks.
#[serde(rename = "sync", skip_serializing_if = "Option::is_none")]
pub sync: Option<String>,
/// TargetRevision is the git ref CD TRACKS — usually a branch such as \"main\". It is what CD aims at; Revision is what it has reached.
#[serde(rename = "targetRevision", skip_serializing_if = "Option::is_none")]
pub target_revision: Option<String>,
}
impl GitOpsApp {
pub fn new() -> GitOpsApp {
GitOpsApp {
automated: None,
health: None,
history: None,
name: None,
namespace: None,
operation: None,
path: None,
project: None,
reconciled_at: None,
repo_url: None,
resources: None,
revision: None,
self_heal: None,
sync: None,
target_revision: None,
}
}
}