openapi_github/models/
nullable_team_simple.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/// NullableTeamSimple : Groups of organization members that gives permissions on specified repositories.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct NullableTeamSimple {
17    /// Unique identifier of the team
18    #[serde(rename = "id")]
19    pub id: i32,
20    #[serde(rename = "node_id")]
21    pub node_id: String,
22    /// URL for the team
23    #[serde(rename = "url")]
24    pub url: String,
25    #[serde(rename = "members_url")]
26    pub members_url: String,
27    /// Name of the team
28    #[serde(rename = "name")]
29    pub name: String,
30    /// Description of the team
31    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
32    pub description: Option<String>,
33    /// Permission that the team will have for its repositories
34    #[serde(rename = "permission")]
35    pub permission: String,
36    /// The level of privacy this team should have
37    #[serde(rename = "privacy", skip_serializing_if = "Option::is_none")]
38    pub privacy: Option<String>,
39    /// The notification setting the team has set
40    #[serde(rename = "notification_setting", skip_serializing_if = "Option::is_none")]
41    pub notification_setting: Option<String>,
42    #[serde(rename = "html_url")]
43    pub html_url: String,
44    #[serde(rename = "repositories_url")]
45    pub repositories_url: String,
46    #[serde(rename = "slug")]
47    pub slug: String,
48    /// Distinguished Name (DN) that team maps to within LDAP environment
49    #[serde(rename = "ldap_dn", skip_serializing_if = "Option::is_none")]
50    pub ldap_dn: Option<String>,
51}
52
53impl NullableTeamSimple {
54    /// Groups of organization members that gives permissions on specified repositories.
55    pub fn new(id: i32, node_id: String, url: String, members_url: String, name: String, description: Option<String>, permission: String, html_url: String, repositories_url: String, slug: String) -> NullableTeamSimple {
56        NullableTeamSimple {
57            id,
58            node_id,
59            url,
60            members_url,
61            name,
62            description,
63            permission,
64            privacy: None,
65            notification_setting: None,
66            html_url,
67            repositories_url,
68            slug,
69            ldap_dn: None,
70        }
71    }
72}
73