openapi_github/models/
runner.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/// Runner : A self hosted runner
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Runner {
17    /// The id of the runner.
18    #[serde(rename = "id")]
19    pub id: i32,
20    /// The id of the runner group.
21    #[serde(rename = "runner_group_id", skip_serializing_if = "Option::is_none")]
22    pub runner_group_id: Option<i32>,
23    /// The name of the runner.
24    #[serde(rename = "name")]
25    pub name: String,
26    /// The Operating System of the runner.
27    #[serde(rename = "os")]
28    pub os: String,
29    /// The status of the runner.
30    #[serde(rename = "status")]
31    pub status: String,
32    #[serde(rename = "busy")]
33    pub busy: bool,
34    #[serde(rename = "labels")]
35    pub labels: Vec<models::RunnerLabel>,
36}
37
38impl Runner {
39    /// A self hosted runner
40    pub fn new(id: i32, name: String, os: String, status: String, busy: bool, labels: Vec<models::RunnerLabel>) -> Runner {
41        Runner {
42            id,
43            runner_group_id: None,
44            name,
45            os,
46            status,
47            busy,
48            labels,
49        }
50    }
51}
52