openapi_github/models/
collaborator_permissions.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 CollaboratorPermissions {
16    #[serde(rename = "pull")]
17    pub pull: bool,
18    #[serde(rename = "triage", skip_serializing_if = "Option::is_none")]
19    pub triage: Option<bool>,
20    #[serde(rename = "push")]
21    pub push: bool,
22    #[serde(rename = "maintain", skip_serializing_if = "Option::is_none")]
23    pub maintain: Option<bool>,
24    #[serde(rename = "admin")]
25    pub admin: bool,
26}
27
28impl CollaboratorPermissions {
29    pub fn new(pull: bool, push: bool, admin: bool) -> CollaboratorPermissions {
30        CollaboratorPermissions {
31            pull,
32            triage: None,
33            push,
34            maintain: None,
35            admin,
36        }
37    }
38}
39