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

/// TeamProject : A team's access to a project.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TeamProject {
    #[serde(rename = "owner_url")]
    pub owner_url: String,
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "html_url")]
    pub html_url: String,
    #[serde(rename = "columns_url")]
    pub columns_url: String,
    #[serde(rename = "id")]
    pub id: i32,
    #[serde(rename = "node_id")]
    pub node_id: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "body", deserialize_with = "Option::deserialize")]
    pub body: Option<String>,
    #[serde(rename = "number")]
    pub number: i32,
    #[serde(rename = "state")]
    pub state: String,
    #[serde(rename = "creator")]
    pub creator: Box<models::SimpleUser>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    /// The organization permission for this project. Only present when owner is an organization.
    #[serde(rename = "organization_permission", skip_serializing_if = "Option::is_none")]
    pub organization_permission: Option<String>,
    /// Whether the project is private or not. Only present when owner is an organization.
    #[serde(rename = "private", skip_serializing_if = "Option::is_none")]
    pub private: Option<bool>,
    #[serde(rename = "permissions")]
    pub permissions: Box<models::TeamProjectPermissions>,
}

impl TeamProject {
    /// A team's access to a project.
    pub fn new(owner_url: String, url: String, html_url: String, columns_url: String, id: i32, node_id: String, name: String, body: Option<String>, number: i32, state: String, creator: models::SimpleUser, created_at: String, updated_at: String, permissions: models::TeamProjectPermissions) -> TeamProject {
        TeamProject {
            owner_url,
            url,
            html_url,
            columns_url,
            id,
            node_id,
            name,
            body,
            number,
            state,
            creator: Box::new(creator),
            created_at,
            updated_at,
            organization_permission: None,
            private: None,
            permissions: Box::new(permissions),
        }
    }
}