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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookDeploymentStatusCreatedCheckRun {
    #[serde(rename = "completed_at", deserialize_with = "Option::deserialize")]
    pub completed_at: Option<String>,
    /// The result of the completed check run. This value will be `null` until the check run has completed.
    #[serde(rename = "conclusion", deserialize_with = "Option::deserialize")]
    pub conclusion: Option<Conclusion>,
    #[serde(rename = "details_url")]
    pub details_url: String,
    #[serde(rename = "external_id")]
    pub external_id: String,
    /// The SHA of the commit that is being checked.
    #[serde(rename = "head_sha")]
    pub head_sha: String,
    #[serde(rename = "html_url")]
    pub html_url: String,
    /// The id of the check.
    #[serde(rename = "id")]
    pub id: i32,
    /// The name of the check run.
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "started_at")]
    pub started_at: String,
    /// The current status of the check run. Can be `queued`, `in_progress`, or `completed`.
    #[serde(rename = "status")]
    pub status: Status,
    #[serde(rename = "url")]
    pub url: String,
}

impl WebhookDeploymentStatusCreatedCheckRun {
    pub fn new(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, started_at: String, status: Status, url: String) -> WebhookDeploymentStatusCreatedCheckRun {
        WebhookDeploymentStatusCreatedCheckRun {
            completed_at,
            conclusion,
            details_url,
            external_id,
            head_sha,
            html_url,
            id,
            name,
            node_id,
            started_at,
            status,
            url,
        }
    }
}
/// The result of the completed check run. This value will be `null` until the check run has completed.
#[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 = "timed_out")]
    TimedOut,
    #[serde(rename = "action_required")]
    ActionRequired,
    #[serde(rename = "stale")]
    Stale,
    #[serde(rename = "skipped")]
    Skipped,
}

impl Default for Conclusion {
    fn default() -> Conclusion {
        Self::Success
    }
}
/// The current status of the check run. Can be `queued`, `in_progress`, or `completed`.
#[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 = "pending")]
    Pending,
}

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