openapi_github/models/
codespace_git_status.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/// CodespaceGitStatus : Details about the codespace's git repository.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CodespaceGitStatus {
17    /// The number of commits the local repository is ahead of the remote.
18    #[serde(rename = "ahead", skip_serializing_if = "Option::is_none")]
19    pub ahead: Option<i32>,
20    /// The number of commits the local repository is behind the remote.
21    #[serde(rename = "behind", skip_serializing_if = "Option::is_none")]
22    pub behind: Option<i32>,
23    /// Whether the local repository has unpushed changes.
24    #[serde(rename = "has_unpushed_changes", skip_serializing_if = "Option::is_none")]
25    pub has_unpushed_changes: Option<bool>,
26    /// Whether the local repository has uncommitted changes.
27    #[serde(rename = "has_uncommitted_changes", skip_serializing_if = "Option::is_none")]
28    pub has_uncommitted_changes: Option<bool>,
29    /// The current branch (or SHA if in detached HEAD state) of the local repository.
30    #[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
31    pub r#ref: Option<String>,
32}
33
34impl CodespaceGitStatus {
35    /// Details about the codespace's git repository.
36    pub fn new() -> CodespaceGitStatus {
37        CodespaceGitStatus {
38            ahead: None,
39            behind: None,
40            has_unpushed_changes: None,
41            has_uncommitted_changes: None,
42            r#ref: None,
43        }
44    }
45}
46