openapi_github/models/
team_parent.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 TeamParent {
16    /// Description of the team
17    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
18    pub description: Option<String>,
19    #[serde(rename = "html_url")]
20    pub html_url: String,
21    /// Unique identifier of the team
22    #[serde(rename = "id")]
23    pub id: i32,
24    #[serde(rename = "members_url")]
25    pub members_url: String,
26    /// Name of the team
27    #[serde(rename = "name")]
28    pub name: String,
29    #[serde(rename = "node_id")]
30    pub node_id: String,
31    /// Permission that the team will have for its repositories
32    #[serde(rename = "permission")]
33    pub permission: String,
34    #[serde(rename = "privacy")]
35    pub privacy: Privacy,
36    #[serde(rename = "repositories_url")]
37    pub repositories_url: String,
38    #[serde(rename = "slug")]
39    pub slug: String,
40    /// URL for the team
41    #[serde(rename = "url")]
42    pub url: String,
43}
44
45impl TeamParent {
46    pub fn new(description: Option<String>, html_url: String, id: i32, members_url: String, name: String, node_id: String, permission: String, privacy: Privacy, repositories_url: String, slug: String, url: String) -> TeamParent {
47        TeamParent {
48            description,
49            html_url,
50            id,
51            members_url,
52            name,
53            node_id,
54            permission,
55            privacy,
56            repositories_url,
57            slug,
58            url,
59        }
60    }
61}
62/// 
63#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
64pub enum Privacy {
65    #[serde(rename = "open")]
66    Open,
67    #[serde(rename = "closed")]
68    Closed,
69    #[serde(rename = "secret")]
70    Secret,
71}
72
73impl Default for Privacy {
74    fn default() -> Privacy {
75        Self::Open
76    }
77}
78