openapi_github/models/
branch_restriction_policy.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/// BranchRestrictionPolicy : Branch Restriction Policy
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BranchRestrictionPolicy {
17    #[serde(rename = "url")]
18    pub url: String,
19    #[serde(rename = "users_url")]
20    pub users_url: String,
21    #[serde(rename = "teams_url")]
22    pub teams_url: String,
23    #[serde(rename = "apps_url")]
24    pub apps_url: String,
25    #[serde(rename = "users")]
26    pub users: Vec<models::BranchRestrictionPolicyUsersInner>,
27    #[serde(rename = "teams")]
28    pub teams: Vec<models::BranchRestrictionPolicyTeamsInner>,
29    #[serde(rename = "apps")]
30    pub apps: Vec<models::BranchRestrictionPolicyAppsInner>,
31}
32
33impl BranchRestrictionPolicy {
34    /// Branch Restriction Policy
35    pub fn new(url: String, users_url: String, teams_url: String, apps_url: String, users: Vec<models::BranchRestrictionPolicyUsersInner>, teams: Vec<models::BranchRestrictionPolicyTeamsInner>, apps: Vec<models::BranchRestrictionPolicyAppsInner>) -> BranchRestrictionPolicy {
36        BranchRestrictionPolicy {
37            url,
38            users_url,
39            teams_url,
40            apps_url,
41            users,
42            teams,
43            apps,
44        }
45    }
46}
47