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 JobStepsInner {
    /// The phase of the lifecycle that the job is currently in.
    #[serde(rename = "status")]
    pub status: Status,
    /// The outcome of the job.
    #[serde(rename = "conclusion", deserialize_with = "Option::deserialize")]
    pub conclusion: Option<String>,
    /// The name of the job.
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "number")]
    pub number: i32,
    /// The time that the step started, in ISO 8601 format.
    #[serde(rename = "started_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub started_at: Option<Option<String>>,
    /// The time that the job finished, in ISO 8601 format.
    #[serde(rename = "completed_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub completed_at: Option<Option<String>>,
}

impl JobStepsInner {
    pub fn new(status: Status, conclusion: Option<String>, name: String, number: i32) -> JobStepsInner {
        JobStepsInner {
            status,
            conclusion,
            name,
            number,
            started_at: None,
            completed_at: None,
        }
    }
}
/// The phase of the lifecycle that the job is currently in.
#[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,
}

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