Skip to main content

hanzo_client/models/
git_ops_deploy.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 GitOpsDeploy {
16    /// Automated is whether CD started this deploy itself, from its own polling of the tracked git ref (initiatedBy.automated), rather than someone asking for it.
17    #[serde(rename = "automated", skip_serializing_if = "Option::is_none")]
18    pub automated: Option<bool>,
19    /// DeployedAt is when the apply finished, RFC 3339. Absent when CD recorded none.
20    #[serde(rename = "deployedAt", skip_serializing_if = "Option::is_none")]
21    pub deployed_at: Option<String>,
22    /// ID is CD's own sequence number for this deploy (status.history[].id). It increases with every applied revision, so the largest id in `history` is the most recent deploy — which is the first entry, since the list is reversed.
23    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24    pub id: Option<i32>,
25    /// Revision is the git commit this deploy applied, as CD recorded it.
26    #[serde(rename = "revision", skip_serializing_if = "Option::is_none")]
27    pub revision: Option<String>,
28    /// StartedAt is when CD began applying the revision (deployStartedAt), RFC 3339. Absent when CD recorded none.
29    #[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")]
30    pub started_at: Option<String>,
31}
32
33impl GitOpsDeploy {
34    pub fn new() -> GitOpsDeploy {
35        GitOpsDeploy {
36            automated: None,
37            deployed_at: None,
38            id: None,
39            revision: None,
40            started_at: None,
41        }
42    }
43}
44