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};

/// CheckSuite : A suite of checks performed on the code of a given code change
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CheckSuite {
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "head_branch", deserialize_with = "Option::deserialize")]
    pub head_branch: Option<String>,
    /// The SHA of the head commit that is being checked.
    #[serde(rename = "head_sha")]
    pub head_sha: String,
    /// The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites.
    #[serde(rename = "status", deserialize_with = "Option::deserialize")]
    pub status: Option<Status>,
    #[serde(rename = "conclusion", deserialize_with = "Option::deserialize")]
    pub conclusion: Option<Conclusion>,
    #[serde(rename = "url", deserialize_with = "Option::deserialize")]
    pub url: Option<String>,
    #[serde(rename = "before", deserialize_with = "Option::deserialize")]
    pub before: Option<String>,
    #[serde(rename = "after", deserialize_with = "Option::deserialize")]
    pub after: Option<String>,
    #[serde(rename = "pull_requests", deserialize_with = "Option::deserialize")]
    pub pull_requests: Option<Vec<models::PullRequestMinimal>>,
    #[serde(rename = "app", deserialize_with = "Option::deserialize")]
    pub app: Option<Box<models::NullableIntegration>>,
    #[serde(rename = "repository")]
    pub repository: Box<models::MinimalRepository>,
    #[serde(rename = "created_at", deserialize_with = "Option::deserialize")]
    pub created_at: Option<String>,
    #[serde(rename = "updated_at", deserialize_with = "Option::deserialize")]
    pub updated_at: Option<String>,
    #[serde(rename = "head_commit")]
    pub head_commit: Box<models::SimpleCommit>,
    #[serde(rename = "latest_check_runs_count")]
    pub latest_check_runs_count: i32,
    #[serde(rename = "check_runs_url")]
    pub check_runs_url: String,
    #[serde(rename = "rerequestable", skip_serializing_if = "Option::is_none")]
    pub rerequestable: Option<bool>,
    #[serde(rename = "runs_rerequestable", skip_serializing_if = "Option::is_none")]
    pub runs_rerequestable: Option<bool>,
}

impl CheckSuite {
    /// A suite of checks performed on the code of a given code change
    pub fn new(id: i32, node_id: String, head_branch: Option<String>, head_sha: String, status: Option<Status>, conclusion: Option<Conclusion>, url: Option<String>, before: Option<String>, after: Option<String>, pull_requests: Option<Vec<models::PullRequestMinimal>>, app: Option<models::NullableIntegration>, repository: models::MinimalRepository, created_at: Option<String>, updated_at: Option<String>, head_commit: models::SimpleCommit, latest_check_runs_count: i32, check_runs_url: String) -> CheckSuite {
        CheckSuite {
            id,
            node_id,
            head_branch,
            head_sha,
            status,
            conclusion,
            url,
            before,
            after,
            pull_requests,
            app: app.map(Box::new),
            repository: Box::new(repository),
            created_at,
            updated_at,
            head_commit: Box::new(head_commit),
            latest_check_runs_count,
            check_runs_url,
            rerequestable: None,
            runs_rerequestable: None,
        }
    }
}
/// The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites.
#[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
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Conclusion {
    #[serde(rename = "success")]
    Success,
    #[serde(rename = "failure")]
    Failure,
    #[serde(rename = "neutral")]
    Neutral,
    #[serde(rename = "cancelled")]
    Cancelled,
    #[serde(rename = "skipped")]
    Skipped,
    #[serde(rename = "timed_out")]
    TimedOut,
    #[serde(rename = "action_required")]
    ActionRequired,
    #[serde(rename = "startup_failure")]
    StartupFailure,
    #[serde(rename = "stale")]
    Stale,
}

impl Default for Conclusion {
    fn default() -> Conclusion {
        Self::Success
    }
}