openapi_github/models/
check_run_with_simple_check_suite.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CheckRunWithSimpleCheckSuite : A check performed on the code of a given code change
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CheckRunWithSimpleCheckSuite {
17    #[serde(rename = "app", deserialize_with = "Option::deserialize")]
18    pub app: Option<Box<models::NullableIntegration>>,
19    #[serde(rename = "check_suite")]
20    pub check_suite: Box<models::SimpleCheckSuite>,
21    #[serde(rename = "completed_at", deserialize_with = "Option::deserialize")]
22    pub completed_at: Option<String>,
23    #[serde(rename = "conclusion", deserialize_with = "Option::deserialize")]
24    pub conclusion: Option<Conclusion>,
25    #[serde(rename = "deployment", skip_serializing_if = "Option::is_none")]
26    pub deployment: Option<Box<models::DeploymentSimple>>,
27    #[serde(rename = "details_url")]
28    pub details_url: String,
29    #[serde(rename = "external_id")]
30    pub external_id: String,
31    /// The SHA of the commit that is being checked.
32    #[serde(rename = "head_sha")]
33    pub head_sha: String,
34    #[serde(rename = "html_url")]
35    pub html_url: String,
36    /// The id of the check.
37    #[serde(rename = "id")]
38    pub id: i32,
39    /// The name of the check.
40    #[serde(rename = "name")]
41    pub name: String,
42    #[serde(rename = "node_id")]
43    pub node_id: String,
44    #[serde(rename = "output")]
45    pub output: Box<models::CheckRunWithSimpleCheckSuiteOutput>,
46    #[serde(rename = "pull_requests")]
47    pub pull_requests: Vec<models::PullRequestMinimal>,
48    #[serde(rename = "started_at")]
49    pub started_at: String,
50    /// The phase of the lifecycle that the check is currently in.
51    #[serde(rename = "status")]
52    pub status: Status,
53    #[serde(rename = "url")]
54    pub url: String,
55}
56
57impl CheckRunWithSimpleCheckSuite {
58    /// A check performed on the code of a given code change
59    pub fn new(app: Option<models::NullableIntegration>, check_suite: models::SimpleCheckSuite, completed_at: Option<String>, conclusion: Option<Conclusion>, details_url: String, external_id: String, head_sha: String, html_url: String, id: i32, name: String, node_id: String, output: models::CheckRunWithSimpleCheckSuiteOutput, pull_requests: Vec<models::PullRequestMinimal>, started_at: String, status: Status, url: String) -> CheckRunWithSimpleCheckSuite {
60        CheckRunWithSimpleCheckSuite {
61            app: app.map(Box::new),
62            check_suite: Box::new(check_suite),
63            completed_at,
64            conclusion,
65            deployment: None,
66            details_url,
67            external_id,
68            head_sha,
69            html_url,
70            id,
71            name,
72            node_id,
73            output: Box::new(output),
74            pull_requests,
75            started_at,
76            status,
77            url,
78        }
79    }
80}
81/// 
82#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
83pub enum Conclusion {
84    #[serde(rename = "waiting")]
85    Waiting,
86    #[serde(rename = "pending")]
87    Pending,
88    #[serde(rename = "startup_failure")]
89    StartupFailure,
90    #[serde(rename = "stale")]
91    Stale,
92    #[serde(rename = "success")]
93    Success,
94    #[serde(rename = "failure")]
95    Failure,
96    #[serde(rename = "neutral")]
97    Neutral,
98    #[serde(rename = "cancelled")]
99    Cancelled,
100    #[serde(rename = "skipped")]
101    Skipped,
102    #[serde(rename = "timed_out")]
103    TimedOut,
104    #[serde(rename = "action_required")]
105    ActionRequired,
106}
107
108impl Default for Conclusion {
109    fn default() -> Conclusion {
110        Self::Waiting
111    }
112}
113/// The phase of the lifecycle that the check is currently in.
114#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
115pub enum Status {
116    #[serde(rename = "queued")]
117    Queued,
118    #[serde(rename = "in_progress")]
119    InProgress,
120    #[serde(rename = "completed")]
121    Completed,
122    #[serde(rename = "pending")]
123    Pending,
124}
125
126impl Default for Status {
127    fn default() -> Status {
128        Self::Queued
129    }
130}
131