hanzo_client/models/git_ops_operation.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 GitOpsOperation {
16 /// FinishedAt is when it ended, RFC 3339. Absent while the phase is Running.
17 #[serde(rename = "finishedAt", skip_serializing_if = "Option::is_none")]
18 pub finished_at: Option<String>,
19 /// 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.
20 #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
21 pub message: Option<String>,
22 /// 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.
23 #[serde(rename = "phase", skip_serializing_if = "Option::is_none")]
24 pub phase: Option<String>,
25 /// 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.
26 #[serde(rename = "revision", skip_serializing_if = "Option::is_none")]
27 pub revision: Option<String>,
28 /// StartedAt is when the operation began, RFC 3339.
29 #[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")]
30 pub started_at: Option<String>,
31}
32
33impl GitOpsOperation {
34 pub fn new() -> GitOpsOperation {
35 GitOpsOperation {
36 finished_at: None,
37 message: None,
38 phase: None,
39 revision: None,
40 started_at: None,
41 }
42 }
43}
44