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 ProjectsUpdateRequest {
    /// Name of the project
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Body of the project
    #[serde(rename = "body", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub body: Option<Option<String>>,
    /// State of the project; either 'open' or 'closed'
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<String>,
    /// The baseline permission that all organization members have on this project
    #[serde(rename = "organization_permission", skip_serializing_if = "Option::is_none")]
    pub organization_permission: Option<OrganizationPermission>,
    /// Whether or not this project can be seen by everyone.
    #[serde(rename = "private", skip_serializing_if = "Option::is_none")]
    pub private: Option<bool>,
}

impl ProjectsUpdateRequest {
    pub fn new() -> ProjectsUpdateRequest {
        ProjectsUpdateRequest {
            name: None,
            body: None,
            state: None,
            organization_permission: None,
            private: None,
        }
    }
}
/// The baseline permission that all organization members have on this project
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OrganizationPermission {
    #[serde(rename = "read")]
    Read,
    #[serde(rename = "write")]
    Write,
    #[serde(rename = "admin")]
    Admin,
    #[serde(rename = "none")]
    None,
}

impl Default for OrganizationPermission {
    fn default() -> OrganizationPermission {
        Self::Read
    }
}