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

/// ProjectsV2 : A projects v2 project
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProjectsV2 {
    #[serde(rename = "id")]
    pub id: f64,
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "owner")]
    pub owner: Box<models::SimpleUser>,
    #[serde(rename = "creator")]
    pub creator: Box<models::SimpleUser>,
    #[serde(rename = "title")]
    pub title: String,
    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
    pub description: Option<String>,
    #[serde(rename = "public")]
    pub public: bool,
    #[serde(rename = "closed_at", deserialize_with = "Option::deserialize")]
    pub closed_at: Option<String>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    #[serde(rename = "number")]
    pub number: i32,
    #[serde(rename = "short_description", deserialize_with = "Option::deserialize")]
    pub short_description: Option<String>,
    #[serde(rename = "deleted_at", deserialize_with = "Option::deserialize")]
    pub deleted_at: Option<String>,
    #[serde(rename = "deleted_by", deserialize_with = "Option::deserialize")]
    pub deleted_by: Option<Box<models::NullableSimpleUser>>,
}

impl ProjectsV2 {
    /// A projects v2 project
    pub fn new(id: f64, node_id: String, owner: models::SimpleUser, creator: models::SimpleUser, title: String, description: Option<String>, public: bool, closed_at: Option<String>, created_at: String, updated_at: String, number: i32, short_description: Option<String>, deleted_at: Option<String>, deleted_by: Option<models::NullableSimpleUser>) -> ProjectsV2 {
        ProjectsV2 {
            id,
            node_id,
            owner: Box::new(owner),
            creator: Box::new(creator),
            title,
            description,
            public,
            closed_at,
            created_at,
            updated_at,
            number,
            short_description,
            deleted_at,
            deleted_by: deleted_by.map(Box::new),
        }
    }
}