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
/*
* 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 ReportRunIn {
/// Branch, CommitSha and Diffstat describe what the run produced; Error is the failure when OK is false. Each is clamped, never rejected.
#[serde(rename = "branch", skip_serializing_if = "Option::is_none")]
pub branch: Option<String>,
/// Changed says whether the run produced any commit. It is INDEPENDENT of OK: a run can succeed and change nothing (there was nothing to do), and a run can fail after committing some of its work. Two questions, two booleans.
#[serde(rename = "changed", skip_serializing_if = "Option::is_none")]
pub changed: Option<bool>,
/// CommitSha is the tip the run pushed, clamped to 128 characters. Empty when it pushed nothing, which is the same case Changed reports false for.
#[serde(rename = "commitSha", skip_serializing_if = "Option::is_none")]
pub commit_sha: Option<String>,
/// Diffstat is the run's own summary of what it changed, as text, clamped to 64 KiB. Free-form: it is shown, never parsed.
#[serde(rename = "diffstat", skip_serializing_if = "Option::is_none")]
pub diffstat: Option<String>,
/// Error is why the run failed, clamped to 64 KiB. It is CLAMPED rather than refused — a truncated reason is worth more than a rejected report, because a rejected report leaves the durable workflow waiting forever.
#[serde(rename = "error", skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
/// ID is the machine reporting, from the path.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// OK is whether the run succeeded; Changed whether it produced any commit.
#[serde(rename = "ok", skip_serializing_if = "Option::is_none")]
pub ok: Option<bool>,
/// RunID is the routed run being completed, from the path.
#[serde(rename = "runId", skip_serializing_if = "Option::is_none")]
pub run_id: Option<String>,
}
impl ReportRunIn {
pub fn new() -> ReportRunIn {
ReportRunIn {
branch: None,
changed: None,
commit_sha: None,
diffstat: None,
error: None,
id: None,
ok: None,
run_id: None,
}
}
}