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 WebhookWorkflowJobCompletedWorkflowJob {
    #[serde(rename = "check_run_url")]
    pub check_run_url: String,
    #[serde(rename = "completed_at")]
    pub completed_at: String,
    #[serde(rename = "conclusion")]
    pub conclusion: Conclusion,
    /// The time that the job created.
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "head_sha")]
    pub head_sha: String,
    #[serde(rename = "html_url")]
    pub html_url: String,
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "labels")]
    pub labels: Vec<String>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "run_attempt")]
    pub run_attempt: i32,
    #[serde(rename = "run_id")]
    pub run_id: i32,
    #[serde(rename = "run_url")]
    pub run_url: String,
    #[serde(rename = "runner_group_id", deserialize_with = "Option::deserialize")]
    pub runner_group_id: Option<f64>,
    #[serde(rename = "runner_group_name", deserialize_with = "Option::deserialize")]
    pub runner_group_name: Option<String>,
    #[serde(rename = "runner_id", deserialize_with = "Option::deserialize")]
    pub runner_id: Option<f64>,
    #[serde(rename = "runner_name", deserialize_with = "Option::deserialize")]
    pub runner_name: Option<String>,
    #[serde(rename = "started_at")]
    pub started_at: String,
    #[serde(rename = "status")]
    pub status: String,
    /// The name of the current branch.
    #[serde(rename = "head_branch", deserialize_with = "Option::deserialize")]
    pub head_branch: Option<String>,
    /// The name of the workflow.
    #[serde(rename = "workflow_name", deserialize_with = "Option::deserialize")]
    pub workflow_name: Option<String>,
    #[serde(rename = "steps")]
    pub steps: Vec<serde_json::Value>,
    #[serde(rename = "url")]
    pub url: String,
}

impl WebhookWorkflowJobCompletedWorkflowJob {
    pub fn new(check_run_url: String, completed_at: String, conclusion: Conclusion, created_at: String, head_sha: String, html_url: String, id: i32, labels: Vec<String>, name: String, node_id: String, run_attempt: i32, run_id: i32, run_url: String, runner_group_id: Option<f64>, runner_group_name: Option<String>, runner_id: Option<f64>, runner_name: Option<String>, started_at: String, status: String, head_branch: Option<String>, workflow_name: Option<String>, steps: Vec<serde_json::Value>, url: String) -> WebhookWorkflowJobCompletedWorkflowJob {
        WebhookWorkflowJobCompletedWorkflowJob {
            check_run_url,
            completed_at,
            conclusion,
            created_at,
            head_sha,
            html_url,
            id,
            labels,
            name,
            node_id,
            run_attempt,
            run_id,
            run_url,
            runner_group_id,
            runner_group_name,
            runner_id,
            runner_name,
            started_at,
            status,
            head_branch,
            workflow_name,
            steps,
            url,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Conclusion {
    #[serde(rename = "success")]
    Success,
    #[serde(rename = "failure")]
    Failure,
    #[serde(rename = "skipped")]
    Skipped,
    #[serde(rename = "cancelled")]
    Cancelled,
    #[serde(rename = "action_required")]
    ActionRequired,
    #[serde(rename = "neutral")]
    Neutral,
    #[serde(rename = "timed_out")]
    TimedOut,
}

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