openapi_github/models/
webhook_fork_forkee.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/// WebhookForkForkee : The created [`repository`](https://docs.github.com/rest/repos/repos#get-a-repository) resource.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WebhookForkForkee {
17    /// Whether to allow auto-merge for pull requests.
18    #[serde(rename = "allow_auto_merge", skip_serializing_if = "Option::is_none")]
19    pub allow_auto_merge: Option<bool>,
20    #[serde(rename = "allow_forking", skip_serializing_if = "Option::is_none")]
21    pub allow_forking: Option<bool>,
22    /// Whether to allow merge commits for pull requests.
23    #[serde(rename = "allow_merge_commit", skip_serializing_if = "Option::is_none")]
24    pub allow_merge_commit: Option<bool>,
25    /// Whether to allow rebase merges for pull requests.
26    #[serde(rename = "allow_rebase_merge", skip_serializing_if = "Option::is_none")]
27    pub allow_rebase_merge: Option<bool>,
28    /// Whether to allow squash merges for pull requests.
29    #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")]
30    pub allow_squash_merge: Option<bool>,
31    #[serde(rename = "allow_update_branch", skip_serializing_if = "Option::is_none")]
32    pub allow_update_branch: Option<bool>,
33    #[serde(rename = "archive_url")]
34    pub archive_url: String,
35    #[serde(rename = "archived")]
36    pub archived: bool,
37    #[serde(rename = "assignees_url")]
38    pub assignees_url: String,
39    #[serde(rename = "blobs_url")]
40    pub blobs_url: String,
41    #[serde(rename = "branches_url")]
42    pub branches_url: String,
43    #[serde(rename = "clone_url")]
44    pub clone_url: String,
45    #[serde(rename = "collaborators_url")]
46    pub collaborators_url: String,
47    #[serde(rename = "comments_url")]
48    pub comments_url: String,
49    #[serde(rename = "commits_url")]
50    pub commits_url: String,
51    #[serde(rename = "compare_url")]
52    pub compare_url: String,
53    #[serde(rename = "contents_url")]
54    pub contents_url: String,
55    #[serde(rename = "contributors_url")]
56    pub contributors_url: String,
57    #[serde(rename = "created_at")]
58    pub created_at: String,
59    /// The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.
60    #[serde(rename = "custom_properties", skip_serializing_if = "Option::is_none")]
61    pub custom_properties: Option<std::collections::HashMap<String, serde_json::Value>>,
62    #[serde(rename = "default_branch")]
63    pub default_branch: String,
64    /// Whether to delete head branches when pull requests are merged
65    #[serde(rename = "delete_branch_on_merge", skip_serializing_if = "Option::is_none")]
66    pub delete_branch_on_merge: Option<bool>,
67    #[serde(rename = "deployments_url")]
68    pub deployments_url: String,
69    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
70    pub description: Option<String>,
71    #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
72    pub disabled: Option<bool>,
73    #[serde(rename = "downloads_url")]
74    pub downloads_url: String,
75    #[serde(rename = "events_url")]
76    pub events_url: String,
77    #[serde(rename = "fork")]
78    pub fork: bool,
79    #[serde(rename = "forks")]
80    pub forks: i32,
81    #[serde(rename = "forks_count")]
82    pub forks_count: i32,
83    #[serde(rename = "forks_url")]
84    pub forks_url: String,
85    #[serde(rename = "full_name")]
86    pub full_name: String,
87    #[serde(rename = "git_commits_url")]
88    pub git_commits_url: String,
89    #[serde(rename = "git_refs_url")]
90    pub git_refs_url: String,
91    #[serde(rename = "git_tags_url")]
92    pub git_tags_url: String,
93    #[serde(rename = "git_url")]
94    pub git_url: String,
95    #[serde(rename = "has_downloads")]
96    pub has_downloads: bool,
97    #[serde(rename = "has_issues")]
98    pub has_issues: bool,
99    #[serde(rename = "has_pages")]
100    pub has_pages: bool,
101    #[serde(rename = "has_projects")]
102    pub has_projects: bool,
103    #[serde(rename = "has_wiki")]
104    pub has_wiki: bool,
105    #[serde(rename = "homepage", deserialize_with = "Option::deserialize")]
106    pub homepage: Option<String>,
107    #[serde(rename = "hooks_url")]
108    pub hooks_url: String,
109    #[serde(rename = "html_url")]
110    pub html_url: String,
111    #[serde(rename = "id")]
112    pub id: i32,
113    #[serde(rename = "is_template", skip_serializing_if = "Option::is_none")]
114    pub is_template: Option<bool>,
115    #[serde(rename = "issue_comment_url")]
116    pub issue_comment_url: String,
117    #[serde(rename = "issue_events_url")]
118    pub issue_events_url: String,
119    #[serde(rename = "issues_url")]
120    pub issues_url: String,
121    #[serde(rename = "keys_url")]
122    pub keys_url: String,
123    #[serde(rename = "labels_url")]
124    pub labels_url: String,
125    #[serde(rename = "language", deserialize_with = "Option::deserialize")]
126    pub language: Option<serde_json::Value>,
127    #[serde(rename = "languages_url")]
128    pub languages_url: String,
129    #[serde(rename = "license", deserialize_with = "Option::deserialize")]
130    pub license: Option<serde_json::Value>,
131    #[serde(rename = "master_branch", skip_serializing_if = "Option::is_none")]
132    pub master_branch: Option<String>,
133    #[serde(rename = "merges_url")]
134    pub merges_url: String,
135    #[serde(rename = "milestones_url")]
136    pub milestones_url: String,
137    #[serde(rename = "mirror_url", deserialize_with = "Option::deserialize")]
138    pub mirror_url: Option<serde_json::Value>,
139    #[serde(rename = "name")]
140    pub name: String,
141    #[serde(rename = "node_id")]
142    pub node_id: String,
143    #[serde(rename = "notifications_url")]
144    pub notifications_url: String,
145    #[serde(rename = "open_issues")]
146    pub open_issues: i32,
147    #[serde(rename = "open_issues_count")]
148    pub open_issues_count: i32,
149    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
150    pub organization: Option<String>,
151    #[serde(rename = "owner")]
152    pub owner: Box<models::WebhooksSponsorshipMaintainer>,
153    #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
154    pub permissions: Option<Box<models::RepositoryPermissions>>,
155    #[serde(rename = "private")]
156    pub private: bool,
157    #[serde(rename = "public", skip_serializing_if = "Option::is_none")]
158    pub public: Option<bool>,
159    #[serde(rename = "pulls_url")]
160    pub pulls_url: String,
161    #[serde(rename = "pushed_at")]
162    pub pushed_at: String,
163    #[serde(rename = "releases_url")]
164    pub releases_url: String,
165    #[serde(rename = "role_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
166    pub role_name: Option<Option<String>>,
167    #[serde(rename = "size")]
168    pub size: i32,
169    #[serde(rename = "ssh_url")]
170    pub ssh_url: String,
171    #[serde(rename = "stargazers", skip_serializing_if = "Option::is_none")]
172    pub stargazers: Option<i32>,
173    #[serde(rename = "stargazers_count")]
174    pub stargazers_count: i32,
175    #[serde(rename = "stargazers_url")]
176    pub stargazers_url: String,
177    #[serde(rename = "statuses_url")]
178    pub statuses_url: String,
179    #[serde(rename = "subscribers_url")]
180    pub subscribers_url: String,
181    #[serde(rename = "subscription_url")]
182    pub subscription_url: String,
183    #[serde(rename = "svn_url")]
184    pub svn_url: String,
185    #[serde(rename = "tags_url")]
186    pub tags_url: String,
187    #[serde(rename = "teams_url")]
188    pub teams_url: String,
189    #[serde(rename = "topics")]
190    pub topics: Vec<serde_json::Value>,
191    #[serde(rename = "trees_url")]
192    pub trees_url: String,
193    #[serde(rename = "updated_at")]
194    pub updated_at: String,
195    #[serde(rename = "url")]
196    pub url: String,
197    #[serde(rename = "visibility")]
198    pub visibility: String,
199    #[serde(rename = "watchers")]
200    pub watchers: i32,
201    #[serde(rename = "watchers_count")]
202    pub watchers_count: i32,
203    /// Whether to require contributors to sign off on web-based commits
204    #[serde(rename = "web_commit_signoff_required", skip_serializing_if = "Option::is_none")]
205    pub web_commit_signoff_required: Option<bool>,
206}
207
208impl WebhookForkForkee {
209    /// The created [`repository`](https://docs.github.com/rest/repos/repos#get-a-repository) resource.
210    pub fn new(archive_url: String, archived: bool, assignees_url: String, blobs_url: String, branches_url: String, clone_url: String, collaborators_url: String, comments_url: String, commits_url: String, compare_url: String, contents_url: String, contributors_url: String, created_at: String, default_branch: String, deployments_url: String, description: Option<String>, downloads_url: String, events_url: String, fork: bool, forks: i32, forks_count: i32, forks_url: String, full_name: String, git_commits_url: String, git_refs_url: String, git_tags_url: String, git_url: String, has_downloads: bool, has_issues: bool, has_pages: bool, has_projects: bool, has_wiki: bool, homepage: Option<String>, hooks_url: String, html_url: String, id: i32, issue_comment_url: String, issue_events_url: String, issues_url: String, keys_url: String, labels_url: String, language: Option<serde_json::Value>, languages_url: String, license: Option<serde_json::Value>, merges_url: String, milestones_url: String, mirror_url: Option<serde_json::Value>, name: String, node_id: String, notifications_url: String, open_issues: i32, open_issues_count: i32, owner: models::WebhooksSponsorshipMaintainer, private: bool, pulls_url: String, pushed_at: String, releases_url: String, size: i32, ssh_url: String, stargazers_count: i32, stargazers_url: String, statuses_url: String, subscribers_url: String, subscription_url: String, svn_url: String, tags_url: String, teams_url: String, topics: Vec<serde_json::Value>, trees_url: String, updated_at: String, url: String, visibility: String, watchers: i32, watchers_count: i32) -> WebhookForkForkee {
211        WebhookForkForkee {
212            allow_auto_merge: None,
213            allow_forking: None,
214            allow_merge_commit: None,
215            allow_rebase_merge: None,
216            allow_squash_merge: None,
217            allow_update_branch: None,
218            archive_url,
219            archived,
220            assignees_url,
221            blobs_url,
222            branches_url,
223            clone_url,
224            collaborators_url,
225            comments_url,
226            commits_url,
227            compare_url,
228            contents_url,
229            contributors_url,
230            created_at,
231            custom_properties: None,
232            default_branch,
233            delete_branch_on_merge: None,
234            deployments_url,
235            description,
236            disabled: None,
237            downloads_url,
238            events_url,
239            fork,
240            forks,
241            forks_count,
242            forks_url,
243            full_name,
244            git_commits_url,
245            git_refs_url,
246            git_tags_url,
247            git_url,
248            has_downloads,
249            has_issues,
250            has_pages,
251            has_projects,
252            has_wiki,
253            homepage,
254            hooks_url,
255            html_url,
256            id,
257            is_template: None,
258            issue_comment_url,
259            issue_events_url,
260            issues_url,
261            keys_url,
262            labels_url,
263            language,
264            languages_url,
265            license,
266            master_branch: None,
267            merges_url,
268            milestones_url,
269            mirror_url,
270            name,
271            node_id,
272            notifications_url,
273            open_issues,
274            open_issues_count,
275            organization: None,
276            owner: Box::new(owner),
277            permissions: None,
278            private,
279            public: None,
280            pulls_url,
281            pushed_at,
282            releases_url,
283            role_name: None,
284            size,
285            ssh_url,
286            stargazers: None,
287            stargazers_count,
288            stargazers_url,
289            statuses_url,
290            subscribers_url,
291            subscription_url,
292            svn_url,
293            tags_url,
294            teams_url,
295            topics,
296            trees_url,
297            updated_at,
298            url,
299            visibility,
300            watchers,
301            watchers_count,
302            web_commit_signoff_required: None,
303        }
304    }
305}
306