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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
* GitHub's official OpenAPI spec + Octokit extension
*
* OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
*
* The version of the OpenAPI document: 16.6.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ChecksUpdateRequest {
/// The name of the check. For example, \"code-coverage\".
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// The URL of the integrator's site that has the full details of the check.
#[serde(rename = "details_url", skip_serializing_if = "Option::is_none")]
pub details_url: Option<String>,
/// A reference for the run on the integrator's system.
#[serde(rename = "external_id", skip_serializing_if = "Option::is_none")]
pub external_id: Option<String>,
/// This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
#[serde(rename = "started_at", skip_serializing_if = "Option::is_none")]
pub started_at: Option<String>,
/// The current status of the check run. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<Status>,
/// **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.
#[serde(rename = "conclusion", skip_serializing_if = "Option::is_none")]
pub conclusion: Option<Conclusion>,
/// The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.
#[serde(rename = "completed_at", skip_serializing_if = "Option::is_none")]
pub completed_at: Option<String>,
#[serde(rename = "output", skip_serializing_if = "Option::is_none")]
pub output: Option<Box<models::ChecksUpdateRequestOutput>>,
/// Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/rest/guides/using-the-rest-api-to-interact-with-checks#check-runs-and-requested-actions).\"
#[serde(rename = "actions", skip_serializing_if = "Option::is_none")]
pub actions: Option<Vec<models::ChecksCreateRequestActionsInner>>,
}
impl ChecksUpdateRequest {
pub fn new() -> ChecksUpdateRequest {
ChecksUpdateRequest {
name: None,
details_url: None,
external_id: None,
started_at: None,
status: None,
conclusion: None,
completed_at: None,
output: None,
actions: None,
}
}
}
/// The current status of the check run. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "queued")]
Queued,
#[serde(rename = "in_progress")]
InProgress,
#[serde(rename = "completed")]
Completed,
#[serde(rename = "waiting")]
Waiting,
#[serde(rename = "requested")]
Requested,
#[serde(rename = "pending")]
Pending,
}
impl Default for Status {
fn default() -> Status {
Self::Queued
}
}
/// **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Conclusion {
#[serde(rename = "action_required")]
ActionRequired,
#[serde(rename = "cancelled")]
Cancelled,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "neutral")]
Neutral,
#[serde(rename = "success")]
Success,
#[serde(rename = "skipped")]
Skipped,
#[serde(rename = "stale")]
Stale,
#[serde(rename = "timed_out")]
TimedOut,
}
impl Default for Conclusion {
fn default() -> Conclusion {
Self::ActionRequired
}
}