openapi_github/models/
projects_update_request.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ProjectsUpdateRequest {
16    /// Name of the project
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// Body of the project
20    #[serde(rename = "body", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub body: Option<Option<String>>,
22    /// State of the project; either 'open' or 'closed'
23    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
24    pub state: Option<String>,
25    /// The baseline permission that all organization members have on this project
26    #[serde(rename = "organization_permission", skip_serializing_if = "Option::is_none")]
27    pub organization_permission: Option<OrganizationPermission>,
28    /// Whether or not this project can be seen by everyone.
29    #[serde(rename = "private", skip_serializing_if = "Option::is_none")]
30    pub private: Option<bool>,
31}
32
33impl ProjectsUpdateRequest {
34    pub fn new() -> ProjectsUpdateRequest {
35        ProjectsUpdateRequest {
36            name: None,
37            body: None,
38            state: None,
39            organization_permission: None,
40            private: None,
41        }
42    }
43}
44/// The baseline permission that all organization members have on this project
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum OrganizationPermission {
47    #[serde(rename = "read")]
48    Read,
49    #[serde(rename = "write")]
50    Write,
51    #[serde(rename = "admin")]
52    Admin,
53    #[serde(rename = "none")]
54    None,
55}
56
57impl Default for OrganizationPermission {
58    fn default() -> OrganizationPermission {
59        Self::Read
60    }
61}
62