openapi-github 0.1.0

OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
Documentation
/*
 * 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};

/// CommitComparison : Commit Comparison
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CommitComparison {
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "html_url")]
    pub html_url: String,
    #[serde(rename = "permalink_url")]
    pub permalink_url: String,
    #[serde(rename = "diff_url")]
    pub diff_url: String,
    #[serde(rename = "patch_url")]
    pub patch_url: String,
    #[serde(rename = "base_commit")]
    pub base_commit: Box<models::Commit>,
    #[serde(rename = "merge_base_commit")]
    pub merge_base_commit: Box<models::Commit>,
    #[serde(rename = "status")]
    pub status: Status,
    #[serde(rename = "ahead_by")]
    pub ahead_by: i32,
    #[serde(rename = "behind_by")]
    pub behind_by: i32,
    #[serde(rename = "total_commits")]
    pub total_commits: i32,
    #[serde(rename = "commits")]
    pub commits: Vec<models::Commit>,
    #[serde(rename = "files", skip_serializing_if = "Option::is_none")]
    pub files: Option<Vec<models::DiffEntry>>,
}

impl CommitComparison {
    /// Commit Comparison
    pub fn new(url: String, html_url: String, permalink_url: String, diff_url: String, patch_url: String, base_commit: models::Commit, merge_base_commit: models::Commit, status: Status, ahead_by: i32, behind_by: i32, total_commits: i32, commits: Vec<models::Commit>) -> CommitComparison {
        CommitComparison {
            url,
            html_url,
            permalink_url,
            diff_url,
            patch_url,
            base_commit: Box::new(base_commit),
            merge_base_commit: Box::new(merge_base_commit),
            status,
            ahead_by,
            behind_by,
            total_commits,
            commits,
            files: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "diverged")]
    Diverged,
    #[serde(rename = "ahead")]
    Ahead,
    #[serde(rename = "behind")]
    Behind,
    #[serde(rename = "identical")]
    Identical,
}

impl Default for Status {
    fn default() -> Status {
        Self::Diverged
    }
}