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
/*
* 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 GitOpsOperation {
/// FinishedAt is when it ended, RFC 3339. Absent while the phase is Running.
#[serde(rename = "finishedAt", skip_serializing_if = "Option::is_none")]
pub finished_at: Option<String>,
/// Message is CD's account of the phase — \"successfully synced (all tasks run)\" for a Succeeded operation, the reason it stopped for a Failed one.
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
/// Phase is how the last sync operation ended, in CD's own vocabulary: Running, Succeeded or Failed. It is never empty — an Application whose phase is empty has no operation at all and omits this whole object.
#[serde(rename = "phase", skip_serializing_if = "Option::is_none")]
pub phase: Option<String>,
/// Revision is the commit this operation ATTEMPTED (operationState.syncResult). It differs from the Application's own revision exactly when the attempt did not land: revision is the last commit CD got applied, this is the last one it tried.
#[serde(rename = "revision", skip_serializing_if = "Option::is_none")]
pub revision: Option<String>,
/// StartedAt is when the operation began, RFC 3339.
#[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")]
pub started_at: Option<String>,
}
impl GitOpsOperation {
pub fn new() -> GitOpsOperation {
GitOpsOperation {
finished_at: None,
message: None,
phase: None,
revision: None,
started_at: None,
}
}
}