Skip to main content

forgejo_api/generated/
methods.rs

1use super::structs::*;
2use crate::generated::endpoints;
3use crate::Endpoint;
4use crate::Request;
5use bytes::Bytes;
6use std::collections::BTreeMap;
7
8impl crate::Forgejo {
9    /// Get a workflow run associated with a token
10    pub fn get_actions_run(&self) -> Request<'_, endpoints::GetActionsRun, ActionRun> {
11        endpoints::GetActionsRun {}
12            .make_request()
13            .wrap::<_, _>(self)
14    }
15
16    /// Returns the instance's Actor
17    pub fn activitypub_instance_actor(
18        &self,
19    ) -> Request<'_, endpoints::ActivitypubInstanceActor, ActivityPub> {
20        endpoints::ActivitypubInstanceActor {}
21            .make_request()
22            .wrap::<_, _>(self)
23    }
24
25    /// Send to the inbox
26    pub fn activitypub_instance_actor_inbox(
27        &self,
28    ) -> Request<'_, endpoints::ActivitypubInstanceActorInbox, ()> {
29        endpoints::ActivitypubInstanceActorInbox {}
30            .make_request()
31            .wrap::<_, _>(self)
32    }
33
34    /// Display the outbox (always empty)
35    pub fn activitypub_instance_actor_outbox(
36        &self,
37    ) -> Request<'_, endpoints::ActivitypubInstanceActorOutbox, Bytes> {
38        endpoints::ActivitypubInstanceActorOutbox {}
39            .make_request()
40            .wrap::<_, _>(self)
41    }
42
43    /// Returns the Repository actor for a repo
44    ///
45    /// - `repository-id`: repository ID of the repo
46    pub fn activitypub_repository(
47        &self,
48        repository_id: i64,
49    ) -> Request<'_, endpoints::ActivitypubRepository, ActivityPub> {
50        endpoints::ActivitypubRepository { repository_id }
51            .make_request()
52            .wrap::<_, _>(self)
53    }
54
55    /// Send to the inbox
56    ///
57    /// - `repository-id`: repository ID of the repo
58    /// - `body`: See [`ForgeLike`]
59    pub fn activitypub_repository_inbox(
60        &self,
61        repository_id: i64,
62        body: ForgeLike,
63    ) -> Request<'_, endpoints::ActivitypubRepositoryInbox, ()> {
64        endpoints::ActivitypubRepositoryInbox {
65            repository_id,
66            body: body,
67        }
68        .make_request()
69        .wrap::<_, _>(self)
70    }
71
72    /// Display the outbox
73    ///
74    /// - `repository-id`: repository ID of the repo
75    pub fn activitypub_repository_outbox(
76        &self,
77        repository_id: i64,
78    ) -> Request<'_, endpoints::ActivitypubRepositoryOutbox, Bytes> {
79        endpoints::ActivitypubRepositoryOutbox { repository_id }
80            .make_request()
81            .wrap::<_, _>(self)
82    }
83
84    /// Returns the Person actor for a user
85    ///
86    /// - `user-id`: user ID of the user
87    pub fn activitypub_person(
88        &self,
89        user_id: i64,
90    ) -> Request<'_, endpoints::ActivitypubPerson, ActivityPub> {
91        endpoints::ActivitypubPerson { user_id }
92            .make_request()
93            .wrap::<_, _>(self)
94    }
95
96    /// Get a specific activity object of the user
97    ///
98    /// - `user-id`: user ID of the user
99    /// - `activity-id`: activity ID of the sought activity
100    pub fn activitypub_person_activity_note(
101        &self,
102        user_id: u32,
103        activity_id: u32,
104    ) -> Request<'_, endpoints::ActivitypubPersonActivityNote, ActivityPub> {
105        endpoints::ActivitypubPersonActivityNote {
106            user_id,
107            activity_id,
108        }
109        .make_request()
110        .wrap::<_, _>(self)
111    }
112
113    /// Get a specific activity of the user
114    ///
115    /// - `user-id`: user ID of the user
116    /// - `activity-id`: activity ID of the sought activity
117    pub fn activitypub_person_activity(
118        &self,
119        user_id: u32,
120        activity_id: u32,
121    ) -> Request<'_, endpoints::ActivitypubPersonActivity, ActivityPub> {
122        endpoints::ActivitypubPersonActivity {
123            user_id,
124            activity_id,
125        }
126        .make_request()
127        .wrap::<_, _>(self)
128    }
129
130    /// Send to the inbox
131    ///
132    /// - `user-id`: user ID of the user
133    pub fn activitypub_person_inbox(
134        &self,
135        user_id: i64,
136    ) -> Request<'_, endpoints::ActivitypubPersonInbox, ()> {
137        endpoints::ActivitypubPersonInbox { user_id }
138            .make_request()
139            .wrap::<_, _>(self)
140    }
141
142    /// List the user's recorded activity
143    ///
144    /// - `user-id`: user ID of the user
145    pub fn activitypub_person_feed(
146        &self,
147        user_id: u32,
148    ) -> Request<'_, endpoints::ActivitypubPersonFeed, ForgeOutbox> {
149        endpoints::ActivitypubPersonFeed { user_id }
150            .make_request()
151            .wrap::<_, _>(self)
152    }
153
154    /// Get all runners, no matter whether they are global runners or scoped to an organization, user, or repository
155    ///
156    pub fn get_admin_runners(
157        &self,
158        query: GetAdminRunnersQuery,
159    ) -> Request<'_, endpoints::GetAdminRunners, (ActionRunnerListHeaders, Vec<ActionRunner>)> {
160        endpoints::GetAdminRunners { query }
161            .make_request()
162            .wrap::<_, _>(self)
163    }
164
165    /// Register a new global runner
166    ///
167    /// - `body`: See [`RegisterRunnerOptions`]
168    pub fn register_admin_runner(
169        &self,
170        body: RegisterRunnerOptions,
171    ) -> Request<'_, endpoints::RegisterAdminRunner, RegisterRunnerResponse> {
172        endpoints::RegisterAdminRunner { body: body }
173            .make_request()
174            .wrap::<_, _>(self)
175    }
176
177    /// Get action run jobs
178    ///
179    pub fn admin_get_action_run_jobs(
180        &self,
181        query: AdminGetActionRunJobsQuery,
182    ) -> Request<'_, endpoints::AdminGetActionRunJobs, Vec<ActionRunJob>> {
183        endpoints::AdminGetActionRunJobs { query }
184            .make_request()
185            .wrap::<_, _>(self)
186    }
187
188    /// Get a runner registration token for registering global runners
189    pub fn admin_get_runner_registration_token(
190        &self,
191    ) -> Request<'_, endpoints::AdminGetRunnerRegistrationToken, RegistrationToken> {
192        endpoints::AdminGetRunnerRegistrationToken {}
193            .make_request()
194            .wrap::<_, _>(self)
195    }
196
197    /// Get a particular runner, no matter whether it is a global runner or scoped to an organization, user, or repository
198    ///
199    /// - `runner_id`: ID of the runner
200    pub fn get_admin_runner(
201        &self,
202        runner_id: &str,
203    ) -> Request<'_, endpoints::GetAdminRunner<'_>, ActionRunner> {
204        endpoints::GetAdminRunner { runner_id }
205            .make_request()
206            .wrap::<_, _>(self)
207    }
208
209    /// Delete a particular runner, no matter whether it is a global runner or scoped to an organization, user, or repository
210    ///
211    /// - `runner_id`: ID of the runner
212    pub fn delete_admin_runner(
213        &self,
214        runner_id: &str,
215    ) -> Request<'_, endpoints::DeleteAdminRunner<'_>, ()> {
216        endpoints::DeleteAdminRunner { runner_id }
217            .make_request()
218            .wrap::<_, _>(self)
219    }
220
221    /// List cron tasks
222    ///
223    pub fn admin_cron_list(
224        &self,
225    ) -> Request<'_, endpoints::AdminCronList, (CronListHeaders, Vec<Cron>)> {
226        endpoints::AdminCronList {}
227            .make_request()
228            .wrap::<_, _>(self)
229    }
230
231    /// Run cron task
232    ///
233    /// - `task`: task to run
234    pub fn admin_cron_run(&self, task: &str) -> Request<'_, endpoints::AdminCronRun<'_>, ()> {
235        endpoints::AdminCronRun { task }
236            .make_request()
237            .wrap::<_, _>(self)
238    }
239
240    /// List all users' email addresses
241    ///
242    pub fn admin_get_all_emails(&self) -> Request<'_, endpoints::AdminGetAllEmails, Vec<Email>> {
243        endpoints::AdminGetAllEmails {}
244            .make_request()
245            .wrap::<_, _>(self)
246    }
247
248    /// Search users' email addresses
249    ///
250    pub fn admin_search_emails(
251        &self,
252        query: AdminSearchEmailsQuery,
253    ) -> Request<'_, endpoints::AdminSearchEmails, Vec<Email>> {
254        endpoints::AdminSearchEmails { query }
255            .make_request()
256            .wrap::<_, _>(self)
257    }
258
259    /// List global (system) webhooks
260    ///
261    pub fn admin_list_hooks(&self) -> Request<'_, endpoints::AdminListHooks, Vec<Hook>> {
262        endpoints::AdminListHooks {}
263            .make_request()
264            .wrap::<_, _>(self)
265    }
266
267    /// Create a hook
268    ///
269    /// - `body`: See [`CreateHookOption`]
270    pub fn admin_create_hook(
271        &self,
272        body: CreateHookOption,
273    ) -> Request<'_, endpoints::AdminCreateHook, Hook> {
274        endpoints::AdminCreateHook { body: body }
275            .make_request()
276            .wrap::<_, _>(self)
277    }
278
279    /// Get a hook
280    ///
281    /// - `id`: id of the hook to get
282    pub fn admin_get_hook(&self, id: i64) -> Request<'_, endpoints::AdminGetHook, Hook> {
283        endpoints::AdminGetHook { id }
284            .make_request()
285            .wrap::<_, _>(self)
286    }
287
288    /// Delete a hook
289    ///
290    /// - `id`: id of the hook to delete
291    pub fn admin_delete_hook(&self, id: i64) -> Request<'_, endpoints::AdminDeleteHook, ()> {
292        endpoints::AdminDeleteHook { id }
293            .make_request()
294            .wrap::<_, _>(self)
295    }
296
297    /// Update a hook
298    ///
299    /// - `id`: id of the hook to update
300    /// - `body`: See [`EditHookOption`]
301    pub fn admin_edit_hook(
302        &self,
303        id: i64,
304        body: EditHookOption,
305    ) -> Request<'_, endpoints::AdminEditHook, Hook> {
306        endpoints::AdminEditHook { id, body: body }
307            .make_request()
308            .wrap::<_, _>(self)
309    }
310
311    /// List all organizations
312    ///
313    pub fn admin_get_all_orgs(
314        &self,
315    ) -> Request<'_, endpoints::AdminGetAllOrgs, (OrganizationListHeaders, Vec<Organization>)> {
316        endpoints::AdminGetAllOrgs {}
317            .make_request()
318            .wrap::<_, _>(self)
319    }
320
321    /// List the available quota groups
322    pub fn admin_list_quota_groups(
323        &self,
324    ) -> Request<'_, endpoints::AdminListQuotaGroups, Vec<QuotaGroup>> {
325        endpoints::AdminListQuotaGroups {}
326            .make_request()
327            .wrap::<_, _>(self)
328    }
329
330    /// Create a new quota group
331    ///
332    /// - `group`: Definition of the quota group
333
334    ///   See [`CreateQuotaGroupOptions`]
335    pub fn admin_create_quota_group(
336        &self,
337        group: CreateQuotaGroupOptions,
338    ) -> Request<'_, endpoints::AdminCreateQuotaGroup, QuotaGroup> {
339        endpoints::AdminCreateQuotaGroup { body: group }
340            .make_request()
341            .wrap::<_, _>(self)
342    }
343
344    /// Get information about the quota group
345    ///
346    /// - `quotagroup`: quota group to query
347    pub fn admin_get_quota_group(
348        &self,
349        quotagroup: &str,
350    ) -> Request<'_, endpoints::AdminGetQuotaGroup<'_>, QuotaGroup> {
351        endpoints::AdminGetQuotaGroup { quotagroup }
352            .make_request()
353            .wrap::<_, _>(self)
354    }
355
356    /// Delete a quota group
357    ///
358    /// - `quotagroup`: quota group to delete
359    pub fn admin_delete_quota_group(
360        &self,
361        quotagroup: &str,
362    ) -> Request<'_, endpoints::AdminDeleteQuotaGroup<'_>, ()> {
363        endpoints::AdminDeleteQuotaGroup { quotagroup }
364            .make_request()
365            .wrap::<_, _>(self)
366    }
367
368    /// Adds a rule to a quota group
369    ///
370    /// - `quotagroup`: quota group to add a rule to
371    /// - `quotarule`: the name of the quota rule to add to the group
372    pub fn admin_add_rule_to_quota_group(
373        &self,
374        quotagroup: &str,
375        quotarule: &str,
376    ) -> Request<'_, endpoints::AdminAddRuleToQuotaGroup<'_>, ()> {
377        endpoints::AdminAddRuleToQuotaGroup {
378            quotagroup,
379            quotarule,
380        }
381        .make_request()
382        .wrap::<_, _>(self)
383    }
384
385    /// Removes a rule from a quota group
386    ///
387    /// - `quotagroup`: quota group to remove a rule from
388    /// - `quotarule`: the name of the quota rule to remove from the group
389    pub fn admin_remove_rule_from_quota_group(
390        &self,
391        quotagroup: &str,
392        quotarule: &str,
393    ) -> Request<'_, endpoints::AdminRemoveRuleFromQuotaGroup<'_>, ()> {
394        endpoints::AdminRemoveRuleFromQuotaGroup {
395            quotagroup,
396            quotarule,
397        }
398        .make_request()
399        .wrap::<_, _>(self)
400    }
401
402    /// List users in a quota group
403    ///
404    /// - `quotagroup`: quota group to list members of
405    pub fn admin_list_users_in_quota_group(
406        &self,
407        quotagroup: &str,
408    ) -> Request<'_, endpoints::AdminListUsersInQuotaGroup<'_>, (UserListHeaders, Vec<User>)> {
409        endpoints::AdminListUsersInQuotaGroup { quotagroup }
410            .make_request()
411            .wrap::<_, _>(self)
412    }
413
414    /// Add a user to a quota group
415    ///
416    /// - `quotagroup`: quota group to add the user to
417    /// - `username`: username of the user to add to the quota group
418    pub fn admin_add_user_to_quota_group(
419        &self,
420        quotagroup: &str,
421        username: &str,
422    ) -> Request<'_, endpoints::AdminAddUserToQuotaGroup<'_>, ()> {
423        endpoints::AdminAddUserToQuotaGroup {
424            quotagroup,
425            username,
426        }
427        .make_request()
428        .wrap::<_, _>(self)
429    }
430
431    /// Remove a user from a quota group
432    ///
433    /// - `quotagroup`: quota group to remove a user from
434    /// - `username`: username of the user to remove from the quota group
435    pub fn admin_remove_user_from_quota_group(
436        &self,
437        quotagroup: &str,
438        username: &str,
439    ) -> Request<'_, endpoints::AdminRemoveUserFromQuotaGroup<'_>, ()> {
440        endpoints::AdminRemoveUserFromQuotaGroup {
441            quotagroup,
442            username,
443        }
444        .make_request()
445        .wrap::<_, _>(self)
446    }
447
448    /// List the available quota rules
449    pub fn admin_list_quota_rules(
450        &self,
451    ) -> Request<'_, endpoints::AdminListQuotaRules, Vec<QuotaRuleInfo>> {
452        endpoints::AdminListQuotaRules {}
453            .make_request()
454            .wrap::<_, _>(self)
455    }
456
457    /// Create a new quota rule
458    ///
459    /// - `rule`: Definition of the quota rule
460
461    ///   See [`CreateQuotaRuleOptions`]
462    pub fn admin_create_quota_rule(
463        &self,
464        rule: CreateQuotaRuleOptions,
465    ) -> Request<'_, endpoints::AdminCreateQuotaRule, QuotaRuleInfo> {
466        endpoints::AdminCreateQuotaRule { body: rule }
467            .make_request()
468            .wrap::<_, _>(self)
469    }
470
471    /// Get information about a quota rule
472    ///
473    /// - `quotarule`: quota rule to query
474    pub fn admin_get_quota_rule(
475        &self,
476        quotarule: &str,
477    ) -> Request<'_, endpoints::AdminGetQuotaRule<'_>, QuotaRuleInfo> {
478        endpoints::AdminGetQuotaRule { quotarule }
479            .make_request()
480            .wrap::<_, _>(self)
481    }
482
483    /// Deletes a quota rule
484    ///
485    /// - `quotarule`: quota rule to delete
486    pub fn admin_delete_quota_rule(
487        &self,
488        quotarule: &str,
489    ) -> Request<'_, endpoints::AdminDeleteQuotaRule<'_>, ()> {
490        endpoints::AdminDeleteQuotaRule { quotarule }
491            .make_request()
492            .wrap::<_, _>(self)
493    }
494
495    /// Change an existing quota rule
496    ///
497    /// - `quotarule`: Quota rule to change
498    /// - `rule`: See [`EditQuotaRuleOptions`]
499    pub fn admin_edit_quota_rule(
500        &self,
501        quotarule: &str,
502        rule: EditQuotaRuleOptions,
503    ) -> Request<'_, endpoints::AdminEditQuotaRule<'_>, QuotaRuleInfo> {
504        endpoints::AdminEditQuotaRule {
505            quotarule,
506            body: rule,
507        }
508        .make_request()
509        .wrap::<_, _>(self)
510    }
511
512    /// Search action jobs according to filter conditions
513    ///
514    pub fn admin_search_run_jobs(
515        &self,
516        query: AdminSearchRunJobsQuery,
517    ) -> Request<'_, endpoints::AdminSearchRunJobs, Vec<ActionRunJob>> {
518        endpoints::AdminSearchRunJobs { query }
519            .make_request()
520            .wrap::<_, _>(self)
521    }
522
523    /// Get a runner registration token for registering global runners
524    pub fn admin_get_registration_token(
525        &self,
526    ) -> Request<'_, endpoints::AdminGetRegistrationToken, RegistrationToken> {
527        endpoints::AdminGetRegistrationToken {}
528            .make_request()
529            .wrap::<_, _>(self)
530    }
531
532    /// List unadopted repositories
533    ///
534    pub fn admin_unadopted_list(
535        &self,
536        query: AdminUnadoptedListQuery,
537    ) -> Request<'_, endpoints::AdminUnadoptedList, Vec<String>> {
538        endpoints::AdminUnadoptedList { query }
539            .make_request()
540            .wrap::<_, _>(self)
541    }
542
543    /// Adopt unadopted files as a repository
544    ///
545    /// - `owner`: owner of the repo
546    /// - `repo`: name of the repo
547    pub fn admin_adopt_repository(
548        &self,
549        owner: &str,
550        repo: &str,
551    ) -> Request<'_, endpoints::AdminAdoptRepository<'_>, ()> {
552        endpoints::AdminAdoptRepository { owner, repo }
553            .make_request()
554            .wrap::<_, _>(self)
555    }
556
557    /// Delete unadopted files
558    ///
559    /// - `owner`: owner of the repo
560    /// - `repo`: name of the repo
561    pub fn admin_delete_unadopted_repository(
562        &self,
563        owner: &str,
564        repo: &str,
565    ) -> Request<'_, endpoints::AdminDeleteUnadoptedRepository<'_>, ()> {
566        endpoints::AdminDeleteUnadoptedRepository { owner, repo }
567            .make_request()
568            .wrap::<_, _>(self)
569    }
570
571    /// Search users according filter conditions
572    ///
573    pub fn admin_search_users(
574        &self,
575        query: AdminSearchUsersQuery,
576    ) -> Request<'_, endpoints::AdminSearchUsers, (UserListHeaders, Vec<User>)> {
577        endpoints::AdminSearchUsers { query }
578            .make_request()
579            .wrap::<_, _>(self)
580    }
581
582    /// Create a user account
583    ///
584    /// - `body`: See [`CreateUserOption`]
585    pub fn admin_create_user(
586        &self,
587        body: CreateUserOption,
588    ) -> Request<'_, endpoints::AdminCreateUser, User> {
589        endpoints::AdminCreateUser { body: body }
590            .make_request()
591            .wrap::<_, _>(self)
592    }
593
594    /// Delete user account
595    ///
596    /// - `username`: username of user to delete
597    pub fn admin_delete_user(
598        &self,
599        username: &str,
600        query: AdminDeleteUserQuery,
601    ) -> Request<'_, endpoints::AdminDeleteUser<'_>, ()> {
602        endpoints::AdminDeleteUser { username, query }
603            .make_request()
604            .wrap::<_, _>(self)
605    }
606
607    /// Edit an existing user
608    ///
609    /// - `username`: username of user to edit
610    /// - `body`: See [`EditUserOption`]
611    pub fn admin_edit_user(
612        &self,
613        username: &str,
614        body: EditUserOption,
615    ) -> Request<'_, endpoints::AdminEditUser<'_>, User> {
616        endpoints::AdminEditUser {
617            username,
618            body: body,
619        }
620        .make_request()
621        .wrap::<_, _>(self)
622    }
623
624    /// List all email addresses for a user
625    ///
626    /// - `username`: username of user to get email addresses of
627    pub fn admin_list_user_emails(
628        &self,
629        username: &str,
630    ) -> Request<'_, endpoints::AdminListUserEmails<'_>, Vec<Email>> {
631        endpoints::AdminListUserEmails { username }
632            .make_request()
633            .wrap::<_, _>(self)
634    }
635
636    /// Delete email addresses from a user's account
637    ///
638    /// - `username`: username of user to delete email addresses from
639    /// - `body`: See [`DeleteEmailOption`]
640    pub fn admin_delete_user_emails(
641        &self,
642        username: &str,
643        body: DeleteEmailOption,
644    ) -> Request<'_, endpoints::AdminDeleteUserEmails<'_>, ()> {
645        endpoints::AdminDeleteUserEmails {
646            username,
647            body: body,
648        }
649        .make_request()
650        .wrap::<_, _>(self)
651    }
652
653    /// Add an SSH public key to user's account
654    ///
655    /// - `username`: username of the user
656    /// - `key`: See [`CreateKeyOption`]
657    pub fn admin_create_public_key(
658        &self,
659        username: &str,
660        key: CreateKeyOption,
661    ) -> Request<'_, endpoints::AdminCreatePublicKey<'_>, PublicKey> {
662        endpoints::AdminCreatePublicKey {
663            username,
664            body: key,
665        }
666        .make_request()
667        .wrap::<_, _>(self)
668    }
669
670    /// Remove a public key from user's account
671    ///
672    /// - `username`: username of user
673    /// - `id`: id of the key to delete
674    pub fn admin_delete_user_public_key(
675        &self,
676        username: &str,
677        id: i64,
678    ) -> Request<'_, endpoints::AdminDeleteUserPublicKey<'_>, ()> {
679        endpoints::AdminDeleteUserPublicKey { username, id }
680            .make_request()
681            .wrap::<_, _>(self)
682    }
683
684    /// Create an organization
685    ///
686    /// - `username`: username of the user that will own the created organization
687    /// - `organization`: See [`CreateOrgOption`]
688    pub fn admin_create_org(
689        &self,
690        username: &str,
691        organization: CreateOrgOption,
692    ) -> Request<'_, endpoints::AdminCreateOrg<'_>, Organization> {
693        endpoints::AdminCreateOrg {
694            username,
695            body: organization,
696        }
697        .make_request()
698        .wrap::<_, _>(self)
699    }
700
701    /// Get the user's quota info
702    ///
703    /// - `username`: username of user to query
704    pub fn admin_get_user_quota(
705        &self,
706        username: &str,
707    ) -> Request<'_, endpoints::AdminGetUserQuota<'_>, QuotaInfo> {
708        endpoints::AdminGetUserQuota { username }
709            .make_request()
710            .wrap::<_, _>(self)
711    }
712
713    /// Set the user's quota groups to a given list.
714    ///
715    /// - `username`: username of the user to modify the quota groups from
716    /// - `groups`: list of groups that the user should be a member of
717
718    ///   See [`SetUserQuotaGroupsOptions`]
719    pub fn admin_set_user_quota_groups(
720        &self,
721        username: &str,
722        groups: SetUserQuotaGroupsOptions,
723    ) -> Request<'_, endpoints::AdminSetUserQuotaGroups<'_>, ()> {
724        endpoints::AdminSetUserQuotaGroups {
725            username,
726            body: groups,
727        }
728        .make_request()
729        .wrap::<_, _>(self)
730    }
731
732    /// Rename a user
733    ///
734    /// - `username`: existing username of user
735    /// - `body`: See [`RenameUserOption`]
736    pub fn admin_rename_user(
737        &self,
738        username: &str,
739        body: RenameUserOption,
740    ) -> Request<'_, endpoints::AdminRenameUser<'_>, ()> {
741        endpoints::AdminRenameUser {
742            username,
743            body: body,
744        }
745        .make_request()
746        .wrap::<_, _>(self)
747    }
748
749    /// Create a repository on behalf of a user
750    ///
751    /// - `username`: username of the user. This user will own the created repository
752    /// - `repository`: See [`CreateRepoOption`]
753    pub fn admin_create_repo(
754        &self,
755        username: &str,
756        repository: CreateRepoOption,
757    ) -> Request<'_, endpoints::AdminCreateRepo<'_>, Repository> {
758        endpoints::AdminCreateRepo {
759            username,
760            body: repository,
761        }
762        .make_request()
763        .wrap::<_, _>(self)
764    }
765
766    /// List the specified user's access tokens
767    ///
768    /// - `username`: username of user
769    pub fn admin_list_user_access_tokens(
770        &self,
771        username: &str,
772    ) -> Request<
773        '_,
774        endpoints::AdminListUserAccessTokens<'_>,
775        (AccessTokenListHeaders, Vec<AccessToken>),
776    > {
777        endpoints::AdminListUserAccessTokens { username }
778            .make_request()
779            .wrap::<_, _>(self)
780    }
781
782    /// Create an access token for the specified user
783    ///
784    /// - `username`: username of user
785    /// - `body`: See [`CreateAccessTokenOption`]
786    pub fn admin_create_user_access_token(
787        &self,
788        username: &str,
789        body: CreateAccessTokenOption,
790    ) -> Request<'_, endpoints::AdminCreateUserAccessToken<'_>, AccessToken> {
791        endpoints::AdminCreateUserAccessToken {
792            username,
793            body: body,
794        }
795        .make_request()
796        .wrap::<_, _>(self)
797    }
798
799    /// Delete an access token for the specified user
800    ///
801    /// - `username`: username of user
802    /// - `token`: token to be deleted, identified by ID and if not available by name
803    pub fn admin_delete_user_access_token(
804        &self,
805        username: &str,
806        token: &str,
807    ) -> Request<'_, endpoints::AdminDeleteUserAccessToken<'_>, ()> {
808        endpoints::AdminDeleteUserAccessToken { username, token }
809            .make_request()
810            .wrap::<_, _>(self)
811    }
812
813    /// Returns a list of all gitignore templates
814    pub fn list_gitignores_templates(
815        &self,
816    ) -> Request<'_, endpoints::ListGitignoresTemplates, Vec<String>> {
817        endpoints::ListGitignoresTemplates {}
818            .make_request()
819            .wrap::<_, _>(self)
820    }
821
822    /// Returns information about a gitignore template
823    ///
824    /// - `name`: name of the template
825    pub fn get_gitignore_template_info(
826        &self,
827        name: &str,
828    ) -> Request<'_, endpoints::GetGitignoreTemplateInfo<'_>, GitignoreTemplateInfo> {
829        endpoints::GetGitignoreTemplateInfo { name }
830            .make_request()
831            .wrap::<_, _>(self)
832    }
833
834    /// Returns a list of all label templates
835    pub fn list_label_templates(&self) -> Request<'_, endpoints::ListLabelTemplates, Vec<String>> {
836        endpoints::ListLabelTemplates {}
837            .make_request()
838            .wrap::<_, _>(self)
839    }
840
841    /// Returns all labels in a template
842    ///
843    /// - `name`: name of the template
844    pub fn get_label_template_info(
845        &self,
846        name: &str,
847    ) -> Request<'_, endpoints::GetLabelTemplateInfo<'_>, Vec<LabelTemplate>> {
848        endpoints::GetLabelTemplateInfo { name }
849            .make_request()
850            .wrap::<_, _>(self)
851    }
852
853    /// Returns a list of all license templates
854    pub fn list_license_templates(
855        &self,
856    ) -> Request<'_, endpoints::ListLicenseTemplates, Vec<LicensesTemplateListEntry>> {
857        endpoints::ListLicenseTemplates {}
858            .make_request()
859            .wrap::<_, _>(self)
860    }
861
862    /// Returns information about a license template
863    ///
864    /// - `name`: name of the license
865    pub fn get_license_template_info(
866        &self,
867        name: &str,
868    ) -> Request<'_, endpoints::GetLicenseTemplateInfo<'_>, LicenseTemplateInfo> {
869        endpoints::GetLicenseTemplateInfo { name }
870            .make_request()
871            .wrap::<_, _>(self)
872    }
873
874    /// Render a markdown document as HTML
875    ///
876    /// - `body`: See [`MarkdownOption`]
877    pub fn render_markdown(
878        &self,
879        body: MarkdownOption,
880    ) -> Request<'_, endpoints::RenderMarkdown, String> {
881        endpoints::RenderMarkdown { body: body }
882            .make_request()
883            .wrap::<_, _>(self)
884    }
885
886    /// Render raw markdown as HTML
887    ///
888    /// - `body`: Request body to render
889
890    ///   See [`String`]
891    pub fn render_markdown_raw(
892        &self,
893        body: String,
894    ) -> Request<'_, endpoints::RenderMarkdownRaw, String> {
895        endpoints::RenderMarkdownRaw { body: body }
896            .make_request()
897            .wrap::<_, _>(self)
898    }
899
900    /// Render a markup document as HTML
901    ///
902    /// - `body`: See [`MarkupOption`]
903    pub fn render_markup(
904        &self,
905        body: MarkupOption,
906    ) -> Request<'_, endpoints::RenderMarkup, String> {
907        endpoints::RenderMarkup { body: body }
908            .make_request()
909            .wrap::<_, _>(self)
910    }
911
912    /// Returns the nodeinfo of the Forgejo application
913    pub fn get_node_info(&self) -> Request<'_, endpoints::GetNodeInfo, NodeInfo> {
914        endpoints::GetNodeInfo {}.make_request().wrap::<_, _>(self)
915    }
916
917    /// List users's notification threads
918    ///
919    pub fn notify_get_list(
920        &self,
921        query: NotifyGetListQuery,
922    ) -> Request<
923        '_,
924        endpoints::NotifyGetList,
925        (NotificationThreadListHeaders, Vec<NotificationThread>),
926    > {
927        endpoints::NotifyGetList { query }
928            .make_request()
929            .wrap::<_, _>(self)
930    }
931
932    /// Mark notification threads as read, pinned or unread
933    ///
934    pub fn notify_read_list(
935        &self,
936        query: NotifyReadListQuery,
937    ) -> Request<'_, endpoints::NotifyReadList, Vec<NotificationThread>> {
938        endpoints::NotifyReadList { query }
939            .make_request()
940            .wrap::<_, _>(self)
941    }
942
943    /// Check if unread notifications exist
944    pub fn notify_new_available(
945        &self,
946    ) -> Request<'_, endpoints::NotifyNewAvailable, NotificationCount> {
947        endpoints::NotifyNewAvailable {}
948            .make_request()
949            .wrap::<_, _>(self)
950    }
951
952    /// Get notification thread by ID
953    ///
954    /// - `id`: id of notification thread
955    pub fn notify_get_thread(
956        &self,
957        id: i64,
958    ) -> Request<'_, endpoints::NotifyGetThread, NotificationThread> {
959        endpoints::NotifyGetThread { id }
960            .make_request()
961            .wrap::<_, _>(self)
962    }
963
964    /// Mark notification thread as read by ID
965    ///
966    /// - `id`: id of notification thread
967    pub fn notify_read_thread(
968        &self,
969        id: i64,
970        query: NotifyReadThreadQuery,
971    ) -> Request<'_, endpoints::NotifyReadThread, NotificationThread> {
972        endpoints::NotifyReadThread { id, query }
973            .make_request()
974            .wrap::<_, _>(self)
975    }
976
977    /// Create a repository in an organization
978    ///
979    /// - `org`: name of organization
980    /// - `body`: See [`CreateRepoOption`]
981    pub fn create_org_repo_deprecated(
982        &self,
983        org: &str,
984        body: CreateRepoOption,
985    ) -> Request<'_, endpoints::CreateOrgRepoDeprecated<'_>, Repository> {
986        endpoints::CreateOrgRepoDeprecated { org, body: body }
987            .make_request()
988            .wrap::<_, _>(self)
989    }
990
991    /// List all organizations
992    ///
993    pub fn org_get_all(
994        &self,
995    ) -> Request<'_, endpoints::OrgGetAll, (OrganizationListHeaders, Vec<Organization>)> {
996        endpoints::OrgGetAll {}.make_request().wrap::<_, _>(self)
997    }
998
999    /// Create an organization
1000    ///
1001    /// - `organization`: See [`CreateOrgOption`]
1002    pub fn org_create(
1003        &self,
1004        organization: CreateOrgOption,
1005    ) -> Request<'_, endpoints::OrgCreate, Organization> {
1006        endpoints::OrgCreate { body: organization }
1007            .make_request()
1008            .wrap::<_, _>(self)
1009    }
1010
1011    /// Get an organization
1012    ///
1013    /// - `org`: name of the organization to get
1014    pub fn org_get(&self, org: &str) -> Request<'_, endpoints::OrgGet<'_>, Organization> {
1015        endpoints::OrgGet { org }.make_request().wrap::<_, _>(self)
1016    }
1017
1018    /// Delete an organization
1019    ///
1020    /// - `org`: organization that is to be deleted
1021    pub fn org_delete(&self, org: &str) -> Request<'_, endpoints::OrgDelete<'_>, ()> {
1022        endpoints::OrgDelete { org }
1023            .make_request()
1024            .wrap::<_, _>(self)
1025    }
1026
1027    /// Edit an organization
1028    ///
1029    /// - `org`: name of the organization to edit
1030    /// - `body`: See [`EditOrgOption`]
1031    pub fn org_edit(
1032        &self,
1033        org: &str,
1034        body: EditOrgOption,
1035    ) -> Request<'_, endpoints::OrgEdit<'_>, Organization> {
1036        endpoints::OrgEdit { org, body: body }
1037            .make_request()
1038            .wrap::<_, _>(self)
1039    }
1040
1041    /// Get the organization's runners
1042    ///
1043    /// - `org`: name of the organization
1044    pub fn get_org_runners(
1045        &self,
1046        org: &str,
1047        query: GetOrgRunnersQuery,
1048    ) -> Request<'_, endpoints::GetOrgRunners<'_>, (ActionRunnerListHeaders, Vec<ActionRunner>)>
1049    {
1050        endpoints::GetOrgRunners { org, query }
1051            .make_request()
1052            .wrap::<_, _>(self)
1053    }
1054
1055    /// Register a new organization-level runner
1056    ///
1057    /// - `org`: name of the organization
1058    /// - `body`: See [`RegisterRunnerOptions`]
1059    pub fn register_org_runner(
1060        &self,
1061        org: &str,
1062        body: RegisterRunnerOptions,
1063    ) -> Request<'_, endpoints::RegisterOrgRunner<'_>, RegisterRunnerResponse> {
1064        endpoints::RegisterOrgRunner { org, body: body }
1065            .make_request()
1066            .wrap::<_, _>(self)
1067    }
1068
1069    /// Search for organization's action jobs according filter conditions
1070    ///
1071    /// - `org`: name of the organization
1072    pub fn org_search_run_jobs(
1073        &self,
1074        org: &str,
1075        query: OrgSearchRunJobsQuery,
1076    ) -> Request<'_, endpoints::OrgSearchRunJobs<'_>, Vec<ActionRunJob>> {
1077        endpoints::OrgSearchRunJobs { org, query }
1078            .make_request()
1079            .wrap::<_, _>(self)
1080    }
1081
1082    /// Get the organization's runner registration token
1083    ///
1084    /// - `org`: name of the organization
1085    pub fn org_get_runner_registration_token(
1086        &self,
1087        org: &str,
1088    ) -> Request<'_, endpoints::OrgGetRunnerRegistrationToken<'_>, RegistrationToken> {
1089        endpoints::OrgGetRunnerRegistrationToken { org }
1090            .make_request()
1091            .wrap::<_, _>(self)
1092    }
1093
1094    /// Get a particular runner that belongs to the organization
1095    ///
1096    /// - `org`: name of the organization
1097    /// - `runner_id`: ID of the runner
1098    pub fn get_org_runner(
1099        &self,
1100        org: &str,
1101        runner_id: &str,
1102    ) -> Request<'_, endpoints::GetOrgRunner<'_>, ActionRunner> {
1103        endpoints::GetOrgRunner { org, runner_id }
1104            .make_request()
1105            .wrap::<_, _>(self)
1106    }
1107
1108    /// Delete a particular runner that belongs to the organization
1109    ///
1110    /// - `org`: name of the organization
1111    /// - `runner_id`: ID of the runner
1112    pub fn delete_org_runner(
1113        &self,
1114        org: &str,
1115        runner_id: &str,
1116    ) -> Request<'_, endpoints::DeleteOrgRunner<'_>, ()> {
1117        endpoints::DeleteOrgRunner { org, runner_id }
1118            .make_request()
1119            .wrap::<_, _>(self)
1120    }
1121
1122    /// List actions secrets of an organization
1123    ///
1124    /// - `org`: name of the organization
1125    pub fn org_list_actions_secrets(
1126        &self,
1127        org: &str,
1128    ) -> Request<'_, endpoints::OrgListActionsSecrets<'_>, (SecretListHeaders, Vec<Secret>)> {
1129        endpoints::OrgListActionsSecrets { org }
1130            .make_request()
1131            .wrap::<_, _>(self)
1132    }
1133
1134    /// Create or Update a secret value in an organization
1135    ///
1136    /// - `org`: name of organization
1137    /// - `secretname`: name of the secret
1138    /// - `body`: See [`CreateOrUpdateSecretOption`]
1139    pub fn update_org_secret(
1140        &self,
1141        org: &str,
1142        secretname: &str,
1143        body: CreateOrUpdateSecretOption,
1144    ) -> Request<'_, endpoints::UpdateOrgSecret<'_>, ()> {
1145        endpoints::UpdateOrgSecret {
1146            org,
1147            secretname,
1148            body: body,
1149        }
1150        .make_request()
1151        .wrap::<_, _>(self)
1152    }
1153
1154    /// Delete a secret in an organization
1155    ///
1156    /// - `org`: name of organization
1157    /// - `secretname`: name of the secret
1158    pub fn delete_org_secret(
1159        &self,
1160        org: &str,
1161        secretname: &str,
1162    ) -> Request<'_, endpoints::DeleteOrgSecret<'_>, ()> {
1163        endpoints::DeleteOrgSecret { org, secretname }
1164            .make_request()
1165            .wrap::<_, _>(self)
1166    }
1167
1168    /// List variables of an organization
1169    ///
1170    /// - `org`: name of the organization
1171    pub fn get_org_variables_list(
1172        &self,
1173        org: &str,
1174    ) -> Request<'_, endpoints::GetOrgVariablesList<'_>, (VariableListHeaders, Vec<ActionVariable>)>
1175    {
1176        endpoints::GetOrgVariablesList { org }
1177            .make_request()
1178            .wrap::<_, _>(self)
1179    }
1180
1181    /// Get organization's variable by name
1182    ///
1183    /// - `org`: name of the organization
1184    /// - `variablename`: name of the variable
1185    pub fn get_org_variable(
1186        &self,
1187        org: &str,
1188        variablename: &str,
1189    ) -> Request<'_, endpoints::GetOrgVariable<'_>, ActionVariable> {
1190        endpoints::GetOrgVariable { org, variablename }
1191            .make_request()
1192            .wrap::<_, _>(self)
1193    }
1194
1195    /// Update variable in organization
1196    ///
1197    /// - `org`: name of the organization
1198    /// - `variablename`: name of the variable
1199    /// - `body`: See [`UpdateVariableOption`]
1200    pub fn update_org_variable(
1201        &self,
1202        org: &str,
1203        variablename: &str,
1204        body: UpdateVariableOption,
1205    ) -> Request<'_, endpoints::UpdateOrgVariable<'_>, ()> {
1206        endpoints::UpdateOrgVariable {
1207            org,
1208            variablename,
1209            body: body,
1210        }
1211        .make_request()
1212        .wrap::<_, _>(self)
1213    }
1214
1215    /// Create a new variable in organization
1216    ///
1217    /// - `org`: name of the organization
1218    /// - `variablename`: name of the variable
1219    /// - `body`: See [`CreateVariableOption`]
1220    pub fn create_org_variable(
1221        &self,
1222        org: &str,
1223        variablename: &str,
1224        body: CreateVariableOption,
1225    ) -> Request<'_, endpoints::CreateOrgVariable<'_>, ()> {
1226        endpoints::CreateOrgVariable {
1227            org,
1228            variablename,
1229            body: body,
1230        }
1231        .make_request()
1232        .wrap::<_, _>(self)
1233    }
1234
1235    /// Delete organization's variable by name
1236    ///
1237    /// - `org`: name of the organization
1238    /// - `variablename`: name of the variable
1239    pub fn delete_org_variable(
1240        &self,
1241        org: &str,
1242        variablename: &str,
1243    ) -> Request<'_, endpoints::DeleteOrgVariable<'_>, ()> {
1244        endpoints::DeleteOrgVariable { org, variablename }
1245            .make_request()
1246            .wrap::<_, _>(self)
1247    }
1248
1249    /// List an organization's activity feeds
1250    ///
1251    /// - `org`: name of the org
1252    pub fn org_list_activity_feeds(
1253        &self,
1254        org: &str,
1255        query: OrgListActivityFeedsQuery,
1256    ) -> Request<'_, endpoints::OrgListActivityFeeds<'_>, (ActivityFeedsListHeaders, Vec<Activity>)>
1257    {
1258        endpoints::OrgListActivityFeeds { org, query }
1259            .make_request()
1260            .wrap::<_, _>(self)
1261    }
1262
1263    /// Update an organization's avatar
1264    ///
1265    /// - `org`: name of the organization
1266    /// - `body`: See [`UpdateUserAvatarOption`]
1267    pub fn org_update_avatar(
1268        &self,
1269        org: &str,
1270        body: UpdateUserAvatarOption,
1271    ) -> Request<'_, endpoints::OrgUpdateAvatar<'_>, ()> {
1272        endpoints::OrgUpdateAvatar { org, body: body }
1273            .make_request()
1274            .wrap::<_, _>(self)
1275    }
1276
1277    /// Delete an organization's avatar. It will be replaced by a default one
1278    ///
1279    /// - `org`: name of the organization
1280    pub fn org_delete_avatar(&self, org: &str) -> Request<'_, endpoints::OrgDeleteAvatar<'_>, ()> {
1281        endpoints::OrgDeleteAvatar { org }
1282            .make_request()
1283            .wrap::<_, _>(self)
1284    }
1285
1286    /// Blocks a user from the organization
1287    ///
1288    /// - `org`: name of the org
1289    /// - `username`: username of the user
1290    pub fn org_block_user(
1291        &self,
1292        org: &str,
1293        username: &str,
1294    ) -> Request<'_, endpoints::OrgBlockUser<'_>, ()> {
1295        endpoints::OrgBlockUser { org, username }
1296            .make_request()
1297            .wrap::<_, _>(self)
1298    }
1299
1300    /// List an organization's webhooks
1301    ///
1302    /// - `org`: name of the organization
1303    pub fn org_list_hooks(&self, org: &str) -> Request<'_, endpoints::OrgListHooks<'_>, Vec<Hook>> {
1304        endpoints::OrgListHooks { org }
1305            .make_request()
1306            .wrap::<_, _>(self)
1307    }
1308
1309    /// Create a hook
1310    ///
1311    /// - `org`: name of the organization
1312    /// - `body`: See [`CreateHookOption`]
1313    pub fn org_create_hook(
1314        &self,
1315        org: &str,
1316        body: CreateHookOption,
1317    ) -> Request<'_, endpoints::OrgCreateHook<'_>, Hook> {
1318        endpoints::OrgCreateHook { org, body: body }
1319            .make_request()
1320            .wrap::<_, _>(self)
1321    }
1322
1323    /// Get a hook
1324    ///
1325    /// - `org`: name of the organization
1326    /// - `id`: id of the hook to get
1327    pub fn org_get_hook(&self, org: &str, id: i64) -> Request<'_, endpoints::OrgGetHook<'_>, Hook> {
1328        endpoints::OrgGetHook { org, id }
1329            .make_request()
1330            .wrap::<_, _>(self)
1331    }
1332
1333    /// Delete a hook
1334    ///
1335    /// - `org`: name of the organization
1336    /// - `id`: id of the hook to delete
1337    pub fn org_delete_hook(
1338        &self,
1339        org: &str,
1340        id: i64,
1341    ) -> Request<'_, endpoints::OrgDeleteHook<'_>, ()> {
1342        endpoints::OrgDeleteHook { org, id }
1343            .make_request()
1344            .wrap::<_, _>(self)
1345    }
1346
1347    /// Update a hook
1348    ///
1349    /// - `org`: name of the organization
1350    /// - `id`: id of the hook to update
1351    /// - `body`: See [`EditHookOption`]
1352    pub fn org_edit_hook(
1353        &self,
1354        org: &str,
1355        id: i64,
1356        body: EditHookOption,
1357    ) -> Request<'_, endpoints::OrgEditHook<'_>, Hook> {
1358        endpoints::OrgEditHook {
1359            org,
1360            id,
1361            body: body,
1362        }
1363        .make_request()
1364        .wrap::<_, _>(self)
1365    }
1366
1367    /// List an organization's labels
1368    ///
1369    /// - `org`: name of the organization
1370    pub fn org_list_labels(
1371        &self,
1372        org: &str,
1373        query: OrgListLabelsQuery,
1374    ) -> Request<'_, endpoints::OrgListLabels<'_>, (LabelListHeaders, Vec<Label>)> {
1375        endpoints::OrgListLabels { org, query }
1376            .make_request()
1377            .wrap::<_, _>(self)
1378    }
1379
1380    /// Create a label for an organization
1381    ///
1382    /// - `org`: name of the organization
1383    /// - `body`: See [`CreateLabelOption`]
1384    pub fn org_create_label(
1385        &self,
1386        org: &str,
1387        body: CreateLabelOption,
1388    ) -> Request<'_, endpoints::OrgCreateLabel<'_>, Label> {
1389        endpoints::OrgCreateLabel { org, body: body }
1390            .make_request()
1391            .wrap::<_, _>(self)
1392    }
1393
1394    /// Get a single label
1395    ///
1396    /// - `org`: name of the organization
1397    /// - `id`: id of the label to get
1398    pub fn org_get_label(
1399        &self,
1400        org: &str,
1401        id: i64,
1402    ) -> Request<'_, endpoints::OrgGetLabel<'_>, Label> {
1403        endpoints::OrgGetLabel { org, id }
1404            .make_request()
1405            .wrap::<_, _>(self)
1406    }
1407
1408    /// Delete a label
1409    ///
1410    /// - `org`: name of the organization
1411    /// - `id`: id of the label to delete
1412    pub fn org_delete_label(
1413        &self,
1414        org: &str,
1415        id: i64,
1416    ) -> Request<'_, endpoints::OrgDeleteLabel<'_>, ()> {
1417        endpoints::OrgDeleteLabel { org, id }
1418            .make_request()
1419            .wrap::<_, _>(self)
1420    }
1421
1422    /// Update a label
1423    ///
1424    /// - `org`: name of the organization
1425    /// - `id`: id of the label to edit
1426    /// - `body`: See [`EditLabelOption`]
1427    pub fn org_edit_label(
1428        &self,
1429        org: &str,
1430        id: i64,
1431        body: EditLabelOption,
1432    ) -> Request<'_, endpoints::OrgEditLabel<'_>, Label> {
1433        endpoints::OrgEditLabel {
1434            org,
1435            id,
1436            body: body,
1437        }
1438        .make_request()
1439        .wrap::<_, _>(self)
1440    }
1441
1442    /// List the organization's blocked users
1443    ///
1444    /// - `org`: name of the org
1445    pub fn org_list_blocked_users(
1446        &self,
1447        org: &str,
1448    ) -> Request<'_, endpoints::OrgListBlockedUsers<'_>, (BlockedUserListHeaders, Vec<BlockedUser>)>
1449    {
1450        endpoints::OrgListBlockedUsers { org }
1451            .make_request()
1452            .wrap::<_, _>(self)
1453    }
1454
1455    /// List an organization's members
1456    ///
1457    /// - `org`: name of the organization
1458    pub fn org_list_members(
1459        &self,
1460        org: &str,
1461    ) -> Request<'_, endpoints::OrgListMembers<'_>, (UserListHeaders, Vec<User>)> {
1462        endpoints::OrgListMembers { org }
1463            .make_request()
1464            .wrap::<_, _>(self)
1465    }
1466
1467    /// Check if a user is a member of an organization
1468    ///
1469    /// - `org`: name of the organization
1470    /// - `username`: username of the user
1471    pub fn org_is_member(
1472        &self,
1473        org: &str,
1474        username: &str,
1475    ) -> Request<'_, endpoints::OrgIsMember<'_>, ()> {
1476        endpoints::OrgIsMember { org, username }
1477            .make_request()
1478            .wrap::<_, _>(self)
1479    }
1480
1481    /// Remove a member from an organization
1482    ///
1483    /// - `org`: name of the organization
1484    /// - `username`: username of the user
1485    pub fn org_delete_member(
1486        &self,
1487        org: &str,
1488        username: &str,
1489    ) -> Request<'_, endpoints::OrgDeleteMember<'_>, ()> {
1490        endpoints::OrgDeleteMember { org, username }
1491            .make_request()
1492            .wrap::<_, _>(self)
1493    }
1494
1495    /// List an organization's public members
1496    ///
1497    /// - `org`: name of the organization
1498    pub fn org_list_public_members(
1499        &self,
1500        org: &str,
1501    ) -> Request<'_, endpoints::OrgListPublicMembers<'_>, (UserListHeaders, Vec<User>)> {
1502        endpoints::OrgListPublicMembers { org }
1503            .make_request()
1504            .wrap::<_, _>(self)
1505    }
1506
1507    /// Check if a user is a public member of an organization
1508    ///
1509    /// - `org`: name of the organization
1510    /// - `username`: username of the user
1511    pub fn org_is_public_member(
1512        &self,
1513        org: &str,
1514        username: &str,
1515    ) -> Request<'_, endpoints::OrgIsPublicMember<'_>, ()> {
1516        endpoints::OrgIsPublicMember { org, username }
1517            .make_request()
1518            .wrap::<_, _>(self)
1519    }
1520
1521    /// Publicize a user's membership
1522    ///
1523    /// - `org`: name of the organization
1524    /// - `username`: username of the user
1525    pub fn org_publicize_member(
1526        &self,
1527        org: &str,
1528        username: &str,
1529    ) -> Request<'_, endpoints::OrgPublicizeMember<'_>, ()> {
1530        endpoints::OrgPublicizeMember { org, username }
1531            .make_request()
1532            .wrap::<_, _>(self)
1533    }
1534
1535    /// Conceal a user's membership
1536    ///
1537    /// - `org`: name of the organization
1538    /// - `username`: username of the user
1539    pub fn org_conceal_member(
1540        &self,
1541        org: &str,
1542        username: &str,
1543    ) -> Request<'_, endpoints::OrgConcealMember<'_>, ()> {
1544        endpoints::OrgConcealMember { org, username }
1545            .make_request()
1546            .wrap::<_, _>(self)
1547    }
1548
1549    /// Get quota information for an organization
1550    ///
1551    /// - `org`: name of the organization
1552    pub fn org_get_quota(&self, org: &str) -> Request<'_, endpoints::OrgGetQuota<'_>, QuotaInfo> {
1553        endpoints::OrgGetQuota { org }
1554            .make_request()
1555            .wrap::<_, _>(self)
1556    }
1557
1558    /// List the artifacts affecting the organization's quota
1559    ///
1560    /// - `org`: name of the organization
1561    pub fn org_list_quota_artifacts(
1562        &self,
1563        org: &str,
1564    ) -> Request<
1565        '_,
1566        endpoints::OrgListQuotaArtifacts<'_>,
1567        (QuotaUsedArtifactListHeaders, Vec<QuotaUsedArtifact>),
1568    > {
1569        endpoints::OrgListQuotaArtifacts { org }
1570            .make_request()
1571            .wrap::<_, _>(self)
1572    }
1573
1574    /// List the attachments affecting the organization's quota
1575    ///
1576    /// - `org`: name of the organization
1577    pub fn org_list_quota_attachments(
1578        &self,
1579        org: &str,
1580    ) -> Request<
1581        '_,
1582        endpoints::OrgListQuotaAttachments<'_>,
1583        (QuotaUsedAttachmentListHeaders, Vec<QuotaUsedAttachment>),
1584    > {
1585        endpoints::OrgListQuotaAttachments { org }
1586            .make_request()
1587            .wrap::<_, _>(self)
1588    }
1589
1590    /// Check if the organization is over quota for a given subject
1591    ///
1592    /// - `org`: name of the organization
1593    pub fn org_check_quota(
1594        &self,
1595        org: &str,
1596        query: OrgCheckQuotaQuery,
1597    ) -> Request<'_, endpoints::OrgCheckQuota<'_>, bool> {
1598        endpoints::OrgCheckQuota { org, query }
1599            .make_request()
1600            .wrap::<_, _>(self)
1601    }
1602
1603    /// List the packages affecting the organization's quota
1604    ///
1605    /// - `org`: name of the organization
1606    pub fn org_list_quota_packages(
1607        &self,
1608        org: &str,
1609    ) -> Request<
1610        '_,
1611        endpoints::OrgListQuotaPackages<'_>,
1612        (QuotaUsedPackageListHeaders, Vec<QuotaUsedPackage>),
1613    > {
1614        endpoints::OrgListQuotaPackages { org }
1615            .make_request()
1616            .wrap::<_, _>(self)
1617    }
1618
1619    /// Rename an organization
1620    ///
1621    /// - `org`: existing org name
1622    /// - `body`: See [`RenameOrgOption`]
1623    pub fn rename_org(
1624        &self,
1625        org: &str,
1626        body: RenameOrgOption,
1627    ) -> Request<'_, endpoints::RenameOrg<'_>, ()> {
1628        endpoints::RenameOrg { org, body: body }
1629            .make_request()
1630            .wrap::<_, _>(self)
1631    }
1632
1633    /// List an organization's repos
1634    ///
1635    /// - `org`: name of the organization
1636    pub fn org_list_repos(
1637        &self,
1638        org: &str,
1639    ) -> Request<'_, endpoints::OrgListRepos<'_>, (RepositoryListHeaders, Vec<Repository>)> {
1640        endpoints::OrgListRepos { org }
1641            .make_request()
1642            .wrap::<_, _>(self)
1643    }
1644
1645    /// Create a repository in an organization
1646    ///
1647    /// - `org`: name of organization
1648    /// - `body`: See [`CreateRepoOption`]
1649    pub fn create_org_repo(
1650        &self,
1651        org: &str,
1652        body: CreateRepoOption,
1653    ) -> Request<'_, endpoints::CreateOrgRepo<'_>, Repository> {
1654        endpoints::CreateOrgRepo { org, body: body }
1655            .make_request()
1656            .wrap::<_, _>(self)
1657    }
1658
1659    /// List an organization's teams
1660    ///
1661    /// - `org`: name of the organization
1662    pub fn org_list_teams(
1663        &self,
1664        org: &str,
1665    ) -> Request<'_, endpoints::OrgListTeams<'_>, (TeamListHeaders, Vec<Team>)> {
1666        endpoints::OrgListTeams { org }
1667            .make_request()
1668            .wrap::<_, _>(self)
1669    }
1670
1671    /// Create a team
1672    ///
1673    /// - `org`: name of the organization
1674    /// - `body`: See [`CreateTeamOption`]
1675    pub fn org_create_team(
1676        &self,
1677        org: &str,
1678        body: CreateTeamOption,
1679    ) -> Request<'_, endpoints::OrgCreateTeam<'_>, Team> {
1680        endpoints::OrgCreateTeam { org, body: body }
1681            .make_request()
1682            .wrap::<_, _>(self)
1683    }
1684
1685    /// Search for teams within an organization
1686    ///
1687    /// - `org`: name of the organization
1688    pub fn team_search(
1689        &self,
1690        org: &str,
1691        query: TeamSearchQuery,
1692    ) -> Request<'_, endpoints::TeamSearch<'_>, TeamSearchResults> {
1693        endpoints::TeamSearch { org, query }
1694            .make_request()
1695            .wrap::<_, _>(self)
1696    }
1697
1698    /// Unblock a user from the organization
1699    ///
1700    /// - `org`: name of the org
1701    /// - `username`: username of the user
1702    pub fn org_unblock_user(
1703        &self,
1704        org: &str,
1705        username: &str,
1706    ) -> Request<'_, endpoints::OrgUnblockUser<'_>, ()> {
1707        endpoints::OrgUnblockUser { org, username }
1708            .make_request()
1709            .wrap::<_, _>(self)
1710    }
1711
1712    /// Gets all packages of an owner
1713    ///
1714    /// - `owner`: owner of the packages
1715    pub fn list_packages(
1716        &self,
1717        owner: &str,
1718        query: ListPackagesQuery,
1719    ) -> Request<'_, endpoints::ListPackages<'_>, (PackageListHeaders, Vec<Package>)> {
1720        endpoints::ListPackages { owner, query }
1721            .make_request()
1722            .wrap::<_, _>(self)
1723    }
1724
1725    /// Link a package to a repository
1726    ///
1727    /// - `owner`: owner of the package
1728    /// - `type`: type of the package
1729    /// - `name`: name of the package
1730    /// - `repo_name`: name of the repository to link.
1731    pub fn link_package(
1732        &self,
1733        owner: &str,
1734        r#type: &str,
1735        name: &str,
1736        repo_name: &str,
1737    ) -> Request<'_, endpoints::LinkPackage<'_>, ()> {
1738        endpoints::LinkPackage {
1739            owner,
1740            r#type,
1741            name,
1742            repo_name,
1743        }
1744        .make_request()
1745        .wrap::<_, _>(self)
1746    }
1747
1748    /// Unlink a package from a repository
1749    ///
1750    /// - `owner`: owner of the package
1751    /// - `type`: type of the package
1752    /// - `name`: name of the package
1753    pub fn unlink_package(
1754        &self,
1755        owner: &str,
1756        r#type: &str,
1757        name: &str,
1758    ) -> Request<'_, endpoints::UnlinkPackage<'_>, ()> {
1759        endpoints::UnlinkPackage {
1760            owner,
1761            r#type,
1762            name,
1763        }
1764        .make_request()
1765        .wrap::<_, _>(self)
1766    }
1767
1768    /// Gets a package
1769    ///
1770    /// - `owner`: owner of the package
1771    /// - `type`: type of the package
1772    /// - `name`: name of the package
1773    /// - `version`: version of the package
1774    pub fn get_package(
1775        &self,
1776        owner: &str,
1777        r#type: &str,
1778        name: &str,
1779        version: &str,
1780    ) -> Request<'_, endpoints::GetPackage<'_>, Package> {
1781        endpoints::GetPackage {
1782            owner,
1783            r#type,
1784            name,
1785            version,
1786        }
1787        .make_request()
1788        .wrap::<_, _>(self)
1789    }
1790
1791    /// Delete a package
1792    ///
1793    /// - `owner`: owner of the package
1794    /// - `type`: type of the package
1795    /// - `name`: name of the package
1796    /// - `version`: version of the package
1797    pub fn delete_package(
1798        &self,
1799        owner: &str,
1800        r#type: &str,
1801        name: &str,
1802        version: &str,
1803    ) -> Request<'_, endpoints::DeletePackage<'_>, ()> {
1804        endpoints::DeletePackage {
1805            owner,
1806            r#type,
1807            name,
1808            version,
1809        }
1810        .make_request()
1811        .wrap::<_, _>(self)
1812    }
1813
1814    /// Gets all files of a package
1815    ///
1816    /// - `owner`: owner of the package
1817    /// - `type`: type of the package
1818    /// - `name`: name of the package
1819    /// - `version`: version of the package
1820    pub fn list_package_files(
1821        &self,
1822        owner: &str,
1823        r#type: &str,
1824        name: &str,
1825        version: &str,
1826    ) -> Request<'_, endpoints::ListPackageFiles<'_>, Vec<PackageFile>> {
1827        endpoints::ListPackageFiles {
1828            owner,
1829            r#type,
1830            name,
1831            version,
1832        }
1833        .make_request()
1834        .wrap::<_, _>(self)
1835    }
1836
1837    /// Search for issues across the repositories that the user has access to
1838    ///
1839    pub fn issue_search_issues(
1840        &self,
1841        query: IssueSearchIssuesQuery,
1842    ) -> Request<'_, endpoints::IssueSearchIssues, (IssueListHeaders, Vec<Issue>)> {
1843        endpoints::IssueSearchIssues { query }
1844            .make_request()
1845            .wrap::<_, _>(self)
1846    }
1847
1848    /// Migrate a remote git repository
1849    ///
1850    /// - `body`: See [`MigrateRepoOptions`]
1851    pub fn repo_migrate(
1852        &self,
1853        body: MigrateRepoOptions,
1854    ) -> Request<'_, endpoints::RepoMigrate, Repository> {
1855        endpoints::RepoMigrate { body: body }
1856            .make_request()
1857            .wrap::<_, _>(self)
1858    }
1859
1860    /// Search for repositories
1861    ///
1862    pub fn repo_search(
1863        &self,
1864        query: RepoSearchQuery,
1865    ) -> Request<'_, endpoints::RepoSearch, SearchResults> {
1866        endpoints::RepoSearch { query }
1867            .make_request()
1868            .wrap::<_, _>(self)
1869    }
1870
1871    /// Get a repository
1872    ///
1873    /// - `owner`: owner of the repo
1874    /// - `repo`: name of the repo
1875    pub fn repo_get(
1876        &self,
1877        owner: &str,
1878        repo: &str,
1879    ) -> Request<'_, endpoints::RepoGet<'_>, Repository> {
1880        endpoints::RepoGet { owner, repo }
1881            .make_request()
1882            .wrap::<_, _>(self)
1883    }
1884
1885    /// Delete a repository
1886    ///
1887    /// - `owner`: owner of the repo to delete
1888    /// - `repo`: name of the repo to delete
1889    pub fn repo_delete(
1890        &self,
1891        owner: &str,
1892        repo: &str,
1893    ) -> Request<'_, endpoints::RepoDelete<'_>, ()> {
1894        endpoints::RepoDelete { owner, repo }
1895            .make_request()
1896            .wrap::<_, _>(self)
1897    }
1898
1899    /// Edit a repository's properties. Only fields that are set will be changed.
1900    ///
1901    /// - `owner`: owner of the repo to edit
1902    /// - `repo`: name of the repo to edit
1903    /// - `body`: Properties of a repo that you can edit
1904
1905    ///   See [`EditRepoOption`]
1906    pub fn repo_edit(
1907        &self,
1908        owner: &str,
1909        repo: &str,
1910        body: EditRepoOption,
1911    ) -> Request<'_, endpoints::RepoEdit<'_>, Repository> {
1912        endpoints::RepoEdit {
1913            owner,
1914            repo,
1915            body: body,
1916        }
1917        .make_request()
1918        .wrap::<_, _>(self)
1919    }
1920
1921    /// List a repository's artifacts
1922    ///
1923    /// - `owner`: owner of the repo
1924    /// - `repo`: name of the repo
1925    pub fn list_action_artifacts(
1926        &self,
1927        owner: &str,
1928        repo: &str,
1929        query: ListActionArtifactsQuery,
1930    ) -> Request<'_, endpoints::ListActionArtifacts<'_>, Vec<ActionArtifact>> {
1931        endpoints::ListActionArtifacts { owner, repo, query }
1932            .make_request()
1933            .wrap::<_, _>(self)
1934    }
1935
1936    /// Get an artifact by ID
1937    ///
1938    /// - `owner`: owner of the repo
1939    /// - `repo`: name of the repo
1940    /// - `artifact_id`: ID of the artifact
1941    pub fn get_action_artifact(
1942        &self,
1943        owner: &str,
1944        repo: &str,
1945        artifact_id: i64,
1946    ) -> Request<'_, endpoints::GetActionArtifact<'_>, ActionArtifact> {
1947        endpoints::GetActionArtifact {
1948            owner,
1949            repo,
1950            artifact_id,
1951        }
1952        .make_request()
1953        .wrap::<_, _>(self)
1954    }
1955
1956    /// Mark an artifact for deletion
1957    ///
1958    /// - `owner`: owner of the repo
1959    /// - `repo`: name of the repo
1960    /// - `artifact_id`: ID of the artifact
1961    pub fn delete_action_artifact(
1962        &self,
1963        owner: &str,
1964        repo: &str,
1965        artifact_id: i64,
1966    ) -> Request<'_, endpoints::DeleteActionArtifact<'_>, ()> {
1967        endpoints::DeleteActionArtifact {
1968            owner,
1969            repo,
1970            artifact_id,
1971        }
1972        .make_request()
1973        .wrap::<_, _>(self)
1974    }
1975
1976    /// Download an artifact
1977    ///
1978    /// - `owner`: owner of the repo
1979    /// - `repo`: name of the repo
1980    /// - `artifact_id`: ID of the artifact
1981    pub fn download_action_artifact(
1982        &self,
1983        owner: &str,
1984        repo: &str,
1985        artifact_id: i64,
1986    ) -> Request<'_, endpoints::DownloadActionArtifact<'_>, Bytes> {
1987        endpoints::DownloadActionArtifact {
1988            owner,
1989            repo,
1990            artifact_id,
1991        }
1992        .make_request()
1993        .wrap::<_, _>(self)
1994    }
1995
1996    /// Get a single workflow run job, including its step list
1997    ///
1998    /// - `owner`: owner of the repo
1999    /// - `repo`: name of the repo
2000    /// - `job_id`: ID of the workflow job
2001    pub fn repo_get_action_job(
2002        &self,
2003        owner: &str,
2004        repo: &str,
2005        job_id: i64,
2006    ) -> Request<'_, endpoints::RepoGetActionJob<'_>, ActionRunJob> {
2007        endpoints::RepoGetActionJob {
2008            owner,
2009            repo,
2010            job_id,
2011        }
2012        .make_request()
2013        .wrap::<_, _>(self)
2014    }
2015
2016    /// Download the plaintext logs of an action job
2017    ///
2018    /// - `owner`: owner of the repo
2019    /// - `repo`: name of the repo
2020    /// - `job_id`: ID of the workflow job
2021    pub fn repo_get_action_job_logs(
2022        &self,
2023        owner: &str,
2024        repo: &str,
2025        job_id: i64,
2026        query: RepoGetActionJobLogsQuery,
2027    ) -> Request<'_, endpoints::RepoGetActionJobLogs<'_>, Bytes> {
2028        endpoints::RepoGetActionJobLogs {
2029            owner,
2030            repo,
2031            job_id,
2032            query,
2033        }
2034        .make_request()
2035        .wrap::<_, _>(self)
2036    }
2037
2038    /// Rerun a completed workflow job and its dependent jobs
2039    ///
2040    /// - `owner`: owner of the repo
2041    /// - `repo`: name of the repo
2042    /// - `job_id`: ID of the workflow job
2043    pub fn repo_rerun_action_job(
2044        &self,
2045        owner: &str,
2046        repo: &str,
2047        job_id: i64,
2048    ) -> Request<'_, endpoints::RepoRerunActionJob<'_>, ()> {
2049        endpoints::RepoRerunActionJob {
2050            owner,
2051            repo,
2052            job_id,
2053        }
2054        .make_request()
2055        .wrap::<_, _>(self)
2056    }
2057
2058    /// Get runners belonging to the repository
2059    ///
2060    /// - `owner`: owner of the repo
2061    /// - `repo`: name of the repo
2062    pub fn get_repo_runners(
2063        &self,
2064        owner: &str,
2065        repo: &str,
2066        query: GetRepoRunnersQuery,
2067    ) -> Request<'_, endpoints::GetRepoRunners<'_>, (ActionRunnerListHeaders, Vec<ActionRunner>)>
2068    {
2069        endpoints::GetRepoRunners { owner, repo, query }
2070            .make_request()
2071            .wrap::<_, _>(self)
2072    }
2073
2074    /// Register a new repository-level runner
2075    ///
2076    /// - `owner`: owner of the repo
2077    /// - `repo`: name of the repo
2078    /// - `body`: See [`RegisterRunnerOptions`]
2079    pub fn register_repo_runner(
2080        &self,
2081        owner: &str,
2082        repo: &str,
2083        body: RegisterRunnerOptions,
2084    ) -> Request<'_, endpoints::RegisterRepoRunner<'_>, RegisterRunnerResponse> {
2085        endpoints::RegisterRepoRunner {
2086            owner,
2087            repo,
2088            body: body,
2089        }
2090        .make_request()
2091        .wrap::<_, _>(self)
2092    }
2093
2094    /// Search for repository's action jobs according filter conditions
2095    ///
2096    /// - `owner`: owner of the repo
2097    /// - `repo`: name of the repo
2098    pub fn repo_search_run_jobs(
2099        &self,
2100        owner: &str,
2101        repo: &str,
2102        query: RepoSearchRunJobsQuery,
2103    ) -> Request<'_, endpoints::RepoSearchRunJobs<'_>, Vec<ActionRunJob>> {
2104        endpoints::RepoSearchRunJobs { owner, repo, query }
2105            .make_request()
2106            .wrap::<_, _>(self)
2107    }
2108
2109    /// Get a repository's runner registration token
2110    ///
2111    /// - `owner`: owner of the repo
2112    /// - `repo`: name of the repo
2113    pub fn repo_get_runner_registration_token(
2114        &self,
2115        owner: &str,
2116        repo: &str,
2117    ) -> Request<'_, endpoints::RepoGetRunnerRegistrationToken<'_>, RegistrationToken> {
2118        endpoints::RepoGetRunnerRegistrationToken { owner, repo }
2119            .make_request()
2120            .wrap::<_, _>(self)
2121    }
2122
2123    /// Get a particular runner that belongs to the repository
2124    ///
2125    /// - `owner`: owner of the repo
2126    /// - `repo`: name of the repo
2127    /// - `runner_id`: ID of the runner
2128    pub fn get_repo_runner(
2129        &self,
2130        owner: &str,
2131        repo: &str,
2132        runner_id: &str,
2133    ) -> Request<'_, endpoints::GetRepoRunner<'_>, ActionRunner> {
2134        endpoints::GetRepoRunner {
2135            owner,
2136            repo,
2137            runner_id,
2138        }
2139        .make_request()
2140        .wrap::<_, _>(self)
2141    }
2142
2143    /// Delete a particular runner that belongs to a repository
2144    ///
2145    /// - `owner`: owner of the repo
2146    /// - `repo`: name of the repo
2147    /// - `runner_id`: ID of the runner
2148    pub fn delete_repo_runner(
2149        &self,
2150        owner: &str,
2151        repo: &str,
2152        runner_id: &str,
2153    ) -> Request<'_, endpoints::DeleteRepoRunner<'_>, ()> {
2154        endpoints::DeleteRepoRunner {
2155            owner,
2156            repo,
2157            runner_id,
2158        }
2159        .make_request()
2160        .wrap::<_, _>(self)
2161    }
2162
2163    /// List a repository's action runs
2164    ///
2165    /// - `owner`: owner of the repo
2166    /// - `repo`: name of the repo
2167    pub fn list_action_runs(
2168        &self,
2169        owner: &str,
2170        repo: &str,
2171        query: ListActionRunsQuery,
2172    ) -> Request<'_, endpoints::ListActionRuns<'_>, ListActionRunResponse> {
2173        endpoints::ListActionRuns { owner, repo, query }
2174            .make_request()
2175            .wrap::<_, _>(self)
2176    }
2177
2178    /// Get an action run
2179    ///
2180    /// - `owner`: owner of the repo
2181    /// - `repo`: name of the repo
2182    /// - `run_id`: id of the action run
2183    pub fn get_action_run(
2184        &self,
2185        owner: &str,
2186        repo: &str,
2187        run_id: i64,
2188    ) -> Request<'_, endpoints::GetActionRun<'_>, ActionRun> {
2189        endpoints::GetActionRun {
2190            owner,
2191            repo,
2192            run_id,
2193        }
2194        .make_request()
2195        .wrap::<_, _>(self)
2196    }
2197
2198    /// Delete a completed workflow run.
2199    ///
2200    /// - `owner`: owner of the repo
2201    /// - `repo`: name of the repo
2202    /// - `run_id`: id of the action run
2203    pub fn delete_action_run(
2204        &self,
2205        owner: &str,
2206        repo: &str,
2207        run_id: i64,
2208    ) -> Request<'_, endpoints::DeleteActionRun<'_>, ()> {
2209        endpoints::DeleteActionRun {
2210            owner,
2211            repo,
2212            run_id,
2213        }
2214        .make_request()
2215        .wrap::<_, _>(self)
2216    }
2217
2218    /// List artifacts of a workflow run
2219    ///
2220    /// - `owner`: owner of the repo
2221    /// - `repo`: name of the repo
2222    /// - `run_id`: ID of the workflow run
2223    pub fn list_action_run_artifacts(
2224        &self,
2225        owner: &str,
2226        repo: &str,
2227        run_id: i64,
2228        query: ListActionRunArtifactsQuery,
2229    ) -> Request<'_, endpoints::ListActionRunArtifacts<'_>, Vec<ActionArtifact>> {
2230        endpoints::ListActionRunArtifacts {
2231            owner,
2232            repo,
2233            run_id,
2234            query,
2235        }
2236        .make_request()
2237        .wrap::<_, _>(self)
2238    }
2239
2240    /// Cancel a pending or running workflow run.
2241    ///
2242    /// - `owner`: owner of the repo
2243    /// - `repo`: name of the repo
2244    /// - `run_id`: ID of the workflow run
2245    pub fn cancel_action_run(
2246        &self,
2247        owner: &str,
2248        repo: &str,
2249        run_id: i64,
2250    ) -> Request<'_, endpoints::CancelActionRun<'_>, ()> {
2251        endpoints::CancelActionRun {
2252            owner,
2253            repo,
2254            run_id,
2255        }
2256        .make_request()
2257        .wrap::<_, _>(self)
2258    }
2259
2260    /// List jobs of a workflow run
2261    ///
2262    /// - `owner`: owner of the repo
2263    /// - `repo`: name of the repo
2264    /// - `run_id`: ID of the workflow run
2265    pub fn list_action_run_jobs(
2266        &self,
2267        owner: &str,
2268        repo: &str,
2269        run_id: i64,
2270    ) -> Request<'_, endpoints::ListActionRunJobs<'_>, Vec<ActionRunJob>> {
2271        endpoints::ListActionRunJobs {
2272            owner,
2273            repo,
2274            run_id,
2275        }
2276        .make_request()
2277        .wrap::<_, _>(self)
2278    }
2279
2280    /// Download a ZIP of plaintext logs for every job in an action run
2281    ///
2282    /// - `owner`: owner of the repo
2283    /// - `repo`: name of the repo
2284    /// - `run_id`: ID of the workflow run. The ZIP contains the latest attempt of each job in the run, with each entry named `{job-name}-{job-id}-attempt-{N}.log` (the job ID prevents collisions when two jobs share a name; the attempt number records which run the log came from). The run itself has no attempt number — jobs are re-run independently, so use the per-job logs endpoint with `?attempt` to fetch a specific historical attempt of one job.
2285
2286    pub fn repo_get_action_run_logs(
2287        &self,
2288        owner: &str,
2289        repo: &str,
2290        run_id: i64,
2291    ) -> Request<'_, endpoints::RepoGetActionRunLogs<'_>, Bytes> {
2292        endpoints::RepoGetActionRunLogs {
2293            owner,
2294            repo,
2295            run_id,
2296        }
2297        .make_request()
2298        .wrap::<_, _>(self)
2299    }
2300
2301    /// Rerun a finished (succeeded, failed, cancelled or skipped) workflow run.
2302    ///
2303    /// - `owner`: owner of the repo
2304    /// - `repo`: name of the repo
2305    /// - `run_id`: ID of the workflow run
2306    pub fn rerun_action_run(
2307        &self,
2308        owner: &str,
2309        repo: &str,
2310        run_id: i64,
2311    ) -> Request<'_, endpoints::RerunActionRun<'_>, ()> {
2312        endpoints::RerunActionRun {
2313            owner,
2314            repo,
2315            run_id,
2316        }
2317        .make_request()
2318        .wrap::<_, _>(self)
2319    }
2320
2321    /// List an repo's actions secrets
2322    ///
2323    /// - `owner`: owner of the repository
2324    /// - `repo`: name of the repository
2325    pub fn repo_list_actions_secrets(
2326        &self,
2327        owner: &str,
2328        repo: &str,
2329    ) -> Request<'_, endpoints::RepoListActionsSecrets<'_>, (SecretListHeaders, Vec<Secret>)> {
2330        endpoints::RepoListActionsSecrets { owner, repo }
2331            .make_request()
2332            .wrap::<_, _>(self)
2333    }
2334
2335    /// Create or Update a secret value in a repository
2336    ///
2337    /// - `owner`: owner of the repository
2338    /// - `repo`: name of the repository
2339    /// - `secretname`: name of the secret
2340    /// - `body`: See [`CreateOrUpdateSecretOption`]
2341    pub fn update_repo_secret(
2342        &self,
2343        owner: &str,
2344        repo: &str,
2345        secretname: &str,
2346        body: CreateOrUpdateSecretOption,
2347    ) -> Request<'_, endpoints::UpdateRepoSecret<'_>, ()> {
2348        endpoints::UpdateRepoSecret {
2349            owner,
2350            repo,
2351            secretname,
2352            body: body,
2353        }
2354        .make_request()
2355        .wrap::<_, _>(self)
2356    }
2357
2358    /// Delete a secret in a repository
2359    ///
2360    /// - `owner`: owner of the repository
2361    /// - `repo`: name of the repository
2362    /// - `secretname`: name of the secret
2363    pub fn delete_repo_secret(
2364        &self,
2365        owner: &str,
2366        repo: &str,
2367        secretname: &str,
2368    ) -> Request<'_, endpoints::DeleteRepoSecret<'_>, ()> {
2369        endpoints::DeleteRepoSecret {
2370            owner,
2371            repo,
2372            secretname,
2373        }
2374        .make_request()
2375        .wrap::<_, _>(self)
2376    }
2377
2378    /// List a repository's action tasks
2379    ///
2380    /// - `owner`: owner of the repo
2381    /// - `repo`: name of the repo
2382    pub fn list_action_tasks(
2383        &self,
2384        owner: &str,
2385        repo: &str,
2386        query: ListActionTasksQuery,
2387    ) -> Request<'_, endpoints::ListActionTasks<'_>, ActionTaskResponse> {
2388        endpoints::ListActionTasks { owner, repo, query }
2389            .make_request()
2390            .wrap::<_, _>(self)
2391    }
2392
2393    /// Get repo-level variables list
2394    ///
2395    /// - `owner`: name of the owner
2396    /// - `repo`: name of the repository
2397    pub fn get_repo_variables_list(
2398        &self,
2399        owner: &str,
2400        repo: &str,
2401    ) -> Request<'_, endpoints::GetRepoVariablesList<'_>, (VariableListHeaders, Vec<ActionVariable>)>
2402    {
2403        endpoints::GetRepoVariablesList { owner, repo }
2404            .make_request()
2405            .wrap::<_, _>(self)
2406    }
2407
2408    /// Get a repo-level variable
2409    ///
2410    /// - `owner`: name of the owner
2411    /// - `repo`: name of the repository
2412    /// - `variablename`: name of the variable
2413    pub fn get_repo_variable(
2414        &self,
2415        owner: &str,
2416        repo: &str,
2417        variablename: &str,
2418    ) -> Request<'_, endpoints::GetRepoVariable<'_>, ActionVariable> {
2419        endpoints::GetRepoVariable {
2420            owner,
2421            repo,
2422            variablename,
2423        }
2424        .make_request()
2425        .wrap::<_, _>(self)
2426    }
2427
2428    /// Update a repo-level variable
2429    ///
2430    /// - `owner`: name of the owner
2431    /// - `repo`: name of the repository
2432    /// - `variablename`: name of the variable
2433    /// - `body`: See [`UpdateVariableOption`]
2434    pub fn update_repo_variable(
2435        &self,
2436        owner: &str,
2437        repo: &str,
2438        variablename: &str,
2439        body: UpdateVariableOption,
2440    ) -> Request<'_, endpoints::UpdateRepoVariable<'_>, ()> {
2441        endpoints::UpdateRepoVariable {
2442            owner,
2443            repo,
2444            variablename,
2445            body: body,
2446        }
2447        .make_request()
2448        .wrap::<_, _>(self)
2449    }
2450
2451    /// Create a repo-level variable
2452    ///
2453    /// - `owner`: name of the owner
2454    /// - `repo`: name of the repository
2455    /// - `variablename`: name of the variable
2456    /// - `body`: See [`CreateVariableOption`]
2457    pub fn create_repo_variable(
2458        &self,
2459        owner: &str,
2460        repo: &str,
2461        variablename: &str,
2462        body: CreateVariableOption,
2463    ) -> Request<'_, endpoints::CreateRepoVariable<'_>, ()> {
2464        endpoints::CreateRepoVariable {
2465            owner,
2466            repo,
2467            variablename,
2468            body: body,
2469        }
2470        .make_request()
2471        .wrap::<_, _>(self)
2472    }
2473
2474    /// Delete a repo-level variable
2475    ///
2476    /// - `owner`: name of the owner
2477    /// - `repo`: name of the repository
2478    /// - `variablename`: name of the variable
2479    pub fn delete_repo_variable(
2480        &self,
2481        owner: &str,
2482        repo: &str,
2483        variablename: &str,
2484    ) -> Request<'_, endpoints::DeleteRepoVariable<'_>, ()> {
2485        endpoints::DeleteRepoVariable {
2486            owner,
2487            repo,
2488            variablename,
2489        }
2490        .make_request()
2491        .wrap::<_, _>(self)
2492    }
2493
2494    /// Dispatches a workflow
2495    ///
2496    /// - `owner`: owner of the repo
2497    /// - `repo`: name of the repo
2498    /// - `workflowfilename`: name of the workflow
2499    /// - `body`: See [`DispatchWorkflowOption`]
2500    pub fn dispatch_workflow(
2501        &self,
2502        owner: &str,
2503        repo: &str,
2504        workflowfilename: &str,
2505        body: DispatchWorkflowOption,
2506    ) -> Request<'_, endpoints::DispatchWorkflow<'_>, Option<DispatchWorkflowRun>> {
2507        endpoints::DispatchWorkflow {
2508            owner,
2509            repo,
2510            workflowfilename,
2511            body: body,
2512        }
2513        .make_request()
2514        .wrap::<_, _>(self)
2515    }
2516
2517    /// List a repository's activity feeds
2518    ///
2519    /// - `owner`: owner of the repo
2520    /// - `repo`: name of the repo
2521    pub fn repo_list_activity_feeds(
2522        &self,
2523        owner: &str,
2524        repo: &str,
2525        query: RepoListActivityFeedsQuery,
2526    ) -> Request<'_, endpoints::RepoListActivityFeeds<'_>, (ActivityFeedsListHeaders, Vec<Activity>)>
2527    {
2528        endpoints::RepoListActivityFeeds { owner, repo, query }
2529            .make_request()
2530            .wrap::<_, _>(self)
2531    }
2532
2533    /// Get an archive of a repository
2534    ///
2535    /// - `owner`: owner of the repo
2536    /// - `repo`: name of the repo
2537    /// - `archive`: the git reference for download with attached archive format (e.g. master.zip)
2538    pub fn repo_get_archive(
2539        &self,
2540        owner: &str,
2541        repo: &str,
2542        archive: &str,
2543    ) -> Request<'_, endpoints::RepoGetArchive<'_>, Bytes> {
2544        endpoints::RepoGetArchive {
2545            owner,
2546            repo,
2547            archive,
2548        }
2549        .make_request()
2550        .wrap::<_, _>(self)
2551    }
2552
2553    /// Return all users that have write access and can be assigned to issues
2554    ///
2555    /// - `owner`: owner of the repo
2556    /// - `repo`: name of the repo
2557    pub fn repo_get_assignees(
2558        &self,
2559        owner: &str,
2560        repo: &str,
2561    ) -> Request<'_, endpoints::RepoGetAssignees<'_>, (UserListHeaders, Vec<User>)> {
2562        endpoints::RepoGetAssignees { owner, repo }
2563            .make_request()
2564            .wrap::<_, _>(self)
2565    }
2566
2567    /// Update a repository's avatar
2568    ///
2569    /// - `owner`: owner of the repo
2570    /// - `repo`: name of the repo
2571    /// - `body`: See [`UpdateRepoAvatarOption`]
2572    pub fn repo_update_avatar(
2573        &self,
2574        owner: &str,
2575        repo: &str,
2576        body: UpdateRepoAvatarOption,
2577    ) -> Request<'_, endpoints::RepoUpdateAvatar<'_>, ()> {
2578        endpoints::RepoUpdateAvatar {
2579            owner,
2580            repo,
2581            body: body,
2582        }
2583        .make_request()
2584        .wrap::<_, _>(self)
2585    }
2586
2587    /// Delete a repository's avatar
2588    ///
2589    /// - `owner`: owner of the repo
2590    /// - `repo`: name of the repo
2591    pub fn repo_delete_avatar(
2592        &self,
2593        owner: &str,
2594        repo: &str,
2595    ) -> Request<'_, endpoints::RepoDeleteAvatar<'_>, ()> {
2596        endpoints::RepoDeleteAvatar { owner, repo }
2597            .make_request()
2598            .wrap::<_, _>(self)
2599    }
2600
2601    /// List branch protections for a repository
2602    ///
2603    /// - `owner`: owner of the repo
2604    /// - `repo`: name of the repo
2605    pub fn repo_list_branch_protection(
2606        &self,
2607        owner: &str,
2608        repo: &str,
2609    ) -> Request<'_, endpoints::RepoListBranchProtection<'_>, Vec<BranchProtection>> {
2610        endpoints::RepoListBranchProtection { owner, repo }
2611            .make_request()
2612            .wrap::<_, _>(self)
2613    }
2614
2615    /// Create a branch protections for a repository
2616    ///
2617    /// - `owner`: owner of the repo
2618    /// - `repo`: name of the repo
2619    /// - `body`: See [`CreateBranchProtectionOption`]
2620    pub fn repo_create_branch_protection(
2621        &self,
2622        owner: &str,
2623        repo: &str,
2624        body: CreateBranchProtectionOption,
2625    ) -> Request<'_, endpoints::RepoCreateBranchProtection<'_>, BranchProtection> {
2626        endpoints::RepoCreateBranchProtection {
2627            owner,
2628            repo,
2629            body: body,
2630        }
2631        .make_request()
2632        .wrap::<_, _>(self)
2633    }
2634
2635    /// Get a specific branch protection for the repository
2636    ///
2637    /// - `owner`: owner of the repo
2638    /// - `repo`: name of the repo
2639    /// - `name`: name of protected branch
2640    pub fn repo_get_branch_protection(
2641        &self,
2642        owner: &str,
2643        repo: &str,
2644        name: &str,
2645    ) -> Request<'_, endpoints::RepoGetBranchProtection<'_>, BranchProtection> {
2646        endpoints::RepoGetBranchProtection { owner, repo, name }
2647            .make_request()
2648            .wrap::<_, _>(self)
2649    }
2650
2651    /// Delete a specific branch protection for the repository
2652    ///
2653    /// - `owner`: owner of the repo
2654    /// - `repo`: name of the repo
2655    /// - `name`: name of protected branch
2656    pub fn repo_delete_branch_protection(
2657        &self,
2658        owner: &str,
2659        repo: &str,
2660        name: &str,
2661    ) -> Request<'_, endpoints::RepoDeleteBranchProtection<'_>, ()> {
2662        endpoints::RepoDeleteBranchProtection { owner, repo, name }
2663            .make_request()
2664            .wrap::<_, _>(self)
2665    }
2666
2667    /// Edit a branch protections for a repository. Only fields that are set will be changed
2668    ///
2669    /// - `owner`: owner of the repo
2670    /// - `repo`: name of the repo
2671    /// - `name`: name of protected branch
2672    /// - `body`: See [`EditBranchProtectionOption`]
2673    pub fn repo_edit_branch_protection(
2674        &self,
2675        owner: &str,
2676        repo: &str,
2677        name: &str,
2678        body: EditBranchProtectionOption,
2679    ) -> Request<'_, endpoints::RepoEditBranchProtection<'_>, BranchProtection> {
2680        endpoints::RepoEditBranchProtection {
2681            owner,
2682            repo,
2683            name,
2684            body: body,
2685        }
2686        .make_request()
2687        .wrap::<_, _>(self)
2688    }
2689
2690    /// List a repository's branches
2691    ///
2692    /// - `owner`: owner of the repo
2693    /// - `repo`: name of the repo
2694    pub fn repo_list_branches(
2695        &self,
2696        owner: &str,
2697        repo: &str,
2698    ) -> Request<'_, endpoints::RepoListBranches<'_>, (BranchListHeaders, Vec<Branch>)> {
2699        endpoints::RepoListBranches { owner, repo }
2700            .make_request()
2701            .wrap::<_, _>(self)
2702    }
2703
2704    /// Create a branch
2705    ///
2706    /// - `owner`: owner of the repo
2707    /// - `repo`: name of the repo
2708    /// - `body`: See [`CreateBranchRepoOption`]
2709    pub fn repo_create_branch(
2710        &self,
2711        owner: &str,
2712        repo: &str,
2713        body: CreateBranchRepoOption,
2714    ) -> Request<'_, endpoints::RepoCreateBranch<'_>, Branch> {
2715        endpoints::RepoCreateBranch {
2716            owner,
2717            repo,
2718            body: body,
2719        }
2720        .make_request()
2721        .wrap::<_, _>(self)
2722    }
2723
2724    /// Retrieve a specific branch from a repository, including its effective branch protection
2725    ///
2726    /// - `owner`: owner of the repo
2727    /// - `repo`: name of the repo
2728    /// - `branch`: branch to get
2729    pub fn repo_get_branch(
2730        &self,
2731        owner: &str,
2732        repo: &str,
2733        branch: &str,
2734    ) -> Request<'_, endpoints::RepoGetBranch<'_>, Branch> {
2735        endpoints::RepoGetBranch {
2736            owner,
2737            repo,
2738            branch,
2739        }
2740        .make_request()
2741        .wrap::<_, _>(self)
2742    }
2743
2744    /// Delete a specific branch from a repository
2745    ///
2746    /// - `owner`: owner of the repo
2747    /// - `repo`: name of the repo
2748    /// - `branch`: branch to delete
2749    pub fn repo_delete_branch(
2750        &self,
2751        owner: &str,
2752        repo: &str,
2753        branch: &str,
2754    ) -> Request<'_, endpoints::RepoDeleteBranch<'_>, ()> {
2755        endpoints::RepoDeleteBranch {
2756            owner,
2757            repo,
2758            branch,
2759        }
2760        .make_request()
2761        .wrap::<_, _>(self)
2762    }
2763
2764    /// Update a branch
2765    ///
2766    /// - `owner`: owner of the repo
2767    /// - `repo`: name of the repo
2768    /// - `branch`: name of the branch
2769    /// - `body`: See [`UpdateBranchRepoOption`]
2770    pub fn repo_update_branch(
2771        &self,
2772        owner: &str,
2773        repo: &str,
2774        branch: &str,
2775        body: UpdateBranchRepoOption,
2776    ) -> Request<'_, endpoints::RepoUpdateBranch<'_>, ()> {
2777        endpoints::RepoUpdateBranch {
2778            owner,
2779            repo,
2780            branch,
2781            body: body,
2782        }
2783        .make_request()
2784        .wrap::<_, _>(self)
2785    }
2786
2787    /// List a repository's collaborators
2788    ///
2789    /// - `owner`: owner of the repo
2790    /// - `repo`: name of the repo
2791    pub fn repo_list_collaborators(
2792        &self,
2793        owner: &str,
2794        repo: &str,
2795    ) -> Request<'_, endpoints::RepoListCollaborators<'_>, (UserListHeaders, Vec<User>)> {
2796        endpoints::RepoListCollaborators { owner, repo }
2797            .make_request()
2798            .wrap::<_, _>(self)
2799    }
2800
2801    /// Check if a user is a collaborator of a repository
2802    ///
2803    /// - `owner`: owner of the repo
2804    /// - `repo`: name of the repo
2805    /// - `collaborator`: username of the collaborator
2806    pub fn repo_check_collaborator(
2807        &self,
2808        owner: &str,
2809        repo: &str,
2810        collaborator: &str,
2811    ) -> Request<'_, endpoints::RepoCheckCollaborator<'_>, ()> {
2812        endpoints::RepoCheckCollaborator {
2813            owner,
2814            repo,
2815            collaborator,
2816        }
2817        .make_request()
2818        .wrap::<_, _>(self)
2819    }
2820
2821    /// Add a collaborator to a repository
2822    ///
2823    /// - `owner`: owner of the repo
2824    /// - `repo`: name of the repo
2825    /// - `collaborator`: username of the collaborator to add
2826    /// - `body`: See [`AddCollaboratorOption`]
2827    pub fn repo_add_collaborator(
2828        &self,
2829        owner: &str,
2830        repo: &str,
2831        collaborator: &str,
2832        body: AddCollaboratorOption,
2833    ) -> Request<'_, endpoints::RepoAddCollaborator<'_>, ()> {
2834        endpoints::RepoAddCollaborator {
2835            owner,
2836            repo,
2837            collaborator,
2838            body: body,
2839        }
2840        .make_request()
2841        .wrap::<_, _>(self)
2842    }
2843
2844    /// Delete a collaborator from a repository
2845    ///
2846    /// - `owner`: owner of the repo
2847    /// - `repo`: name of the repo
2848    /// - `collaborator`: username of the collaborator to delete
2849    pub fn repo_delete_collaborator(
2850        &self,
2851        owner: &str,
2852        repo: &str,
2853        collaborator: &str,
2854    ) -> Request<'_, endpoints::RepoDeleteCollaborator<'_>, ()> {
2855        endpoints::RepoDeleteCollaborator {
2856            owner,
2857            repo,
2858            collaborator,
2859        }
2860        .make_request()
2861        .wrap::<_, _>(self)
2862    }
2863
2864    /// Get repository permissions for a user
2865    ///
2866    /// - `owner`: owner of the repo
2867    /// - `repo`: name of the repo
2868    /// - `collaborator`: username of the collaborator
2869    pub fn repo_get_repo_permissions(
2870        &self,
2871        owner: &str,
2872        repo: &str,
2873        collaborator: &str,
2874    ) -> Request<'_, endpoints::RepoGetRepoPermissions<'_>, RepoCollaboratorPermission> {
2875        endpoints::RepoGetRepoPermissions {
2876            owner,
2877            repo,
2878            collaborator,
2879        }
2880        .make_request()
2881        .wrap::<_, _>(self)
2882    }
2883
2884    /// Get a list of all commits from a repository
2885    ///
2886    /// - `owner`: owner of the repo
2887    /// - `repo`: name of the repo
2888    pub fn repo_get_all_commits(
2889        &self,
2890        owner: &str,
2891        repo: &str,
2892        query: RepoGetAllCommitsQuery,
2893    ) -> Request<'_, endpoints::RepoGetAllCommits<'_>, (CommitListHeaders, Vec<Commit>)> {
2894        endpoints::RepoGetAllCommits { owner, repo, query }
2895            .make_request()
2896            .wrap::<_, _>(self)
2897    }
2898
2899    /// Get a commit's combined status, by branch/tag/commit reference
2900    ///
2901    /// - `owner`: owner of the repo
2902    /// - `repo`: name of the repo
2903    /// - `ref`: name of branch/tag/commit
2904    pub fn repo_get_combined_status_by_ref(
2905        &self,
2906        owner: &str,
2907        repo: &str,
2908        r#ref: &str,
2909    ) -> Request<
2910        '_,
2911        endpoints::RepoGetCombinedStatusByRef<'_>,
2912        (CombinedStatusHeaders, CombinedStatus),
2913    > {
2914        endpoints::RepoGetCombinedStatusByRef { owner, repo, r#ref }
2915            .make_request()
2916            .wrap::<_, _>(self)
2917    }
2918
2919    /// Get a commit's statuses, by branch/tag/commit reference
2920    ///
2921    /// - `owner`: owner of the repo
2922    /// - `repo`: name of the repo
2923    /// - `ref`: name of branch/tag/commit
2924    pub fn repo_list_statuses_by_ref(
2925        &self,
2926        owner: &str,
2927        repo: &str,
2928        r#ref: &str,
2929        query: RepoListStatusesByRefQuery,
2930    ) -> Request<
2931        '_,
2932        endpoints::RepoListStatusesByRef<'_>,
2933        (CommitStatusListHeaders, Vec<CommitStatus>),
2934    > {
2935        endpoints::RepoListStatusesByRef {
2936            owner,
2937            repo,
2938            r#ref,
2939            query,
2940        }
2941        .make_request()
2942        .wrap::<_, _>(self)
2943    }
2944
2945    /// Get the pull request of the commit
2946    ///
2947    /// - `owner`: owner of the repo
2948    /// - `repo`: name of the repo
2949    /// - `sha`: SHA of the commit to get
2950    pub fn repo_get_commit_pull_request(
2951        &self,
2952        owner: &str,
2953        repo: &str,
2954        sha: &str,
2955    ) -> Request<'_, endpoints::RepoGetCommitPullRequest<'_>, PullRequest> {
2956        endpoints::RepoGetCommitPullRequest { owner, repo, sha }
2957            .make_request()
2958            .wrap::<_, _>(self)
2959    }
2960
2961    /// Get commit comparison information
2962    ///
2963    /// - `owner`: owner of the repo
2964    /// - `repo`: name of the repo
2965    /// - `basehead`: compare two branches or commits
2966    pub fn repo_compare_diff(
2967        &self,
2968        owner: &str,
2969        repo: &str,
2970        basehead: &str,
2971        query: RepoCompareDiffQuery,
2972    ) -> Request<'_, endpoints::RepoCompareDiff<'_>, Compare> {
2973        endpoints::RepoCompareDiff {
2974            owner,
2975            repo,
2976            basehead,
2977            query,
2978        }
2979        .make_request()
2980        .wrap::<_, _>(self)
2981    }
2982
2983    /// Gets the metadata of all the entries of the root dir
2984    ///
2985    /// - `owner`: owner of the repo
2986    /// - `repo`: name of the repo
2987    pub fn repo_get_contents_list(
2988        &self,
2989        owner: &str,
2990        repo: &str,
2991        query: RepoGetContentsListQuery,
2992    ) -> Request<'_, endpoints::RepoGetContentsList<'_>, Vec<ContentsResponse>> {
2993        endpoints::RepoGetContentsList { owner, repo, query }
2994            .make_request()
2995            .wrap::<_, _>(self)
2996    }
2997
2998    /// Modify multiple files in a repository
2999    ///
3000    /// - `owner`: owner of the repo
3001    /// - `repo`: name of the repo
3002    /// - `body`: See [`ChangeFilesOptions`]
3003    pub fn repo_change_files(
3004        &self,
3005        owner: &str,
3006        repo: &str,
3007        body: ChangeFilesOptions,
3008    ) -> Request<'_, endpoints::RepoChangeFiles<'_>, FilesResponse> {
3009        endpoints::RepoChangeFiles {
3010            owner,
3011            repo,
3012            body: body,
3013        }
3014        .make_request()
3015        .wrap::<_, _>(self)
3016    }
3017
3018    /// Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir
3019    ///
3020    /// - `owner`: owner of the repo
3021    /// - `repo`: name of the repo
3022    /// - `filepath`: path of the dir, file, symlink or submodule in the repo
3023    pub fn repo_get_contents(
3024        &self,
3025        owner: &str,
3026        repo: &str,
3027        filepath: &str,
3028        query: RepoGetContentsQuery,
3029    ) -> Request<'_, endpoints::RepoGetContents<'_>, ContentsResponse> {
3030        endpoints::RepoGetContents {
3031            owner,
3032            repo,
3033            filepath,
3034            query,
3035        }
3036        .make_request()
3037        .wrap::<_, _>(self)
3038    }
3039
3040    /// Update a file in a repository
3041    ///
3042    /// - `owner`: owner of the repo
3043    /// - `repo`: name of the repo
3044    /// - `filepath`: path of the file to update
3045    /// - `body`: See [`UpdateFileOptions`]
3046    pub fn repo_update_file(
3047        &self,
3048        owner: &str,
3049        repo: &str,
3050        filepath: &str,
3051        body: UpdateFileOptions,
3052    ) -> Request<'_, endpoints::RepoUpdateFile<'_>, FileResponse> {
3053        endpoints::RepoUpdateFile {
3054            owner,
3055            repo,
3056            filepath,
3057            body: body,
3058        }
3059        .make_request()
3060        .wrap::<_, _>(self)
3061    }
3062
3063    /// Create a file in a repository
3064    ///
3065    /// - `owner`: owner of the repo
3066    /// - `repo`: name of the repo
3067    /// - `filepath`: path of the file to create
3068    /// - `body`: See [`CreateFileOptions`]
3069    pub fn repo_create_file(
3070        &self,
3071        owner: &str,
3072        repo: &str,
3073        filepath: &str,
3074        body: CreateFileOptions,
3075    ) -> Request<'_, endpoints::RepoCreateFile<'_>, FileResponse> {
3076        endpoints::RepoCreateFile {
3077            owner,
3078            repo,
3079            filepath,
3080            body: body,
3081        }
3082        .make_request()
3083        .wrap::<_, _>(self)
3084    }
3085
3086    /// Delete a file in a repository
3087    ///
3088    /// - `owner`: owner of the repo
3089    /// - `repo`: name of the repo
3090    /// - `filepath`: path of the file to delete
3091    /// - `body`: See [`DeleteFileOptions`]
3092    pub fn repo_delete_file(
3093        &self,
3094        owner: &str,
3095        repo: &str,
3096        filepath: &str,
3097        body: DeleteFileOptions,
3098    ) -> Request<'_, endpoints::RepoDeleteFile<'_>, FileDeleteResponse> {
3099        endpoints::RepoDeleteFile {
3100            owner,
3101            repo,
3102            filepath,
3103            body: body,
3104        }
3105        .make_request()
3106        .wrap::<_, _>(self)
3107    }
3108
3109    /// Convert a mirror repo to a normal repo.
3110    ///
3111    /// - `owner`: owner of the repo to convert
3112    /// - `repo`: name of the repo to convert
3113    pub fn repo_convert(
3114        &self,
3115        owner: &str,
3116        repo: &str,
3117    ) -> Request<'_, endpoints::RepoConvert<'_>, Repository> {
3118        endpoints::RepoConvert { owner, repo }
3119            .make_request()
3120            .wrap::<_, _>(self)
3121    }
3122
3123    /// Apply diff patch to repository
3124    ///
3125    /// - `owner`: owner of the repo
3126    /// - `repo`: name of the repo
3127    /// - `body`: See [`UpdateFileOptions`]
3128    pub fn repo_apply_diff_patch(
3129        &self,
3130        owner: &str,
3131        repo: &str,
3132        body: UpdateFileOptions,
3133    ) -> Request<'_, endpoints::RepoApplyDiffPatch<'_>, FileResponse> {
3134        endpoints::RepoApplyDiffPatch {
3135            owner,
3136            repo,
3137            body: body,
3138        }
3139        .make_request()
3140        .wrap::<_, _>(self)
3141    }
3142
3143    /// Get the EditorConfig definitions of a file in a repository
3144    ///
3145    /// - `owner`: owner of the repo
3146    /// - `repo`: name of the repo
3147    /// - `filepath`: filepath of file to get
3148    pub fn repo_get_editor_config(
3149        &self,
3150        owner: &str,
3151        repo: &str,
3152        filepath: &str,
3153        query: RepoGetEditorConfigQuery,
3154    ) -> Request<'_, endpoints::RepoGetEditorConfig<'_>, BTreeMap<String, String>> {
3155        endpoints::RepoGetEditorConfig {
3156            owner,
3157            repo,
3158            filepath,
3159            query,
3160        }
3161        .make_request()
3162        .wrap::<_, _>(self)
3163    }
3164
3165    /// List a repository's flags
3166    ///
3167    /// - `owner`: owner of the repo
3168    /// - `repo`: name of the repo
3169    pub fn repo_list_flags(
3170        &self,
3171        owner: &str,
3172        repo: &str,
3173    ) -> Request<'_, endpoints::RepoListFlags<'_>, Vec<String>> {
3174        endpoints::RepoListFlags { owner, repo }
3175            .make_request()
3176            .wrap::<_, _>(self)
3177    }
3178
3179    /// Replace all flags of a repository
3180    ///
3181    /// - `owner`: owner of the repo
3182    /// - `repo`: name of the repo
3183    /// - `body`: See [`ReplaceFlagsOption`]
3184    pub fn repo_replace_all_flags(
3185        &self,
3186        owner: &str,
3187        repo: &str,
3188        body: ReplaceFlagsOption,
3189    ) -> Request<'_, endpoints::RepoReplaceAllFlags<'_>, ()> {
3190        endpoints::RepoReplaceAllFlags {
3191            owner,
3192            repo,
3193            body: body,
3194        }
3195        .make_request()
3196        .wrap::<_, _>(self)
3197    }
3198
3199    /// Remove all flags from a repository
3200    ///
3201    /// - `owner`: owner of the repo
3202    /// - `repo`: name of the repo
3203    pub fn repo_delete_all_flags(
3204        &self,
3205        owner: &str,
3206        repo: &str,
3207    ) -> Request<'_, endpoints::RepoDeleteAllFlags<'_>, ()> {
3208        endpoints::RepoDeleteAllFlags { owner, repo }
3209            .make_request()
3210            .wrap::<_, _>(self)
3211    }
3212
3213    /// Check if a repository has a given flag
3214    ///
3215    /// - `owner`: owner of the repo
3216    /// - `repo`: name of the repo
3217    /// - `flag`: name of the flag
3218    pub fn repo_check_flag(
3219        &self,
3220        owner: &str,
3221        repo: &str,
3222        flag: &str,
3223    ) -> Request<'_, endpoints::RepoCheckFlag<'_>, ()> {
3224        endpoints::RepoCheckFlag { owner, repo, flag }
3225            .make_request()
3226            .wrap::<_, _>(self)
3227    }
3228
3229    /// Add a flag to a repository
3230    ///
3231    /// - `owner`: owner of the repo
3232    /// - `repo`: name of the repo
3233    /// - `flag`: name of the flag
3234    pub fn repo_add_flag(
3235        &self,
3236        owner: &str,
3237        repo: &str,
3238        flag: &str,
3239    ) -> Request<'_, endpoints::RepoAddFlag<'_>, ()> {
3240        endpoints::RepoAddFlag { owner, repo, flag }
3241            .make_request()
3242            .wrap::<_, _>(self)
3243    }
3244
3245    /// Remove a flag from a repository
3246    ///
3247    /// - `owner`: owner of the repo
3248    /// - `repo`: name of the repo
3249    /// - `flag`: name of the flag
3250    pub fn repo_delete_flag(
3251        &self,
3252        owner: &str,
3253        repo: &str,
3254        flag: &str,
3255    ) -> Request<'_, endpoints::RepoDeleteFlag<'_>, ()> {
3256        endpoints::RepoDeleteFlag { owner, repo, flag }
3257            .make_request()
3258            .wrap::<_, _>(self)
3259    }
3260
3261    /// List a repository's forks
3262    ///
3263    /// - `owner`: owner of the repo
3264    /// - `repo`: name of the repo
3265    pub fn list_forks(
3266        &self,
3267        owner: &str,
3268        repo: &str,
3269    ) -> Request<'_, endpoints::ListForks<'_>, (RepositoryListHeaders, Vec<Repository>)> {
3270        endpoints::ListForks { owner, repo }
3271            .make_request()
3272            .wrap::<_, _>(self)
3273    }
3274
3275    /// Fork a repository
3276    ///
3277    /// - `owner`: owner of the repo to fork
3278    /// - `repo`: name of the repo to fork
3279    /// - `body`: See [`CreateForkOption`]
3280    pub fn create_fork(
3281        &self,
3282        owner: &str,
3283        repo: &str,
3284        body: CreateForkOption,
3285    ) -> Request<'_, endpoints::CreateFork<'_>, Repository> {
3286        endpoints::CreateFork {
3287            owner,
3288            repo,
3289            body: body,
3290        }
3291        .make_request()
3292        .wrap::<_, _>(self)
3293    }
3294
3295    /// Gets multiple blobs of a repository.
3296    ///
3297    /// - `owner`: owner of the repo
3298    /// - `repo`: name of the repo
3299    pub fn get_blobs(
3300        &self,
3301        owner: &str,
3302        repo: &str,
3303        query: GetBlobsQuery,
3304    ) -> Request<'_, endpoints::GetBlobs<'_>, Vec<GitBlob>> {
3305        endpoints::GetBlobs { owner, repo, query }
3306            .make_request()
3307            .wrap::<_, _>(self)
3308    }
3309
3310    /// Gets the blob of a repository.
3311    ///
3312    /// - `owner`: owner of the repo
3313    /// - `repo`: name of the repo
3314    /// - `sha`: sha of the blob to retrieve
3315    pub fn get_blob(
3316        &self,
3317        owner: &str,
3318        repo: &str,
3319        sha: &str,
3320    ) -> Request<'_, endpoints::GetBlob<'_>, GitBlob> {
3321        endpoints::GetBlob { owner, repo, sha }
3322            .make_request()
3323            .wrap::<_, _>(self)
3324    }
3325
3326    /// Get a single commit from a repository
3327    ///
3328    /// - `owner`: owner of the repo
3329    /// - `repo`: name of the repo
3330    /// - `sha`: a git ref or commit sha
3331    pub fn repo_get_single_commit(
3332        &self,
3333        owner: &str,
3334        repo: &str,
3335        sha: &str,
3336        query: RepoGetSingleCommitQuery,
3337    ) -> Request<'_, endpoints::RepoGetSingleCommit<'_>, Commit> {
3338        endpoints::RepoGetSingleCommit {
3339            owner,
3340            repo,
3341            sha,
3342            query,
3343        }
3344        .make_request()
3345        .wrap::<_, _>(self)
3346    }
3347
3348    /// Get a commit's diff or patch
3349    ///
3350    /// - `owner`: owner of the repo
3351    /// - `repo`: name of the repo
3352    /// - `sha`: SHA of the commit to get
3353    /// - `diffType`: whether the output is diff or patch
3354    pub fn repo_download_commit_diff_or_patch(
3355        &self,
3356        owner: &str,
3357        repo: &str,
3358        sha: &str,
3359        diff_type: &str,
3360    ) -> Request<'_, endpoints::RepoDownloadCommitDiffOrPatch<'_>, String> {
3361        endpoints::RepoDownloadCommitDiffOrPatch {
3362            owner,
3363            repo,
3364            sha,
3365            diff_type,
3366        }
3367        .make_request()
3368        .wrap::<_, _>(self)
3369    }
3370
3371    /// Get a note corresponding to a single commit from a repository
3372    ///
3373    /// - `owner`: owner of the repo
3374    /// - `repo`: name of the repo
3375    /// - `sha`: a git ref or commit sha
3376    pub fn repo_get_note(
3377        &self,
3378        owner: &str,
3379        repo: &str,
3380        sha: &str,
3381        query: RepoGetNoteQuery,
3382    ) -> Request<'_, endpoints::RepoGetNote<'_>, Note> {
3383        endpoints::RepoGetNote {
3384            owner,
3385            repo,
3386            sha,
3387            query,
3388        }
3389        .make_request()
3390        .wrap::<_, _>(self)
3391    }
3392
3393    /// Set a note corresponding to a single commit from a repository
3394    ///
3395    /// - `owner`: owner of the repo
3396    /// - `repo`: name of the repo
3397    /// - `sha`: a git ref or commit sha
3398    /// - `body`: See [`NoteOptions`]
3399    pub fn repo_set_note(
3400        &self,
3401        owner: &str,
3402        repo: &str,
3403        sha: &str,
3404        body: NoteOptions,
3405    ) -> Request<'_, endpoints::RepoSetNote<'_>, Note> {
3406        endpoints::RepoSetNote {
3407            owner,
3408            repo,
3409            sha,
3410            body: body,
3411        }
3412        .make_request()
3413        .wrap::<_, _>(self)
3414    }
3415
3416    /// Removes a note corresponding to a single commit from a repository
3417    ///
3418    /// - `owner`: owner of the repo
3419    /// - `repo`: name of the repo
3420    /// - `sha`: a git ref or commit sha
3421    pub fn repo_remove_note(
3422        &self,
3423        owner: &str,
3424        repo: &str,
3425        sha: &str,
3426    ) -> Request<'_, endpoints::RepoRemoveNote<'_>, ()> {
3427        endpoints::RepoRemoveNote { owner, repo, sha }
3428            .make_request()
3429            .wrap::<_, _>(self)
3430    }
3431
3432    /// Get specified ref or filtered repository's refs
3433    ///
3434    /// - `owner`: owner of the repo
3435    /// - `repo`: name of the repo
3436    pub fn repo_list_all_git_refs(
3437        &self,
3438        owner: &str,
3439        repo: &str,
3440    ) -> Request<'_, endpoints::RepoListAllGitRefs<'_>, Vec<Reference>> {
3441        endpoints::RepoListAllGitRefs { owner, repo }
3442            .make_request()
3443            .wrap::<_, _>(self)
3444    }
3445
3446    /// Get specified ref or filtered repository's refs
3447    ///
3448    /// - `owner`: owner of the repo
3449    /// - `repo`: name of the repo
3450    /// - `ref`: part or full name of the ref
3451    pub fn repo_list_git_refs(
3452        &self,
3453        owner: &str,
3454        repo: &str,
3455        r#ref: &str,
3456    ) -> Request<'_, endpoints::RepoListGitRefs<'_>, Vec<Reference>> {
3457        endpoints::RepoListGitRefs { owner, repo, r#ref }
3458            .make_request()
3459            .wrap::<_, _>(self)
3460    }
3461
3462    /// Gets the tag object of an annotated tag (not lightweight tags)
3463    ///
3464    /// - `owner`: owner of the repo
3465    /// - `repo`: name of the repo
3466    /// - `sha`: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.
3467    pub fn get_annotated_tag(
3468        &self,
3469        owner: &str,
3470        repo: &str,
3471        sha: &str,
3472    ) -> Request<'_, endpoints::GetAnnotatedTag<'_>, AnnotatedTag> {
3473        endpoints::GetAnnotatedTag { owner, repo, sha }
3474            .make_request()
3475            .wrap::<_, _>(self)
3476    }
3477
3478    /// Gets the tree of a repository.
3479    ///
3480    /// - `owner`: owner of the repo
3481    /// - `repo`: name of the repo
3482    /// - `sha`: sha of the commit
3483    pub fn get_tree(
3484        &self,
3485        owner: &str,
3486        repo: &str,
3487        sha: &str,
3488        query: GetTreeQuery,
3489    ) -> Request<'_, endpoints::GetTree<'_>, GitTreeResponse> {
3490        endpoints::GetTree {
3491            owner,
3492            repo,
3493            sha,
3494            query,
3495        }
3496        .make_request()
3497        .wrap::<_, _>(self)
3498    }
3499
3500    /// List the hooks in a repository
3501    ///
3502    /// - `owner`: owner of the repo
3503    /// - `repo`: name of the repo
3504    pub fn repo_list_hooks(
3505        &self,
3506        owner: &str,
3507        repo: &str,
3508    ) -> Request<'_, endpoints::RepoListHooks<'_>, (HookListHeaders, Vec<Hook>)> {
3509        endpoints::RepoListHooks { owner, repo }
3510            .make_request()
3511            .wrap::<_, _>(self)
3512    }
3513
3514    /// Create a hook
3515    ///
3516    /// - `owner`: owner of the repo
3517    /// - `repo`: name of the repo
3518    /// - `body`: See [`CreateHookOption`]
3519    pub fn repo_create_hook(
3520        &self,
3521        owner: &str,
3522        repo: &str,
3523        body: CreateHookOption,
3524    ) -> Request<'_, endpoints::RepoCreateHook<'_>, Hook> {
3525        endpoints::RepoCreateHook {
3526            owner,
3527            repo,
3528            body: body,
3529        }
3530        .make_request()
3531        .wrap::<_, _>(self)
3532    }
3533
3534    /// List the Git hooks in a repository
3535    ///
3536    /// - `owner`: owner of the repo
3537    /// - `repo`: name of the repo
3538    pub fn repo_list_git_hooks(
3539        &self,
3540        owner: &str,
3541        repo: &str,
3542    ) -> Request<'_, endpoints::RepoListGitHooks<'_>, Vec<GitHook>> {
3543        endpoints::RepoListGitHooks { owner, repo }
3544            .make_request()
3545            .wrap::<_, _>(self)
3546    }
3547
3548    /// Get a Git hook
3549    ///
3550    /// - `owner`: owner of the repo
3551    /// - `repo`: name of the repo
3552    /// - `id`: id of the hook to get
3553    pub fn repo_get_git_hook(
3554        &self,
3555        owner: &str,
3556        repo: &str,
3557        id: &str,
3558    ) -> Request<'_, endpoints::RepoGetGitHook<'_>, GitHook> {
3559        endpoints::RepoGetGitHook { owner, repo, id }
3560            .make_request()
3561            .wrap::<_, _>(self)
3562    }
3563
3564    /// Delete a Git hook in a repository
3565    ///
3566    /// - `owner`: owner of the repo
3567    /// - `repo`: name of the repo
3568    /// - `id`: id of the hook to get
3569    pub fn repo_delete_git_hook(
3570        &self,
3571        owner: &str,
3572        repo: &str,
3573        id: &str,
3574    ) -> Request<'_, endpoints::RepoDeleteGitHook<'_>, ()> {
3575        endpoints::RepoDeleteGitHook { owner, repo, id }
3576            .make_request()
3577            .wrap::<_, _>(self)
3578    }
3579
3580    /// Edit a Git hook in a repository
3581    ///
3582    /// - `owner`: owner of the repo
3583    /// - `repo`: name of the repo
3584    /// - `id`: id of the hook to get
3585    /// - `body`: See [`EditGitHookOption`]
3586    pub fn repo_edit_git_hook(
3587        &self,
3588        owner: &str,
3589        repo: &str,
3590        id: &str,
3591        body: EditGitHookOption,
3592    ) -> Request<'_, endpoints::RepoEditGitHook<'_>, GitHook> {
3593        endpoints::RepoEditGitHook {
3594            owner,
3595            repo,
3596            id,
3597            body: body,
3598        }
3599        .make_request()
3600        .wrap::<_, _>(self)
3601    }
3602
3603    /// Get a hook
3604    ///
3605    /// - `owner`: owner of the repo
3606    /// - `repo`: name of the repo
3607    /// - `id`: id of the hook to get
3608    pub fn repo_get_hook(
3609        &self,
3610        owner: &str,
3611        repo: &str,
3612        id: i64,
3613    ) -> Request<'_, endpoints::RepoGetHook<'_>, Hook> {
3614        endpoints::RepoGetHook { owner, repo, id }
3615            .make_request()
3616            .wrap::<_, _>(self)
3617    }
3618
3619    /// Delete a hook in a repository
3620    ///
3621    /// - `owner`: owner of the repo
3622    /// - `repo`: name of the repo
3623    /// - `id`: id of the hook to delete
3624    pub fn repo_delete_hook(
3625        &self,
3626        owner: &str,
3627        repo: &str,
3628        id: i64,
3629    ) -> Request<'_, endpoints::RepoDeleteHook<'_>, ()> {
3630        endpoints::RepoDeleteHook { owner, repo, id }
3631            .make_request()
3632            .wrap::<_, _>(self)
3633    }
3634
3635    /// Edit a hook in a repository
3636    ///
3637    /// - `owner`: owner of the repo
3638    /// - `repo`: name of the repo
3639    /// - `id`: index of the hook
3640    /// - `body`: See [`EditHookOption`]
3641    pub fn repo_edit_hook(
3642        &self,
3643        owner: &str,
3644        repo: &str,
3645        id: i64,
3646        body: EditHookOption,
3647    ) -> Request<'_, endpoints::RepoEditHook<'_>, Hook> {
3648        endpoints::RepoEditHook {
3649            owner,
3650            repo,
3651            id,
3652            body: body,
3653        }
3654        .make_request()
3655        .wrap::<_, _>(self)
3656    }
3657
3658    /// Test a push webhook
3659    ///
3660    /// - `owner`: owner of the repo
3661    /// - `repo`: name of the repo
3662    /// - `id`: id of the hook to test
3663    pub fn repo_test_hook(
3664        &self,
3665        owner: &str,
3666        repo: &str,
3667        id: i64,
3668        query: RepoTestHookQuery,
3669    ) -> Request<'_, endpoints::RepoTestHook<'_>, ()> {
3670        endpoints::RepoTestHook {
3671            owner,
3672            repo,
3673            id,
3674            query,
3675        }
3676        .make_request()
3677        .wrap::<_, _>(self)
3678    }
3679
3680    /// Returns the issue config for a repo
3681    ///
3682    /// - `owner`: owner of the repo
3683    /// - `repo`: name of the repo
3684    pub fn repo_get_issue_config(
3685        &self,
3686        owner: &str,
3687        repo: &str,
3688    ) -> Request<'_, endpoints::RepoGetIssueConfig<'_>, IssueConfig> {
3689        endpoints::RepoGetIssueConfig { owner, repo }
3690            .make_request()
3691            .wrap::<_, _>(self)
3692    }
3693
3694    /// Returns the validation information for a issue config
3695    ///
3696    /// - `owner`: owner of the repo
3697    /// - `repo`: name of the repo
3698    pub fn repo_validate_issue_config(
3699        &self,
3700        owner: &str,
3701        repo: &str,
3702    ) -> Request<'_, endpoints::RepoValidateIssueConfig<'_>, IssueConfigValidation> {
3703        endpoints::RepoValidateIssueConfig { owner, repo }
3704            .make_request()
3705            .wrap::<_, _>(self)
3706    }
3707
3708    /// Get available issue templates for a repository
3709    ///
3710    /// - `owner`: owner of the repo
3711    /// - `repo`: name of the repo
3712    pub fn repo_get_issue_templates(
3713        &self,
3714        owner: &str,
3715        repo: &str,
3716    ) -> Request<'_, endpoints::RepoGetIssueTemplates<'_>, Vec<IssueTemplate>> {
3717        endpoints::RepoGetIssueTemplates { owner, repo }
3718            .make_request()
3719            .wrap::<_, _>(self)
3720    }
3721
3722    /// List a repository's issues
3723    ///
3724    /// - `owner`: owner of the repo
3725    /// - `repo`: name of the repo
3726    pub fn issue_list_issues(
3727        &self,
3728        owner: &str,
3729        repo: &str,
3730        query: IssueListIssuesQuery,
3731    ) -> Request<'_, endpoints::IssueListIssues<'_>, (IssueListHeaders, Vec<Issue>)> {
3732        endpoints::IssueListIssues { owner, repo, query }
3733            .make_request()
3734            .wrap::<_, _>(self)
3735    }
3736
3737    /// Create an issue. If using deadline only the date will be taken into account, and time of day ignored.
3738    ///
3739    /// - `owner`: owner of the repo
3740    /// - `repo`: name of the repo
3741    /// - `body`: See [`CreateIssueOption`]
3742    pub fn issue_create_issue(
3743        &self,
3744        owner: &str,
3745        repo: &str,
3746        body: CreateIssueOption,
3747    ) -> Request<'_, endpoints::IssueCreateIssue<'_>, Issue> {
3748        endpoints::IssueCreateIssue {
3749            owner,
3750            repo,
3751            body: body,
3752        }
3753        .make_request()
3754        .wrap::<_, _>(self)
3755    }
3756
3757    /// List all comments in a repository
3758    ///
3759    /// - `owner`: owner of the repo
3760    /// - `repo`: name of the repo
3761    pub fn issue_get_repo_comments(
3762        &self,
3763        owner: &str,
3764        repo: &str,
3765        query: IssueGetRepoCommentsQuery,
3766    ) -> Request<'_, endpoints::IssueGetRepoComments<'_>, (CommentListHeaders, Vec<Comment>)> {
3767        endpoints::IssueGetRepoComments { owner, repo, query }
3768            .make_request()
3769            .wrap::<_, _>(self)
3770    }
3771
3772    /// Get a comment
3773    ///
3774    /// - `owner`: owner of the repo
3775    /// - `repo`: name of the repo
3776    /// - `id`: id of the comment
3777    pub fn issue_get_comment(
3778        &self,
3779        owner: &str,
3780        repo: &str,
3781        id: i64,
3782    ) -> Request<'_, endpoints::IssueGetComment<'_>, Option<Comment>> {
3783        endpoints::IssueGetComment { owner, repo, id }
3784            .make_request()
3785            .wrap::<_, _>(self)
3786    }
3787
3788    /// Delete a comment
3789    ///
3790    /// - `owner`: owner of the repo
3791    /// - `repo`: name of the repo
3792    /// - `id`: id of comment to delete
3793    pub fn issue_delete_comment(
3794        &self,
3795        owner: &str,
3796        repo: &str,
3797        id: i64,
3798    ) -> Request<'_, endpoints::IssueDeleteComment<'_>, ()> {
3799        endpoints::IssueDeleteComment { owner, repo, id }
3800            .make_request()
3801            .wrap::<_, _>(self)
3802    }
3803
3804    /// Edit a comment
3805    ///
3806    /// - `owner`: owner of the repo
3807    /// - `repo`: name of the repo
3808    /// - `id`: id of the comment to edit
3809    /// - `body`: See [`EditIssueCommentOption`]
3810    pub fn issue_edit_comment(
3811        &self,
3812        owner: &str,
3813        repo: &str,
3814        id: i64,
3815        body: EditIssueCommentOption,
3816    ) -> Request<'_, endpoints::IssueEditComment<'_>, Option<Comment>> {
3817        endpoints::IssueEditComment {
3818            owner,
3819            repo,
3820            id,
3821            body: body,
3822        }
3823        .make_request()
3824        .wrap::<_, _>(self)
3825    }
3826
3827    /// List comment's attachments
3828    ///
3829    /// - `owner`: owner of the repo
3830    /// - `repo`: name of the repo
3831    /// - `id`: id of the comment
3832    pub fn issue_list_issue_comment_attachments(
3833        &self,
3834        owner: &str,
3835        repo: &str,
3836        id: i64,
3837    ) -> Request<'_, endpoints::IssueListIssueCommentAttachments<'_>, Vec<Attachment>> {
3838        endpoints::IssueListIssueCommentAttachments { owner, repo, id }
3839            .make_request()
3840            .wrap::<_, _>(self)
3841    }
3842
3843    /// Create a comment attachment
3844    ///
3845    /// - `owner`: owner of the repo
3846    /// - `repo`: name of the repo
3847    /// - `id`: id of the comment
3848    /// - `attachment`: attachment to upload
3849    pub fn issue_create_issue_comment_attachment(
3850        &self,
3851        owner: &str,
3852        repo: &str,
3853        id: i64,
3854        attachment: &[u8],
3855        query: IssueCreateIssueCommentAttachmentQuery,
3856    ) -> Request<'_, endpoints::IssueCreateIssueCommentAttachment<'_>, Attachment> {
3857        endpoints::IssueCreateIssueCommentAttachment {
3858            owner,
3859            repo,
3860            id,
3861            attachment: &attachment,
3862            query,
3863        }
3864        .make_request()
3865        .wrap::<_, _>(self)
3866    }
3867
3868    /// Get a comment attachment
3869    ///
3870    /// - `owner`: owner of the repo
3871    /// - `repo`: name of the repo
3872    /// - `id`: id of the comment
3873    /// - `attachment_id`: id of the attachment to get
3874    pub fn issue_get_issue_comment_attachment(
3875        &self,
3876        owner: &str,
3877        repo: &str,
3878        id: i64,
3879        attachment_id: i64,
3880    ) -> Request<'_, endpoints::IssueGetIssueCommentAttachment<'_>, Attachment> {
3881        endpoints::IssueGetIssueCommentAttachment {
3882            owner,
3883            repo,
3884            id,
3885            attachment_id,
3886        }
3887        .make_request()
3888        .wrap::<_, _>(self)
3889    }
3890
3891    /// Delete a comment attachment
3892    ///
3893    /// - `owner`: owner of the repo
3894    /// - `repo`: name of the repo
3895    /// - `id`: id of the comment
3896    /// - `attachment_id`: id of the attachment to delete
3897    pub fn issue_delete_issue_comment_attachment(
3898        &self,
3899        owner: &str,
3900        repo: &str,
3901        id: i64,
3902        attachment_id: i64,
3903    ) -> Request<'_, endpoints::IssueDeleteIssueCommentAttachment<'_>, ()> {
3904        endpoints::IssueDeleteIssueCommentAttachment {
3905            owner,
3906            repo,
3907            id,
3908            attachment_id,
3909        }
3910        .make_request()
3911        .wrap::<_, _>(self)
3912    }
3913
3914    /// Edit a comment attachment
3915    ///
3916    /// - `owner`: owner of the repo
3917    /// - `repo`: name of the repo
3918    /// - `id`: id of the comment
3919    /// - `attachment_id`: id of the attachment to edit
3920    /// - `body`: See [`EditAttachmentOptions`]
3921    pub fn issue_edit_issue_comment_attachment(
3922        &self,
3923        owner: &str,
3924        repo: &str,
3925        id: i64,
3926        attachment_id: i64,
3927        body: EditAttachmentOptions,
3928    ) -> Request<'_, endpoints::IssueEditIssueCommentAttachment<'_>, Attachment> {
3929        endpoints::IssueEditIssueCommentAttachment {
3930            owner,
3931            repo,
3932            id,
3933            attachment_id,
3934            body: body,
3935        }
3936        .make_request()
3937        .wrap::<_, _>(self)
3938    }
3939
3940    /// Get a list of reactions from a comment of an issue
3941    ///
3942    /// - `owner`: owner of the repo
3943    /// - `repo`: name of the repo
3944    /// - `id`: id of the comment to edit
3945    pub fn issue_get_comment_reactions(
3946        &self,
3947        owner: &str,
3948        repo: &str,
3949        id: i64,
3950    ) -> Request<'_, endpoints::IssueGetCommentReactions<'_>, Vec<Reaction>> {
3951        endpoints::IssueGetCommentReactions { owner, repo, id }
3952            .make_request()
3953            .wrap::<_, _>(self)
3954    }
3955
3956    /// Add a reaction to a comment of an issue
3957    ///
3958    /// - `owner`: owner of the repo
3959    /// - `repo`: name of the repo
3960    /// - `id`: id of the comment to edit
3961    /// - `content`: See [`EditReactionOption`]
3962    pub fn issue_post_comment_reaction(
3963        &self,
3964        owner: &str,
3965        repo: &str,
3966        id: i64,
3967        content: EditReactionOption,
3968    ) -> Request<'_, endpoints::IssuePostCommentReaction<'_>, Reaction> {
3969        endpoints::IssuePostCommentReaction {
3970            owner,
3971            repo,
3972            id,
3973            body: content,
3974        }
3975        .make_request()
3976        .wrap::<_, _>(self)
3977    }
3978
3979    /// Remove a reaction from a comment of an issue
3980    ///
3981    /// - `owner`: owner of the repo
3982    /// - `repo`: name of the repo
3983    /// - `id`: id of the comment to edit
3984    /// - `content`: See [`EditReactionOption`]
3985    pub fn issue_delete_comment_reaction(
3986        &self,
3987        owner: &str,
3988        repo: &str,
3989        id: i64,
3990        content: EditReactionOption,
3991    ) -> Request<'_, endpoints::IssueDeleteCommentReaction<'_>, ()> {
3992        endpoints::IssueDeleteCommentReaction {
3993            owner,
3994            repo,
3995            id,
3996            body: content,
3997        }
3998        .make_request()
3999        .wrap::<_, _>(self)
4000    }
4001
4002    /// List a repo's pinned issues
4003    ///
4004    /// - `owner`: owner of the repo
4005    /// - `repo`: name of the repo
4006    pub fn repo_list_pinned_issues(
4007        &self,
4008        owner: &str,
4009        repo: &str,
4010    ) -> Request<'_, endpoints::RepoListPinnedIssues<'_>, Vec<Issue>> {
4011        endpoints::RepoListPinnedIssues { owner, repo }
4012            .make_request()
4013            .wrap::<_, _>(self)
4014    }
4015
4016    /// Get an issue
4017    ///
4018    /// - `owner`: owner of the repo
4019    /// - `repo`: name of the repo
4020    /// - `index`: index of the issue to get
4021    pub fn issue_get_issue(
4022        &self,
4023        owner: &str,
4024        repo: &str,
4025        index: i64,
4026    ) -> Request<'_, endpoints::IssueGetIssue<'_>, Issue> {
4027        endpoints::IssueGetIssue { owner, repo, index }
4028            .make_request()
4029            .wrap::<_, _>(self)
4030    }
4031
4032    /// Delete an issue
4033    ///
4034    /// - `owner`: owner of the repo
4035    /// - `repo`: name of the repo
4036    /// - `index`: index of issue to delete
4037    pub fn issue_delete(
4038        &self,
4039        owner: &str,
4040        repo: &str,
4041        index: i64,
4042    ) -> Request<'_, endpoints::IssueDelete<'_>, ()> {
4043        endpoints::IssueDelete { owner, repo, index }
4044            .make_request()
4045            .wrap::<_, _>(self)
4046    }
4047
4048    /// Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.
4049    ///
4050    /// - `owner`: owner of the repo
4051    /// - `repo`: name of the repo
4052    /// - `index`: index of the issue to edit
4053    /// - `body`: See [`EditIssueOption`]
4054    pub fn issue_edit_issue(
4055        &self,
4056        owner: &str,
4057        repo: &str,
4058        index: i64,
4059        body: EditIssueOption,
4060    ) -> Request<'_, endpoints::IssueEditIssue<'_>, Issue> {
4061        endpoints::IssueEditIssue {
4062            owner,
4063            repo,
4064            index,
4065            body: body,
4066        }
4067        .make_request()
4068        .wrap::<_, _>(self)
4069    }
4070
4071    /// List issue's attachments
4072    ///
4073    /// - `owner`: owner of the repo
4074    /// - `repo`: name of the repo
4075    /// - `index`: index of the issue
4076    pub fn issue_list_issue_attachments(
4077        &self,
4078        owner: &str,
4079        repo: &str,
4080        index: i64,
4081    ) -> Request<'_, endpoints::IssueListIssueAttachments<'_>, Vec<Attachment>> {
4082        endpoints::IssueListIssueAttachments { owner, repo, index }
4083            .make_request()
4084            .wrap::<_, _>(self)
4085    }
4086
4087    /// Create an issue attachment
4088    ///
4089    /// - `owner`: owner of the repo
4090    /// - `repo`: name of the repo
4091    /// - `index`: index of the issue
4092    /// - `attachment`: attachment to upload
4093    pub fn issue_create_issue_attachment(
4094        &self,
4095        owner: &str,
4096        repo: &str,
4097        index: i64,
4098        attachment: &[u8],
4099        query: IssueCreateIssueAttachmentQuery,
4100    ) -> Request<'_, endpoints::IssueCreateIssueAttachment<'_>, Attachment> {
4101        endpoints::IssueCreateIssueAttachment {
4102            owner,
4103            repo,
4104            index,
4105            attachment: &attachment,
4106            query,
4107        }
4108        .make_request()
4109        .wrap::<_, _>(self)
4110    }
4111
4112    /// Get an issue attachment
4113    ///
4114    /// - `owner`: owner of the repo
4115    /// - `repo`: name of the repo
4116    /// - `index`: index of the issue
4117    /// - `attachment_id`: id of the attachment to get
4118    pub fn issue_get_issue_attachment(
4119        &self,
4120        owner: &str,
4121        repo: &str,
4122        index: i64,
4123        attachment_id: i64,
4124    ) -> Request<'_, endpoints::IssueGetIssueAttachment<'_>, Attachment> {
4125        endpoints::IssueGetIssueAttachment {
4126            owner,
4127            repo,
4128            index,
4129            attachment_id,
4130        }
4131        .make_request()
4132        .wrap::<_, _>(self)
4133    }
4134
4135    /// Delete an issue attachment
4136    ///
4137    /// - `owner`: owner of the repo
4138    /// - `repo`: name of the repo
4139    /// - `index`: index of the issue
4140    /// - `attachment_id`: id of the attachment to delete
4141    pub fn issue_delete_issue_attachment(
4142        &self,
4143        owner: &str,
4144        repo: &str,
4145        index: i64,
4146        attachment_id: i64,
4147    ) -> Request<'_, endpoints::IssueDeleteIssueAttachment<'_>, ()> {
4148        endpoints::IssueDeleteIssueAttachment {
4149            owner,
4150            repo,
4151            index,
4152            attachment_id,
4153        }
4154        .make_request()
4155        .wrap::<_, _>(self)
4156    }
4157
4158    /// Edit an issue attachment
4159    ///
4160    /// - `owner`: owner of the repo
4161    /// - `repo`: name of the repo
4162    /// - `index`: index of the issue
4163    /// - `attachment_id`: id of the attachment to edit
4164    /// - `body`: See [`EditAttachmentOptions`]
4165    pub fn issue_edit_issue_attachment(
4166        &self,
4167        owner: &str,
4168        repo: &str,
4169        index: i64,
4170        attachment_id: i64,
4171        body: EditAttachmentOptions,
4172    ) -> Request<'_, endpoints::IssueEditIssueAttachment<'_>, Attachment> {
4173        endpoints::IssueEditIssueAttachment {
4174            owner,
4175            repo,
4176            index,
4177            attachment_id,
4178            body: body,
4179        }
4180        .make_request()
4181        .wrap::<_, _>(self)
4182    }
4183
4184    /// List issues that are blocked by this issue
4185    ///
4186    /// - `owner`: owner of the repo
4187    /// - `repo`: name of the repo
4188    /// - `index`: index of the issue
4189    pub fn issue_list_blocks(
4190        &self,
4191        owner: &str,
4192        repo: &str,
4193        index: i64,
4194    ) -> Request<'_, endpoints::IssueListBlocks<'_>, Vec<Issue>> {
4195        endpoints::IssueListBlocks { owner, repo, index }
4196            .make_request()
4197            .wrap::<_, _>(self)
4198    }
4199
4200    /// Block the issue given in the body by the issue in path
4201    ///
4202    /// - `owner`: owner of the repo
4203    /// - `repo`: name of the repo
4204    /// - `index`: index of the issue
4205    /// - `body`: See [`IssueMeta`]
4206    pub fn issue_create_issue_blocking(
4207        &self,
4208        owner: &str,
4209        repo: &str,
4210        index: i64,
4211        body: IssueMeta,
4212    ) -> Request<'_, endpoints::IssueCreateIssueBlocking<'_>, Issue> {
4213        endpoints::IssueCreateIssueBlocking {
4214            owner,
4215            repo,
4216            index,
4217            body: body,
4218        }
4219        .make_request()
4220        .wrap::<_, _>(self)
4221    }
4222
4223    /// Unblock the issue given in the body by the issue in path
4224    ///
4225    /// - `owner`: owner of the repo
4226    /// - `repo`: name of the repo
4227    /// - `index`: index of the issue
4228    /// - `body`: See [`IssueMeta`]
4229    pub fn issue_remove_issue_blocking(
4230        &self,
4231        owner: &str,
4232        repo: &str,
4233        index: i64,
4234        body: IssueMeta,
4235    ) -> Request<'_, endpoints::IssueRemoveIssueBlocking<'_>, Issue> {
4236        endpoints::IssueRemoveIssueBlocking {
4237            owner,
4238            repo,
4239            index,
4240            body: body,
4241        }
4242        .make_request()
4243        .wrap::<_, _>(self)
4244    }
4245
4246    /// List all comments on an issue
4247    ///
4248    /// - `owner`: owner of the repo
4249    /// - `repo`: name of the repo
4250    /// - `index`: index of the issue
4251    pub fn issue_get_comments(
4252        &self,
4253        owner: &str,
4254        repo: &str,
4255        index: i64,
4256        query: IssueGetCommentsQuery,
4257    ) -> Request<'_, endpoints::IssueGetComments<'_>, (CommentListHeaders, Vec<Comment>)> {
4258        endpoints::IssueGetComments {
4259            owner,
4260            repo,
4261            index,
4262            query,
4263        }
4264        .make_request()
4265        .wrap::<_, _>(self)
4266    }
4267
4268    /// Add a comment to an issue
4269    ///
4270    /// - `owner`: owner of the repo
4271    /// - `repo`: name of the repo
4272    /// - `index`: index of the issue
4273    /// - `body`: See [`CreateIssueCommentOption`]
4274    pub fn issue_create_comment(
4275        &self,
4276        owner: &str,
4277        repo: &str,
4278        index: i64,
4279        body: CreateIssueCommentOption,
4280    ) -> Request<'_, endpoints::IssueCreateComment<'_>, Comment> {
4281        endpoints::IssueCreateComment {
4282            owner,
4283            repo,
4284            index,
4285            body: body,
4286        }
4287        .make_request()
4288        .wrap::<_, _>(self)
4289    }
4290
4291    /// Delete a comment
4292    ///
4293    /// - `owner`: owner of the repo
4294    /// - `repo`: name of the repo
4295    /// - `index`: this parameter is ignored
4296    /// - `id`: id of comment to delete
4297    pub fn issue_delete_comment_deprecated(
4298        &self,
4299        owner: &str,
4300        repo: &str,
4301        index: u32,
4302        id: i64,
4303    ) -> Request<'_, endpoints::IssueDeleteCommentDeprecated<'_>, ()> {
4304        endpoints::IssueDeleteCommentDeprecated {
4305            owner,
4306            repo,
4307            index,
4308            id,
4309        }
4310        .make_request()
4311        .wrap::<_, _>(self)
4312    }
4313
4314    /// Edit a comment
4315    ///
4316    /// - `owner`: owner of the repo
4317    /// - `repo`: name of the repo
4318    /// - `index`: this parameter is ignored
4319    /// - `id`: id of the comment to edit
4320    /// - `body`: See [`EditIssueCommentOption`]
4321    pub fn issue_edit_comment_deprecated(
4322        &self,
4323        owner: &str,
4324        repo: &str,
4325        index: u32,
4326        id: i64,
4327        body: EditIssueCommentOption,
4328    ) -> Request<'_, endpoints::IssueEditCommentDeprecated<'_>, Option<Comment>> {
4329        endpoints::IssueEditCommentDeprecated {
4330            owner,
4331            repo,
4332            index,
4333            id,
4334            body: body,
4335        }
4336        .make_request()
4337        .wrap::<_, _>(self)
4338    }
4339
4340    /// Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.
4341    ///
4342    /// - `owner`: owner of the repo
4343    /// - `repo`: name of the repo
4344    /// - `index`: index of the issue to create or update a deadline on
4345    /// - `body`: See [`EditDeadlineOption`]
4346    pub fn issue_edit_issue_deadline(
4347        &self,
4348        owner: &str,
4349        repo: &str,
4350        index: i64,
4351        body: EditDeadlineOption,
4352    ) -> Request<'_, endpoints::IssueEditIssueDeadline<'_>, IssueDeadline> {
4353        endpoints::IssueEditIssueDeadline {
4354            owner,
4355            repo,
4356            index,
4357            body: body,
4358        }
4359        .make_request()
4360        .wrap::<_, _>(self)
4361    }
4362
4363    /// List an issue's dependencies, i.e all issues that block this issue.
4364    ///
4365    /// - `owner`: owner of the repo
4366    /// - `repo`: name of the repo
4367    /// - `index`: index of the issue
4368    pub fn issue_list_issue_dependencies(
4369        &self,
4370        owner: &str,
4371        repo: &str,
4372        index: i64,
4373    ) -> Request<'_, endpoints::IssueListIssueDependencies<'_>, Vec<Issue>> {
4374        endpoints::IssueListIssueDependencies { owner, repo, index }
4375            .make_request()
4376            .wrap::<_, _>(self)
4377    }
4378
4379    /// Make the issue in the url depend on the issue in the form.
4380    ///
4381    /// - `owner`: owner of the repo
4382    /// - `repo`: name of the repo
4383    /// - `index`: index of the issue
4384    /// - `body`: See [`IssueMeta`]
4385    pub fn issue_create_issue_dependencies(
4386        &self,
4387        owner: &str,
4388        repo: &str,
4389        index: i64,
4390        body: IssueMeta,
4391    ) -> Request<'_, endpoints::IssueCreateIssueDependencies<'_>, Issue> {
4392        endpoints::IssueCreateIssueDependencies {
4393            owner,
4394            repo,
4395            index,
4396            body: body,
4397        }
4398        .make_request()
4399        .wrap::<_, _>(self)
4400    }
4401
4402    /// Remove an issue dependency
4403    ///
4404    /// - `owner`: owner of the repo
4405    /// - `repo`: name of the repo
4406    /// - `index`: index of the issue
4407    /// - `body`: See [`IssueMeta`]
4408    pub fn issue_remove_issue_dependencies(
4409        &self,
4410        owner: &str,
4411        repo: &str,
4412        index: i64,
4413        body: IssueMeta,
4414    ) -> Request<'_, endpoints::IssueRemoveIssueDependencies<'_>, Issue> {
4415        endpoints::IssueRemoveIssueDependencies {
4416            owner,
4417            repo,
4418            index,
4419            body: body,
4420        }
4421        .make_request()
4422        .wrap::<_, _>(self)
4423    }
4424
4425    /// Get an issue's labels
4426    ///
4427    /// - `owner`: owner of the repo
4428    /// - `repo`: name of the repo
4429    /// - `index`: index of the issue
4430    pub fn issue_get_labels(
4431        &self,
4432        owner: &str,
4433        repo: &str,
4434        index: i64,
4435    ) -> Request<'_, endpoints::IssueGetLabels<'_>, Vec<Label>> {
4436        endpoints::IssueGetLabels { owner, repo, index }
4437            .make_request()
4438            .wrap::<_, _>(self)
4439    }
4440
4441    /// Replace an issue's labels
4442    ///
4443    /// - `owner`: owner of the repo
4444    /// - `repo`: name of the repo
4445    /// - `index`: index of the issue
4446    /// - `body`: See [`IssueLabelsOption`]
4447    pub fn issue_replace_labels(
4448        &self,
4449        owner: &str,
4450        repo: &str,
4451        index: i64,
4452        body: IssueLabelsOption,
4453    ) -> Request<'_, endpoints::IssueReplaceLabels<'_>, Vec<Label>> {
4454        endpoints::IssueReplaceLabels {
4455            owner,
4456            repo,
4457            index,
4458            body: body,
4459        }
4460        .make_request()
4461        .wrap::<_, _>(self)
4462    }
4463
4464    /// Add a label to an issue
4465    ///
4466    /// - `owner`: owner of the repo
4467    /// - `repo`: name of the repo
4468    /// - `index`: index of the issue
4469    /// - `body`: See [`IssueLabelsOption`]
4470    pub fn issue_add_label(
4471        &self,
4472        owner: &str,
4473        repo: &str,
4474        index: i64,
4475        body: IssueLabelsOption,
4476    ) -> Request<'_, endpoints::IssueAddLabel<'_>, Vec<Label>> {
4477        endpoints::IssueAddLabel {
4478            owner,
4479            repo,
4480            index,
4481            body: body,
4482        }
4483        .make_request()
4484        .wrap::<_, _>(self)
4485    }
4486
4487    /// Remove all labels from an issue
4488    ///
4489    /// - `owner`: owner of the repo
4490    /// - `repo`: name of the repo
4491    /// - `index`: index of the issue
4492    /// - `body`: See [`DeleteLabelsOption`]
4493    pub fn issue_clear_labels(
4494        &self,
4495        owner: &str,
4496        repo: &str,
4497        index: i64,
4498        body: DeleteLabelsOption,
4499    ) -> Request<'_, endpoints::IssueClearLabels<'_>, ()> {
4500        endpoints::IssueClearLabels {
4501            owner,
4502            repo,
4503            index,
4504            body: body,
4505        }
4506        .make_request()
4507        .wrap::<_, _>(self)
4508    }
4509
4510    /// Remove a label from an issue
4511    ///
4512    /// - `owner`: owner of the repo
4513    /// - `repo`: name of the repo
4514    /// - `index`: index of the issue
4515    /// - `identifier`: name or id of the label to remove
4516    /// - `body`: See [`DeleteLabelsOption`]
4517    pub fn issue_remove_label(
4518        &self,
4519        owner: &str,
4520        repo: &str,
4521        index: i64,
4522        identifier: &str,
4523        body: DeleteLabelsOption,
4524    ) -> Request<'_, endpoints::IssueRemoveLabel<'_>, ()> {
4525        endpoints::IssueRemoveLabel {
4526            owner,
4527            repo,
4528            index,
4529            identifier,
4530            body: body,
4531        }
4532        .make_request()
4533        .wrap::<_, _>(self)
4534    }
4535
4536    /// Lock an issue
4537    ///
4538    /// - `owner`: owner of the repo
4539    /// - `repo`: name of the repo
4540    /// - `index`: index of the issue to lock
4541    /// - `body`: See [`IssueLockOption`]
4542    pub fn lock_issue(
4543        &self,
4544        owner: &str,
4545        repo: &str,
4546        index: i64,
4547        body: IssueLockOption,
4548    ) -> Request<'_, endpoints::LockIssue<'_>, ()> {
4549        endpoints::LockIssue {
4550            owner,
4551            repo,
4552            index,
4553            body: body,
4554        }
4555        .make_request()
4556        .wrap::<_, _>(self)
4557    }
4558
4559    /// Unlock an issue
4560    ///
4561    /// - `owner`: owner of the repo
4562    /// - `repo`: name of the repo
4563    /// - `index`: index of the issue to unlock
4564    pub fn unlock_issue(
4565        &self,
4566        owner: &str,
4567        repo: &str,
4568        index: i64,
4569    ) -> Request<'_, endpoints::UnlockIssue<'_>, ()> {
4570        endpoints::UnlockIssue { owner, repo, index }
4571            .make_request()
4572            .wrap::<_, _>(self)
4573    }
4574
4575    /// Pin an Issue
4576    ///
4577    /// - `owner`: owner of the repo
4578    /// - `repo`: name of the repo
4579    /// - `index`: index of issue to pin
4580    pub fn pin_issue(
4581        &self,
4582        owner: &str,
4583        repo: &str,
4584        index: i64,
4585    ) -> Request<'_, endpoints::PinIssue<'_>, ()> {
4586        endpoints::PinIssue { owner, repo, index }
4587            .make_request()
4588            .wrap::<_, _>(self)
4589    }
4590
4591    /// Unpin an Issue
4592    ///
4593    /// - `owner`: owner of the repo
4594    /// - `repo`: name of the repo
4595    /// - `index`: index of issue to unpin
4596    pub fn unpin_issue(
4597        &self,
4598        owner: &str,
4599        repo: &str,
4600        index: i64,
4601    ) -> Request<'_, endpoints::UnpinIssue<'_>, ()> {
4602        endpoints::UnpinIssue { owner, repo, index }
4603            .make_request()
4604            .wrap::<_, _>(self)
4605    }
4606
4607    /// Moves the Pin to the given Position
4608    ///
4609    /// - `owner`: owner of the repo
4610    /// - `repo`: name of the repo
4611    /// - `index`: index of issue
4612    /// - `position`: the new position
4613    pub fn move_issue_pin(
4614        &self,
4615        owner: &str,
4616        repo: &str,
4617        index: i64,
4618        position: i64,
4619    ) -> Request<'_, endpoints::MoveIssuePin<'_>, ()> {
4620        endpoints::MoveIssuePin {
4621            owner,
4622            repo,
4623            index,
4624            position,
4625        }
4626        .make_request()
4627        .wrap::<_, _>(self)
4628    }
4629
4630    /// Get a list reactions of an issue
4631    ///
4632    /// - `owner`: owner of the repo
4633    /// - `repo`: name of the repo
4634    /// - `index`: index of the issue
4635    pub fn issue_get_issue_reactions(
4636        &self,
4637        owner: &str,
4638        repo: &str,
4639        index: i64,
4640    ) -> Request<'_, endpoints::IssueGetIssueReactions<'_>, (ReactionListHeaders, Vec<Reaction>)>
4641    {
4642        endpoints::IssueGetIssueReactions { owner, repo, index }
4643            .make_request()
4644            .wrap::<_, _>(self)
4645    }
4646
4647    /// Add a reaction to an issue
4648    ///
4649    /// - `owner`: owner of the repo
4650    /// - `repo`: name of the repo
4651    /// - `index`: index of the issue
4652    /// - `content`: See [`EditReactionOption`]
4653    pub fn issue_post_issue_reaction(
4654        &self,
4655        owner: &str,
4656        repo: &str,
4657        index: i64,
4658        content: EditReactionOption,
4659    ) -> Request<'_, endpoints::IssuePostIssueReaction<'_>, Reaction> {
4660        endpoints::IssuePostIssueReaction {
4661            owner,
4662            repo,
4663            index,
4664            body: content,
4665        }
4666        .make_request()
4667        .wrap::<_, _>(self)
4668    }
4669
4670    /// Remove a reaction from an issue
4671    ///
4672    /// - `owner`: owner of the repo
4673    /// - `repo`: name of the repo
4674    /// - `index`: index of the issue
4675    /// - `content`: See [`EditReactionOption`]
4676    pub fn issue_delete_issue_reaction(
4677        &self,
4678        owner: &str,
4679        repo: &str,
4680        index: i64,
4681        content: EditReactionOption,
4682    ) -> Request<'_, endpoints::IssueDeleteIssueReaction<'_>, ()> {
4683        endpoints::IssueDeleteIssueReaction {
4684            owner,
4685            repo,
4686            index,
4687            body: content,
4688        }
4689        .make_request()
4690        .wrap::<_, _>(self)
4691    }
4692
4693    /// Delete an issue's existing stopwatch.
4694    ///
4695    /// - `owner`: owner of the repo
4696    /// - `repo`: name of the repo
4697    /// - `index`: index of the issue to stop the stopwatch on
4698    pub fn issue_delete_stop_watch(
4699        &self,
4700        owner: &str,
4701        repo: &str,
4702        index: i64,
4703    ) -> Request<'_, endpoints::IssueDeleteStopWatch<'_>, ()> {
4704        endpoints::IssueDeleteStopWatch { owner, repo, index }
4705            .make_request()
4706            .wrap::<_, _>(self)
4707    }
4708
4709    /// Start stopwatch on an issue.
4710    ///
4711    /// - `owner`: owner of the repo
4712    /// - `repo`: name of the repo
4713    /// - `index`: index of the issue to create the stopwatch on
4714    pub fn issue_start_stop_watch(
4715        &self,
4716        owner: &str,
4717        repo: &str,
4718        index: i64,
4719    ) -> Request<'_, endpoints::IssueStartStopWatch<'_>, ()> {
4720        endpoints::IssueStartStopWatch { owner, repo, index }
4721            .make_request()
4722            .wrap::<_, _>(self)
4723    }
4724
4725    /// Stop an issue's existing stopwatch.
4726    ///
4727    /// - `owner`: owner of the repo
4728    /// - `repo`: name of the repo
4729    /// - `index`: index of the issue to stop the stopwatch on
4730    pub fn issue_stop_stop_watch(
4731        &self,
4732        owner: &str,
4733        repo: &str,
4734        index: i64,
4735    ) -> Request<'_, endpoints::IssueStopStopWatch<'_>, ()> {
4736        endpoints::IssueStopStopWatch { owner, repo, index }
4737            .make_request()
4738            .wrap::<_, _>(self)
4739    }
4740
4741    /// Get users who subscribed on an issue.
4742    ///
4743    /// - `owner`: owner of the repo
4744    /// - `repo`: name of the repo
4745    /// - `index`: index of the issue
4746    pub fn issue_subscriptions(
4747        &self,
4748        owner: &str,
4749        repo: &str,
4750        index: i64,
4751    ) -> Request<'_, endpoints::IssueSubscriptions<'_>, (UserListHeaders, Vec<User>)> {
4752        endpoints::IssueSubscriptions { owner, repo, index }
4753            .make_request()
4754            .wrap::<_, _>(self)
4755    }
4756
4757    /// Check if user is subscribed to an issue
4758    ///
4759    /// - `owner`: owner of the repo
4760    /// - `repo`: name of the repo
4761    /// - `index`: index of the issue
4762    pub fn issue_check_subscription(
4763        &self,
4764        owner: &str,
4765        repo: &str,
4766        index: i64,
4767    ) -> Request<'_, endpoints::IssueCheckSubscription<'_>, WatchInfo> {
4768        endpoints::IssueCheckSubscription { owner, repo, index }
4769            .make_request()
4770            .wrap::<_, _>(self)
4771    }
4772
4773    /// Subscribe user to issue
4774    ///
4775    /// - `owner`: owner of the repo
4776    /// - `repo`: name of the repo
4777    /// - `index`: index of the issue
4778    /// - `user`: user to subscribe
4779    pub fn issue_add_subscription(
4780        &self,
4781        owner: &str,
4782        repo: &str,
4783        index: i64,
4784        user: &str,
4785    ) -> Request<'_, endpoints::IssueAddSubscription<'_>, ()> {
4786        endpoints::IssueAddSubscription {
4787            owner,
4788            repo,
4789            index,
4790            user,
4791        }
4792        .make_request()
4793        .wrap::<_, _>(self)
4794    }
4795
4796    /// Unsubscribe user from issue
4797    ///
4798    /// - `owner`: owner of the repo
4799    /// - `repo`: name of the repo
4800    /// - `index`: index of the issue
4801    /// - `user`: user witch unsubscribe
4802    pub fn issue_delete_subscription(
4803        &self,
4804        owner: &str,
4805        repo: &str,
4806        index: i64,
4807        user: &str,
4808    ) -> Request<'_, endpoints::IssueDeleteSubscription<'_>, ()> {
4809        endpoints::IssueDeleteSubscription {
4810            owner,
4811            repo,
4812            index,
4813            user,
4814        }
4815        .make_request()
4816        .wrap::<_, _>(self)
4817    }
4818
4819    /// List all comments and events on an issue
4820    ///
4821    /// - `owner`: owner of the repo
4822    /// - `repo`: name of the repo
4823    /// - `index`: index of the issue
4824    pub fn issue_get_comments_and_timeline(
4825        &self,
4826        owner: &str,
4827        repo: &str,
4828        index: i64,
4829        query: IssueGetCommentsAndTimelineQuery,
4830    ) -> Request<
4831        '_,
4832        endpoints::IssueGetCommentsAndTimeline<'_>,
4833        (TimelineListHeaders, Vec<TimelineComment>),
4834    > {
4835        endpoints::IssueGetCommentsAndTimeline {
4836            owner,
4837            repo,
4838            index,
4839            query,
4840        }
4841        .make_request()
4842        .wrap::<_, _>(self)
4843    }
4844
4845    /// List an issue's tracked times
4846    ///
4847    /// - `owner`: owner of the repo
4848    /// - `repo`: name of the repo
4849    /// - `index`: index of the issue
4850    pub fn issue_tracked_times(
4851        &self,
4852        owner: &str,
4853        repo: &str,
4854        index: i64,
4855        query: IssueTrackedTimesQuery,
4856    ) -> Request<'_, endpoints::IssueTrackedTimes<'_>, (TrackedTimeListHeaders, Vec<TrackedTime>)>
4857    {
4858        endpoints::IssueTrackedTimes {
4859            owner,
4860            repo,
4861            index,
4862            query,
4863        }
4864        .make_request()
4865        .wrap::<_, _>(self)
4866    }
4867
4868    /// Add tracked time to a issue
4869    ///
4870    /// - `owner`: owner of the repo
4871    /// - `repo`: name of the repo
4872    /// - `index`: index of the issue
4873    /// - `body`: See [`AddTimeOption`]
4874    pub fn issue_add_time(
4875        &self,
4876        owner: &str,
4877        repo: &str,
4878        index: i64,
4879        body: AddTimeOption,
4880    ) -> Request<'_, endpoints::IssueAddTime<'_>, TrackedTime> {
4881        endpoints::IssueAddTime {
4882            owner,
4883            repo,
4884            index,
4885            body: body,
4886        }
4887        .make_request()
4888        .wrap::<_, _>(self)
4889    }
4890
4891    /// Reset a tracked time of an issue
4892    ///
4893    /// - `owner`: owner of the repo
4894    /// - `repo`: name of the repo
4895    /// - `index`: index of the issue to add tracked time to
4896    pub fn issue_reset_time(
4897        &self,
4898        owner: &str,
4899        repo: &str,
4900        index: i64,
4901    ) -> Request<'_, endpoints::IssueResetTime<'_>, ()> {
4902        endpoints::IssueResetTime { owner, repo, index }
4903            .make_request()
4904            .wrap::<_, _>(self)
4905    }
4906
4907    /// Delete specific tracked time
4908    ///
4909    /// - `owner`: owner of the repo
4910    /// - `repo`: name of the repo
4911    /// - `index`: index of the issue
4912    /// - `id`: id of time to delete
4913    pub fn issue_delete_time(
4914        &self,
4915        owner: &str,
4916        repo: &str,
4917        index: i64,
4918        id: i64,
4919    ) -> Request<'_, endpoints::IssueDeleteTime<'_>, ()> {
4920        endpoints::IssueDeleteTime {
4921            owner,
4922            repo,
4923            index,
4924            id,
4925        }
4926        .make_request()
4927        .wrap::<_, _>(self)
4928    }
4929
4930    /// List a repository's keys
4931    ///
4932    /// - `owner`: owner of the repo
4933    /// - `repo`: name of the repo
4934    pub fn repo_list_keys(
4935        &self,
4936        owner: &str,
4937        repo: &str,
4938        query: RepoListKeysQuery,
4939    ) -> Request<'_, endpoints::RepoListKeys<'_>, (DeployKeyListHeaders, Vec<DeployKey>)> {
4940        endpoints::RepoListKeys { owner, repo, query }
4941            .make_request()
4942            .wrap::<_, _>(self)
4943    }
4944
4945    /// Add a key to a repository
4946    ///
4947    /// - `owner`: owner of the repo
4948    /// - `repo`: name of the repo
4949    /// - `body`: See [`CreateKeyOption`]
4950    pub fn repo_create_key(
4951        &self,
4952        owner: &str,
4953        repo: &str,
4954        body: CreateKeyOption,
4955    ) -> Request<'_, endpoints::RepoCreateKey<'_>, DeployKey> {
4956        endpoints::RepoCreateKey {
4957            owner,
4958            repo,
4959            body: body,
4960        }
4961        .make_request()
4962        .wrap::<_, _>(self)
4963    }
4964
4965    /// Get a repository's key by id
4966    ///
4967    /// - `owner`: owner of the repo
4968    /// - `repo`: name of the repo
4969    /// - `id`: id of the key to get
4970    pub fn repo_get_key(
4971        &self,
4972        owner: &str,
4973        repo: &str,
4974        id: i64,
4975    ) -> Request<'_, endpoints::RepoGetKey<'_>, DeployKey> {
4976        endpoints::RepoGetKey { owner, repo, id }
4977            .make_request()
4978            .wrap::<_, _>(self)
4979    }
4980
4981    /// Delete a key from a repository
4982    ///
4983    /// - `owner`: owner of the repo
4984    /// - `repo`: name of the repo
4985    /// - `id`: id of the key to delete
4986    pub fn repo_delete_key(
4987        &self,
4988        owner: &str,
4989        repo: &str,
4990        id: i64,
4991    ) -> Request<'_, endpoints::RepoDeleteKey<'_>, ()> {
4992        endpoints::RepoDeleteKey { owner, repo, id }
4993            .make_request()
4994            .wrap::<_, _>(self)
4995    }
4996
4997    /// Get all of a repository's labels
4998    ///
4999    /// - `owner`: owner of the repo
5000    /// - `repo`: name of the repo
5001    pub fn issue_list_labels(
5002        &self,
5003        owner: &str,
5004        repo: &str,
5005        query: IssueListLabelsQuery,
5006    ) -> Request<'_, endpoints::IssueListLabels<'_>, (LabelListHeaders, Vec<Label>)> {
5007        endpoints::IssueListLabels { owner, repo, query }
5008            .make_request()
5009            .wrap::<_, _>(self)
5010    }
5011
5012    /// Create a label
5013    ///
5014    /// - `owner`: owner of the repo
5015    /// - `repo`: name of the repo
5016    /// - `body`: See [`CreateLabelOption`]
5017    pub fn issue_create_label(
5018        &self,
5019        owner: &str,
5020        repo: &str,
5021        body: CreateLabelOption,
5022    ) -> Request<'_, endpoints::IssueCreateLabel<'_>, Label> {
5023        endpoints::IssueCreateLabel {
5024            owner,
5025            repo,
5026            body: body,
5027        }
5028        .make_request()
5029        .wrap::<_, _>(self)
5030    }
5031
5032    /// Get a single label
5033    ///
5034    /// - `owner`: owner of the repo
5035    /// - `repo`: name of the repo
5036    /// - `id`: id of the label to get
5037    pub fn issue_get_label(
5038        &self,
5039        owner: &str,
5040        repo: &str,
5041        id: i64,
5042    ) -> Request<'_, endpoints::IssueGetLabel<'_>, Label> {
5043        endpoints::IssueGetLabel { owner, repo, id }
5044            .make_request()
5045            .wrap::<_, _>(self)
5046    }
5047
5048    /// Delete a label
5049    ///
5050    /// - `owner`: owner of the repo
5051    /// - `repo`: name of the repo
5052    /// - `id`: id of the label to delete
5053    pub fn issue_delete_label(
5054        &self,
5055        owner: &str,
5056        repo: &str,
5057        id: i64,
5058    ) -> Request<'_, endpoints::IssueDeleteLabel<'_>, ()> {
5059        endpoints::IssueDeleteLabel { owner, repo, id }
5060            .make_request()
5061            .wrap::<_, _>(self)
5062    }
5063
5064    /// Update a label
5065    ///
5066    /// - `owner`: owner of the repo
5067    /// - `repo`: name of the repo
5068    /// - `id`: id of the label to edit
5069    /// - `body`: See [`EditLabelOption`]
5070    pub fn issue_edit_label(
5071        &self,
5072        owner: &str,
5073        repo: &str,
5074        id: i64,
5075        body: EditLabelOption,
5076    ) -> Request<'_, endpoints::IssueEditLabel<'_>, Label> {
5077        endpoints::IssueEditLabel {
5078            owner,
5079            repo,
5080            id,
5081            body: body,
5082        }
5083        .make_request()
5084        .wrap::<_, _>(self)
5085    }
5086
5087    /// Get languages and number of bytes of code written
5088    ///
5089    /// - `owner`: owner of the repo
5090    /// - `repo`: name of the repo
5091    pub fn repo_get_languages(
5092        &self,
5093        owner: &str,
5094        repo: &str,
5095    ) -> Request<'_, endpoints::RepoGetLanguages<'_>, BTreeMap<String, i64>> {
5096        endpoints::RepoGetLanguages { owner, repo }
5097            .make_request()
5098            .wrap::<_, _>(self)
5099    }
5100
5101    /// Get a file or it's LFS object from a repository
5102    ///
5103    /// - `owner`: owner of the repo
5104    /// - `repo`: name of the repo
5105    /// - `filepath`: filepath of the file to get
5106    pub fn repo_get_raw_file_or_lfs(
5107        &self,
5108        owner: &str,
5109        repo: &str,
5110        filepath: &str,
5111        query: RepoGetRawFileOrLfsQuery,
5112    ) -> Request<'_, endpoints::RepoGetRawFileOrLfs<'_>, Bytes> {
5113        endpoints::RepoGetRawFileOrLfs {
5114            owner,
5115            repo,
5116            filepath,
5117            query,
5118        }
5119        .make_request()
5120        .wrap::<_, _>(self)
5121    }
5122
5123    /// Get all of a repository's opened milestones
5124    ///
5125    /// - `owner`: owner of the repo
5126    /// - `repo`: name of the repo
5127    pub fn issue_get_milestones_list(
5128        &self,
5129        owner: &str,
5130        repo: &str,
5131        query: IssueGetMilestonesListQuery,
5132    ) -> Request<'_, endpoints::IssueGetMilestonesList<'_>, (MilestoneListHeaders, Vec<Milestone>)>
5133    {
5134        endpoints::IssueGetMilestonesList { owner, repo, query }
5135            .make_request()
5136            .wrap::<_, _>(self)
5137    }
5138
5139    /// Create a milestone
5140    ///
5141    /// - `owner`: owner of the repo
5142    /// - `repo`: name of the repo
5143    /// - `body`: See [`CreateMilestoneOption`]
5144    pub fn issue_create_milestone(
5145        &self,
5146        owner: &str,
5147        repo: &str,
5148        body: CreateMilestoneOption,
5149    ) -> Request<'_, endpoints::IssueCreateMilestone<'_>, Milestone> {
5150        endpoints::IssueCreateMilestone {
5151            owner,
5152            repo,
5153            body: body,
5154        }
5155        .make_request()
5156        .wrap::<_, _>(self)
5157    }
5158
5159    /// Get a milestone
5160    ///
5161    /// - `owner`: owner of the repo
5162    /// - `repo`: name of the repo
5163    /// - `id`: the milestone to get, identified by ID and if not available by name
5164    pub fn issue_get_milestone(
5165        &self,
5166        owner: &str,
5167        repo: &str,
5168        id: i64,
5169    ) -> Request<'_, endpoints::IssueGetMilestone<'_>, Milestone> {
5170        endpoints::IssueGetMilestone { owner, repo, id }
5171            .make_request()
5172            .wrap::<_, _>(self)
5173    }
5174
5175    /// Delete a milestone
5176    ///
5177    /// - `owner`: owner of the repo
5178    /// - `repo`: name of the repo
5179    /// - `id`: the milestone to delete, identified by ID and if not available by name
5180    pub fn issue_delete_milestone(
5181        &self,
5182        owner: &str,
5183        repo: &str,
5184        id: i64,
5185    ) -> Request<'_, endpoints::IssueDeleteMilestone<'_>, ()> {
5186        endpoints::IssueDeleteMilestone { owner, repo, id }
5187            .make_request()
5188            .wrap::<_, _>(self)
5189    }
5190
5191    /// Update a milestone
5192    ///
5193    /// - `owner`: owner of the repo
5194    /// - `repo`: name of the repo
5195    /// - `id`: the milestone to edit, identified by ID and if not available by name
5196    /// - `body`: See [`EditMilestoneOption`]
5197    pub fn issue_edit_milestone(
5198        &self,
5199        owner: &str,
5200        repo: &str,
5201        id: i64,
5202        body: EditMilestoneOption,
5203    ) -> Request<'_, endpoints::IssueEditMilestone<'_>, Milestone> {
5204        endpoints::IssueEditMilestone {
5205            owner,
5206            repo,
5207            id,
5208            body: body,
5209        }
5210        .make_request()
5211        .wrap::<_, _>(self)
5212    }
5213
5214    /// Sync a mirrored repository
5215    ///
5216    /// - `owner`: owner of the repo to sync
5217    /// - `repo`: name of the repo to sync
5218    pub fn repo_mirror_sync(
5219        &self,
5220        owner: &str,
5221        repo: &str,
5222    ) -> Request<'_, endpoints::RepoMirrorSync<'_>, ()> {
5223        endpoints::RepoMirrorSync { owner, repo }
5224            .make_request()
5225            .wrap::<_, _>(self)
5226    }
5227
5228    /// Returns if new Issue Pins are allowed
5229    ///
5230    /// - `owner`: owner of the repo
5231    /// - `repo`: name of the repo
5232    pub fn repo_new_pin_allowed(
5233        &self,
5234        owner: &str,
5235        repo: &str,
5236    ) -> Request<'_, endpoints::RepoNewPinAllowed<'_>, NewIssuePinsAllowed> {
5237        endpoints::RepoNewPinAllowed { owner, repo }
5238            .make_request()
5239            .wrap::<_, _>(self)
5240    }
5241
5242    /// List users's notification threads on a specific repo
5243    ///
5244    /// - `owner`: owner of the repo
5245    /// - `repo`: name of the repo
5246    pub fn notify_get_repo_list(
5247        &self,
5248        owner: &str,
5249        repo: &str,
5250        query: NotifyGetRepoListQuery,
5251    ) -> Request<
5252        '_,
5253        endpoints::NotifyGetRepoList<'_>,
5254        (NotificationThreadListHeaders, Vec<NotificationThread>),
5255    > {
5256        endpoints::NotifyGetRepoList { owner, repo, query }
5257            .make_request()
5258            .wrap::<_, _>(self)
5259    }
5260
5261    /// Mark notification threads as read, pinned or unread on a specific repo
5262    ///
5263    /// - `owner`: owner of the repo
5264    /// - `repo`: name of the repo
5265    pub fn notify_read_repo_list(
5266        &self,
5267        owner: &str,
5268        repo: &str,
5269        query: NotifyReadRepoListQuery,
5270    ) -> Request<'_, endpoints::NotifyReadRepoList<'_>, Vec<NotificationThread>> {
5271        endpoints::NotifyReadRepoList { owner, repo, query }
5272            .make_request()
5273            .wrap::<_, _>(self)
5274    }
5275
5276    /// List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results.
5277    ///
5278    /// - `owner`: Owner of the repo
5279    /// - `repo`: Name of the repo
5280    pub fn repo_list_pull_requests(
5281        &self,
5282        owner: &str,
5283        repo: &str,
5284        query: RepoListPullRequestsQuery,
5285    ) -> Request<'_, endpoints::RepoListPullRequests<'_>, (PullRequestListHeaders, Vec<PullRequest>)>
5286    {
5287        endpoints::RepoListPullRequests { owner, repo, query }
5288            .make_request()
5289            .wrap::<_, _>(self)
5290    }
5291
5292    /// Create a pull request
5293    ///
5294    /// - `owner`: owner of the repo
5295    /// - `repo`: name of the repo
5296    /// - `body`: See [`CreatePullRequestOption`]
5297    pub fn repo_create_pull_request(
5298        &self,
5299        owner: &str,
5300        repo: &str,
5301        body: CreatePullRequestOption,
5302    ) -> Request<'_, endpoints::RepoCreatePullRequest<'_>, PullRequest> {
5303        endpoints::RepoCreatePullRequest {
5304            owner,
5305            repo,
5306            body: body,
5307        }
5308        .make_request()
5309        .wrap::<_, _>(self)
5310    }
5311
5312    /// List a repo's pinned pull requests
5313    ///
5314    /// - `owner`: owner of the repo
5315    /// - `repo`: name of the repo
5316    pub fn repo_list_pinned_pull_requests(
5317        &self,
5318        owner: &str,
5319        repo: &str,
5320    ) -> Request<
5321        '_,
5322        endpoints::RepoListPinnedPullRequests<'_>,
5323        (PullRequestListHeaders, Vec<PullRequest>),
5324    > {
5325        endpoints::RepoListPinnedPullRequests { owner, repo }
5326            .make_request()
5327            .wrap::<_, _>(self)
5328    }
5329
5330    /// Get a pull request by base and head
5331    ///
5332    /// - `owner`: owner of the repo
5333    /// - `repo`: name of the repo
5334    /// - `base`: base of the pull request to get
5335    /// - `head`: head of the pull request to get
5336    pub fn repo_get_pull_request_by_base_head(
5337        &self,
5338        owner: &str,
5339        repo: &str,
5340        base: &str,
5341        head: &str,
5342    ) -> Request<'_, endpoints::RepoGetPullRequestByBaseHead<'_>, PullRequest> {
5343        endpoints::RepoGetPullRequestByBaseHead {
5344            owner,
5345            repo,
5346            base,
5347            head,
5348        }
5349        .make_request()
5350        .wrap::<_, _>(self)
5351    }
5352
5353    /// Get a pull request
5354    ///
5355    /// - `owner`: owner of the repo
5356    /// - `repo`: name of the repo
5357    /// - `index`: index of the pull request to get
5358    pub fn repo_get_pull_request(
5359        &self,
5360        owner: &str,
5361        repo: &str,
5362        index: i64,
5363    ) -> Request<'_, endpoints::RepoGetPullRequest<'_>, PullRequest> {
5364        endpoints::RepoGetPullRequest { owner, repo, index }
5365            .make_request()
5366            .wrap::<_, _>(self)
5367    }
5368
5369    /// Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.
5370    ///
5371    /// - `owner`: owner of the repo
5372    /// - `repo`: name of the repo
5373    /// - `index`: index of the pull request to edit
5374    /// - `body`: See [`EditPullRequestOption`]
5375    pub fn repo_edit_pull_request(
5376        &self,
5377        owner: &str,
5378        repo: &str,
5379        index: i64,
5380        body: EditPullRequestOption,
5381    ) -> Request<'_, endpoints::RepoEditPullRequest<'_>, PullRequest> {
5382        endpoints::RepoEditPullRequest {
5383            owner,
5384            repo,
5385            index,
5386            body: body,
5387        }
5388        .make_request()
5389        .wrap::<_, _>(self)
5390    }
5391
5392    /// Get a pull request diff or patch
5393    ///
5394    /// - `owner`: owner of the repo
5395    /// - `repo`: name of the repo
5396    /// - `index`: index of the pull request to get
5397    /// - `diffType`: whether the output is diff or patch
5398    pub fn repo_download_pull_diff_or_patch(
5399        &self,
5400        owner: &str,
5401        repo: &str,
5402        index: i64,
5403        diff_type: &str,
5404        query: RepoDownloadPullDiffOrPatchQuery,
5405    ) -> Request<'_, endpoints::RepoDownloadPullDiffOrPatch<'_>, String> {
5406        endpoints::RepoDownloadPullDiffOrPatch {
5407            owner,
5408            repo,
5409            index,
5410            diff_type,
5411            query,
5412        }
5413        .make_request()
5414        .wrap::<_, _>(self)
5415    }
5416
5417    /// Get commits for a pull request
5418    ///
5419    /// - `owner`: owner of the repo
5420    /// - `repo`: name of the repo
5421    /// - `index`: index of the pull request to get
5422    pub fn repo_get_pull_request_commits(
5423        &self,
5424        owner: &str,
5425        repo: &str,
5426        index: i64,
5427        query: RepoGetPullRequestCommitsQuery,
5428    ) -> Request<'_, endpoints::RepoGetPullRequestCommits<'_>, (CommitListHeaders, Vec<Commit>)>
5429    {
5430        endpoints::RepoGetPullRequestCommits {
5431            owner,
5432            repo,
5433            index,
5434            query,
5435        }
5436        .make_request()
5437        .wrap::<_, _>(self)
5438    }
5439
5440    /// Get changed files for a pull request
5441    ///
5442    /// - `owner`: owner of the repo
5443    /// - `repo`: name of the repo
5444    /// - `index`: index of the pull request to get
5445    pub fn repo_get_pull_request_files(
5446        &self,
5447        owner: &str,
5448        repo: &str,
5449        index: i64,
5450        query: RepoGetPullRequestFilesQuery,
5451    ) -> Request<
5452        '_,
5453        endpoints::RepoGetPullRequestFiles<'_>,
5454        (ChangedFileListWithPaginationHeaders, Vec<ChangedFile>),
5455    > {
5456        endpoints::RepoGetPullRequestFiles {
5457            owner,
5458            repo,
5459            index,
5460            query,
5461        }
5462        .make_request()
5463        .wrap::<_, _>(self)
5464    }
5465
5466    /// Check if a pull request has been merged
5467    ///
5468    /// - `owner`: owner of the repo
5469    /// - `repo`: name of the repo
5470    /// - `index`: index of the pull request
5471    pub fn repo_pull_request_is_merged(
5472        &self,
5473        owner: &str,
5474        repo: &str,
5475        index: i64,
5476    ) -> Request<'_, endpoints::RepoPullRequestIsMerged<'_>, ()> {
5477        endpoints::RepoPullRequestIsMerged { owner, repo, index }
5478            .make_request()
5479            .wrap::<_, _>(self)
5480    }
5481
5482    /// Merge a pull request
5483    ///
5484    /// - `owner`: owner of the repo
5485    /// - `repo`: name of the repo
5486    /// - `index`: index of the pull request to merge
5487    /// - `body`: See [`MergePullRequestOption`]
5488    pub fn repo_merge_pull_request(
5489        &self,
5490        owner: &str,
5491        repo: &str,
5492        index: i64,
5493        body: MergePullRequestOption,
5494    ) -> Request<'_, endpoints::RepoMergePullRequest<'_>, ()> {
5495        endpoints::RepoMergePullRequest {
5496            owner,
5497            repo,
5498            index,
5499            body: body,
5500        }
5501        .make_request()
5502        .wrap::<_, _>(self)
5503    }
5504
5505    /// Cancel the scheduled auto merge for the given pull request
5506    ///
5507    /// - `owner`: owner of the repo
5508    /// - `repo`: name of the repo
5509    /// - `index`: index of the pull request to merge
5510    pub fn repo_cancel_scheduled_auto_merge(
5511        &self,
5512        owner: &str,
5513        repo: &str,
5514        index: i64,
5515    ) -> Request<'_, endpoints::RepoCancelScheduledAutoMerge<'_>, ()> {
5516        endpoints::RepoCancelScheduledAutoMerge { owner, repo, index }
5517            .make_request()
5518            .wrap::<_, _>(self)
5519    }
5520
5521    /// Create review requests for a pull request
5522    ///
5523    /// - `owner`: owner of the repo
5524    /// - `repo`: name of the repo
5525    /// - `index`: index of the pull request
5526    /// - `body`: See [`PullReviewRequestOptions`]
5527    pub fn repo_create_pull_review_requests(
5528        &self,
5529        owner: &str,
5530        repo: &str,
5531        index: i64,
5532        body: PullReviewRequestOptions,
5533    ) -> Request<'_, endpoints::RepoCreatePullReviewRequests<'_>, Vec<PullReview>> {
5534        endpoints::RepoCreatePullReviewRequests {
5535            owner,
5536            repo,
5537            index,
5538            body: body,
5539        }
5540        .make_request()
5541        .wrap::<_, _>(self)
5542    }
5543
5544    /// Cancel review requests for a pull request
5545    ///
5546    /// - `owner`: owner of the repo
5547    /// - `repo`: name of the repo
5548    /// - `index`: index of the pull request
5549    /// - `body`: See [`PullReviewRequestOptions`]
5550    pub fn repo_delete_pull_review_requests(
5551        &self,
5552        owner: &str,
5553        repo: &str,
5554        index: i64,
5555        body: PullReviewRequestOptions,
5556    ) -> Request<'_, endpoints::RepoDeletePullReviewRequests<'_>, ()> {
5557        endpoints::RepoDeletePullReviewRequests {
5558            owner,
5559            repo,
5560            index,
5561            body: body,
5562        }
5563        .make_request()
5564        .wrap::<_, _>(self)
5565    }
5566
5567    /// List all reviews for a pull request
5568    ///
5569    /// - `owner`: owner of the repo
5570    /// - `repo`: name of the repo
5571    /// - `index`: index of the pull request
5572    pub fn repo_list_pull_reviews(
5573        &self,
5574        owner: &str,
5575        repo: &str,
5576        index: i64,
5577    ) -> Request<'_, endpoints::RepoListPullReviews<'_>, (PullReviewListHeaders, Vec<PullReview>)>
5578    {
5579        endpoints::RepoListPullReviews { owner, repo, index }
5580            .make_request()
5581            .wrap::<_, _>(self)
5582    }
5583
5584    /// Create a review to an pull request
5585    ///
5586    /// - `owner`: owner of the repo
5587    /// - `repo`: name of the repo
5588    /// - `index`: index of the pull request
5589    /// - `body`: See [`CreatePullReviewOptions`]
5590    pub fn repo_create_pull_review(
5591        &self,
5592        owner: &str,
5593        repo: &str,
5594        index: i64,
5595        body: CreatePullReviewOptions,
5596    ) -> Request<'_, endpoints::RepoCreatePullReview<'_>, PullReview> {
5597        endpoints::RepoCreatePullReview {
5598            owner,
5599            repo,
5600            index,
5601            body: body,
5602        }
5603        .make_request()
5604        .wrap::<_, _>(self)
5605    }
5606
5607    /// Get a specific review for a pull request
5608    ///
5609    /// - `owner`: owner of the repo
5610    /// - `repo`: name of the repo
5611    /// - `index`: index of the pull request
5612    /// - `id`: id of the review
5613    pub fn repo_get_pull_review(
5614        &self,
5615        owner: &str,
5616        repo: &str,
5617        index: i64,
5618        id: i64,
5619    ) -> Request<'_, endpoints::RepoGetPullReview<'_>, PullReview> {
5620        endpoints::RepoGetPullReview {
5621            owner,
5622            repo,
5623            index,
5624            id,
5625        }
5626        .make_request()
5627        .wrap::<_, _>(self)
5628    }
5629
5630    /// Submit a pending review to an pull request
5631    ///
5632    /// - `owner`: owner of the repo
5633    /// - `repo`: name of the repo
5634    /// - `index`: index of the pull request
5635    /// - `id`: id of the review
5636    /// - `body`: See [`SubmitPullReviewOptions`]
5637    pub fn repo_submit_pull_review(
5638        &self,
5639        owner: &str,
5640        repo: &str,
5641        index: i64,
5642        id: i64,
5643        body: SubmitPullReviewOptions,
5644    ) -> Request<'_, endpoints::RepoSubmitPullReview<'_>, PullReview> {
5645        endpoints::RepoSubmitPullReview {
5646            owner,
5647            repo,
5648            index,
5649            id,
5650            body: body,
5651        }
5652        .make_request()
5653        .wrap::<_, _>(self)
5654    }
5655
5656    /// Delete a specific review from a pull request
5657    ///
5658    /// - `owner`: owner of the repo
5659    /// - `repo`: name of the repo
5660    /// - `index`: index of the pull request
5661    /// - `id`: id of the review
5662    pub fn repo_delete_pull_review(
5663        &self,
5664        owner: &str,
5665        repo: &str,
5666        index: i64,
5667        id: i64,
5668    ) -> Request<'_, endpoints::RepoDeletePullReview<'_>, ()> {
5669        endpoints::RepoDeletePullReview {
5670            owner,
5671            repo,
5672            index,
5673            id,
5674        }
5675        .make_request()
5676        .wrap::<_, _>(self)
5677    }
5678
5679    /// Get a specific review for a pull request
5680    ///
5681    /// - `owner`: owner of the repo
5682    /// - `repo`: name of the repo
5683    /// - `index`: index of the pull request
5684    /// - `id`: id of the review
5685    pub fn repo_get_pull_review_comments(
5686        &self,
5687        owner: &str,
5688        repo: &str,
5689        index: i64,
5690        id: i64,
5691    ) -> Request<'_, endpoints::RepoGetPullReviewComments<'_>, Vec<PullReviewComment>> {
5692        endpoints::RepoGetPullReviewComments {
5693            owner,
5694            repo,
5695            index,
5696            id,
5697        }
5698        .make_request()
5699        .wrap::<_, _>(self)
5700    }
5701
5702    /// Add a new comment to a pull request review
5703    ///
5704    /// - `owner`: owner of the repo
5705    /// - `repo`: name of the repo
5706    /// - `index`: index of the pull request
5707    /// - `id`: id of the review
5708    /// - `body`: See [`serde_json::Value`]
5709    pub fn repo_create_pull_review_comment(
5710        &self,
5711        owner: &str,
5712        repo: &str,
5713        index: i64,
5714        id: i64,
5715        body: serde_json::Value,
5716    ) -> Request<'_, endpoints::RepoCreatePullReviewComment<'_>, PullReviewComment> {
5717        endpoints::RepoCreatePullReviewComment {
5718            owner,
5719            repo,
5720            index,
5721            id,
5722            body: body,
5723        }
5724        .make_request()
5725        .wrap::<_, _>(self)
5726    }
5727
5728    /// Get a pull review comment
5729    ///
5730    /// - `owner`: owner of the repo
5731    /// - `repo`: name of the repo
5732    /// - `index`: index of the pull request
5733    /// - `id`: id of the review
5734    /// - `comment`: id of the comment
5735    pub fn repo_get_pull_review_comment(
5736        &self,
5737        owner: &str,
5738        repo: &str,
5739        index: i64,
5740        id: i64,
5741        comment: i64,
5742    ) -> Request<'_, endpoints::RepoGetPullReviewComment<'_>, PullReviewComment> {
5743        endpoints::RepoGetPullReviewComment {
5744            owner,
5745            repo,
5746            index,
5747            id,
5748            comment,
5749        }
5750        .make_request()
5751        .wrap::<_, _>(self)
5752    }
5753
5754    /// Delete a pull review comment
5755    ///
5756    /// - `owner`: owner of the repo
5757    /// - `repo`: name of the repo
5758    /// - `index`: index of the pull request
5759    /// - `id`: id of the review
5760    /// - `comment`: id of the comment
5761    pub fn repo_delete_pull_review_comment(
5762        &self,
5763        owner: &str,
5764        repo: &str,
5765        index: i64,
5766        id: i64,
5767        comment: i64,
5768    ) -> Request<'_, endpoints::RepoDeletePullReviewComment<'_>, ()> {
5769        endpoints::RepoDeletePullReviewComment {
5770            owner,
5771            repo,
5772            index,
5773            id,
5774            comment,
5775        }
5776        .make_request()
5777        .wrap::<_, _>(self)
5778    }
5779
5780    /// Dismiss a review for a pull request
5781    ///
5782    /// - `owner`: owner of the repo
5783    /// - `repo`: name of the repo
5784    /// - `index`: index of the pull request
5785    /// - `id`: id of the review
5786    /// - `body`: See [`DismissPullReviewOptions`]
5787    pub fn repo_dismiss_pull_review(
5788        &self,
5789        owner: &str,
5790        repo: &str,
5791        index: i64,
5792        id: i64,
5793        body: DismissPullReviewOptions,
5794    ) -> Request<'_, endpoints::RepoDismissPullReview<'_>, PullReview> {
5795        endpoints::RepoDismissPullReview {
5796            owner,
5797            repo,
5798            index,
5799            id,
5800            body: body,
5801        }
5802        .make_request()
5803        .wrap::<_, _>(self)
5804    }
5805
5806    /// Cancel to dismiss a review for a pull request
5807    ///
5808    /// - `owner`: owner of the repo
5809    /// - `repo`: name of the repo
5810    /// - `index`: index of the pull request
5811    /// - `id`: id of the review
5812    pub fn repo_un_dismiss_pull_review(
5813        &self,
5814        owner: &str,
5815        repo: &str,
5816        index: i64,
5817        id: i64,
5818    ) -> Request<'_, endpoints::RepoUnDismissPullReview<'_>, PullReview> {
5819        endpoints::RepoUnDismissPullReview {
5820            owner,
5821            repo,
5822            index,
5823            id,
5824        }
5825        .make_request()
5826        .wrap::<_, _>(self)
5827    }
5828
5829    /// Merge PR's baseBranch into headBranch
5830    ///
5831    /// - `owner`: owner of the repo
5832    /// - `repo`: name of the repo
5833    /// - `index`: index of the pull request to get
5834    pub fn repo_update_pull_request(
5835        &self,
5836        owner: &str,
5837        repo: &str,
5838        index: i64,
5839        query: RepoUpdatePullRequestQuery,
5840    ) -> Request<'_, endpoints::RepoUpdatePullRequest<'_>, ()> {
5841        endpoints::RepoUpdatePullRequest {
5842            owner,
5843            repo,
5844            index,
5845            query,
5846        }
5847        .make_request()
5848        .wrap::<_, _>(self)
5849    }
5850
5851    /// Get all push mirrors of the repository
5852    ///
5853    /// - `owner`: owner of the repo
5854    /// - `repo`: name of the repo
5855    pub fn repo_list_push_mirrors(
5856        &self,
5857        owner: &str,
5858        repo: &str,
5859    ) -> Request<'_, endpoints::RepoListPushMirrors<'_>, (PushMirrorListHeaders, Vec<PushMirror>)>
5860    {
5861        endpoints::RepoListPushMirrors { owner, repo }
5862            .make_request()
5863            .wrap::<_, _>(self)
5864    }
5865
5866    /// Set up a new push mirror in a repository
5867    ///
5868    /// - `owner`: owner of the repo
5869    /// - `repo`: name of the repo
5870    /// - `body`: See [`CreatePushMirrorOption`]
5871    pub fn repo_add_push_mirror(
5872        &self,
5873        owner: &str,
5874        repo: &str,
5875        body: CreatePushMirrorOption,
5876    ) -> Request<'_, endpoints::RepoAddPushMirror<'_>, PushMirror> {
5877        endpoints::RepoAddPushMirror {
5878            owner,
5879            repo,
5880            body: body,
5881        }
5882        .make_request()
5883        .wrap::<_, _>(self)
5884    }
5885
5886    /// Sync all push mirrored repository
5887    ///
5888    /// - `owner`: owner of the repo to sync
5889    /// - `repo`: name of the repo to sync
5890    pub fn repo_push_mirror_sync(
5891        &self,
5892        owner: &str,
5893        repo: &str,
5894    ) -> Request<'_, endpoints::RepoPushMirrorSync<'_>, ()> {
5895        endpoints::RepoPushMirrorSync { owner, repo }
5896            .make_request()
5897            .wrap::<_, _>(self)
5898    }
5899
5900    /// Get push mirror of the repository by remoteName
5901    ///
5902    /// - `owner`: owner of the repo
5903    /// - `repo`: name of the repo
5904    /// - `name`: remote name of push mirror
5905    pub fn repo_get_push_mirror_by_remote_name(
5906        &self,
5907        owner: &str,
5908        repo: &str,
5909        name: &str,
5910    ) -> Request<'_, endpoints::RepoGetPushMirrorByRemoteName<'_>, PushMirror> {
5911        endpoints::RepoGetPushMirrorByRemoteName { owner, repo, name }
5912            .make_request()
5913            .wrap::<_, _>(self)
5914    }
5915
5916    /// Remove a push mirror from a repository by remoteName
5917    ///
5918    /// - `owner`: owner of the repo
5919    /// - `repo`: name of the repo
5920    /// - `name`: remote name of the pushMirror
5921    pub fn repo_delete_push_mirror(
5922        &self,
5923        owner: &str,
5924        repo: &str,
5925        name: &str,
5926    ) -> Request<'_, endpoints::RepoDeletePushMirror<'_>, ()> {
5927        endpoints::RepoDeletePushMirror { owner, repo, name }
5928            .make_request()
5929            .wrap::<_, _>(self)
5930    }
5931
5932    /// Get a file from a repository
5933    ///
5934    /// - `owner`: owner of the repo
5935    /// - `repo`: name of the repo
5936    /// - `filepath`: filepath of the file to get
5937    pub fn repo_get_raw_file(
5938        &self,
5939        owner: &str,
5940        repo: &str,
5941        filepath: &str,
5942        query: RepoGetRawFileQuery,
5943    ) -> Request<'_, endpoints::RepoGetRawFile<'_>, Bytes> {
5944        endpoints::RepoGetRawFile {
5945            owner,
5946            repo,
5947            filepath,
5948            query,
5949        }
5950        .make_request()
5951        .wrap::<_, _>(self)
5952    }
5953
5954    /// List a repo's releases
5955    ///
5956    /// - `owner`: owner of the repo
5957    /// - `repo`: name of the repo
5958    pub fn repo_list_releases(
5959        &self,
5960        owner: &str,
5961        repo: &str,
5962        query: RepoListReleasesQuery,
5963    ) -> Request<'_, endpoints::RepoListReleases<'_>, (ReleaseListHeaders, Vec<Release>)> {
5964        endpoints::RepoListReleases { owner, repo, query }
5965            .make_request()
5966            .wrap::<_, _>(self)
5967    }
5968
5969    /// Create a release
5970    ///
5971    /// - `owner`: owner of the repo
5972    /// - `repo`: name of the repo
5973    /// - `body`: See [`CreateReleaseOption`]
5974    pub fn repo_create_release(
5975        &self,
5976        owner: &str,
5977        repo: &str,
5978        body: CreateReleaseOption,
5979    ) -> Request<'_, endpoints::RepoCreateRelease<'_>, Release> {
5980        endpoints::RepoCreateRelease {
5981            owner,
5982            repo,
5983            body: body,
5984        }
5985        .make_request()
5986        .wrap::<_, _>(self)
5987    }
5988
5989    /// Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at
5990    ///
5991    /// - `owner`: owner of the repo
5992    /// - `repo`: name of the repo
5993    pub fn repo_get_latest_release(
5994        &self,
5995        owner: &str,
5996        repo: &str,
5997    ) -> Request<'_, endpoints::RepoGetLatestRelease<'_>, Release> {
5998        endpoints::RepoGetLatestRelease { owner, repo }
5999            .make_request()
6000            .wrap::<_, _>(self)
6001    }
6002
6003    /// Get a release by tag name
6004    ///
6005    /// - `owner`: owner of the repo
6006    /// - `repo`: name of the repo
6007    /// - `tag`: tag name of the release to get
6008    pub fn repo_get_release_by_tag(
6009        &self,
6010        owner: &str,
6011        repo: &str,
6012        tag: &str,
6013    ) -> Request<'_, endpoints::RepoGetReleaseByTag<'_>, Release> {
6014        endpoints::RepoGetReleaseByTag { owner, repo, tag }
6015            .make_request()
6016            .wrap::<_, _>(self)
6017    }
6018
6019    /// Delete a release by tag name
6020    ///
6021    /// - `owner`: owner of the repo
6022    /// - `repo`: name of the repo
6023    /// - `tag`: tag name of the release to delete
6024    pub fn repo_delete_release_by_tag(
6025        &self,
6026        owner: &str,
6027        repo: &str,
6028        tag: &str,
6029    ) -> Request<'_, endpoints::RepoDeleteReleaseByTag<'_>, ()> {
6030        endpoints::RepoDeleteReleaseByTag { owner, repo, tag }
6031            .make_request()
6032            .wrap::<_, _>(self)
6033    }
6034
6035    /// Get a release
6036    ///
6037    /// - `owner`: owner of the repo
6038    /// - `repo`: name of the repo
6039    /// - `id`: id of the release to get
6040    pub fn repo_get_release(
6041        &self,
6042        owner: &str,
6043        repo: &str,
6044        id: i64,
6045    ) -> Request<'_, endpoints::RepoGetRelease<'_>, Release> {
6046        endpoints::RepoGetRelease { owner, repo, id }
6047            .make_request()
6048            .wrap::<_, _>(self)
6049    }
6050
6051    /// Delete a release
6052    ///
6053    /// - `owner`: owner of the repo
6054    /// - `repo`: name of the repo
6055    /// - `id`: id of the release to delete
6056    pub fn repo_delete_release(
6057        &self,
6058        owner: &str,
6059        repo: &str,
6060        id: i64,
6061    ) -> Request<'_, endpoints::RepoDeleteRelease<'_>, ()> {
6062        endpoints::RepoDeleteRelease { owner, repo, id }
6063            .make_request()
6064            .wrap::<_, _>(self)
6065    }
6066
6067    /// Update a release
6068    ///
6069    /// - `owner`: owner of the repo
6070    /// - `repo`: name of the repo
6071    /// - `id`: id of the release to edit
6072    /// - `body`: See [`EditReleaseOption`]
6073    pub fn repo_edit_release(
6074        &self,
6075        owner: &str,
6076        repo: &str,
6077        id: i64,
6078        body: EditReleaseOption,
6079    ) -> Request<'_, endpoints::RepoEditRelease<'_>, Release> {
6080        endpoints::RepoEditRelease {
6081            owner,
6082            repo,
6083            id,
6084            body: body,
6085        }
6086        .make_request()
6087        .wrap::<_, _>(self)
6088    }
6089
6090    /// List release's attachments
6091    ///
6092    /// - `owner`: owner of the repo
6093    /// - `repo`: name of the repo
6094    /// - `id`: id of the release
6095    pub fn repo_list_release_attachments(
6096        &self,
6097        owner: &str,
6098        repo: &str,
6099        id: i64,
6100    ) -> Request<'_, endpoints::RepoListReleaseAttachments<'_>, Vec<Attachment>> {
6101        endpoints::RepoListReleaseAttachments { owner, repo, id }
6102            .make_request()
6103            .wrap::<_, _>(self)
6104    }
6105
6106    /// Create a release attachment
6107    ///
6108    /// - `owner`: owner of the repo
6109    /// - `repo`: name of the repo
6110    /// - `id`: id of the release
6111    /// - `attachment`: attachment to upload (this parameter is incompatible with `external_url`)
6112    /// - `external_url`: url to external asset (this parameter is incompatible with `attachment`)
6113    pub fn repo_create_release_attachment(
6114        &self,
6115        owner: &str,
6116        repo: &str,
6117        id: i64,
6118        attachment: Option<&[u8]>,
6119        external_url: Option<&str>,
6120        query: RepoCreateReleaseAttachmentQuery,
6121    ) -> Request<'_, endpoints::RepoCreateReleaseAttachment<'_>, Attachment> {
6122        endpoints::RepoCreateReleaseAttachment {
6123            owner,
6124            repo,
6125            id,
6126            attachment: attachment.as_deref(),
6127            external_url: external_url.as_deref(),
6128            query,
6129        }
6130        .make_request()
6131        .wrap::<_, _>(self)
6132    }
6133
6134    /// Get a release attachment
6135    ///
6136    /// - `owner`: owner of the repo
6137    /// - `repo`: name of the repo
6138    /// - `id`: id of the release
6139    /// - `attachment_id`: id of the attachment to get
6140    pub fn repo_get_release_attachment(
6141        &self,
6142        owner: &str,
6143        repo: &str,
6144        id: i64,
6145        attachment_id: i64,
6146    ) -> Request<'_, endpoints::RepoGetReleaseAttachment<'_>, Attachment> {
6147        endpoints::RepoGetReleaseAttachment {
6148            owner,
6149            repo,
6150            id,
6151            attachment_id,
6152        }
6153        .make_request()
6154        .wrap::<_, _>(self)
6155    }
6156
6157    /// Delete a release attachment
6158    ///
6159    /// - `owner`: owner of the repo
6160    /// - `repo`: name of the repo
6161    /// - `id`: id of the release
6162    /// - `attachment_id`: id of the attachment to delete
6163    pub fn repo_delete_release_attachment(
6164        &self,
6165        owner: &str,
6166        repo: &str,
6167        id: i64,
6168        attachment_id: i64,
6169    ) -> Request<'_, endpoints::RepoDeleteReleaseAttachment<'_>, ()> {
6170        endpoints::RepoDeleteReleaseAttachment {
6171            owner,
6172            repo,
6173            id,
6174            attachment_id,
6175        }
6176        .make_request()
6177        .wrap::<_, _>(self)
6178    }
6179
6180    /// Edit a release attachment
6181    ///
6182    /// - `owner`: owner of the repo
6183    /// - `repo`: name of the repo
6184    /// - `id`: id of the release
6185    /// - `attachment_id`: id of the attachment to edit
6186    /// - `body`: See [`EditAttachmentOptions`]
6187    pub fn repo_edit_release_attachment(
6188        &self,
6189        owner: &str,
6190        repo: &str,
6191        id: i64,
6192        attachment_id: i64,
6193        body: EditAttachmentOptions,
6194    ) -> Request<'_, endpoints::RepoEditReleaseAttachment<'_>, Attachment> {
6195        endpoints::RepoEditReleaseAttachment {
6196            owner,
6197            repo,
6198            id,
6199            attachment_id,
6200            body: body,
6201        }
6202        .make_request()
6203        .wrap::<_, _>(self)
6204    }
6205
6206    /// Return all users that can be requested to review in this repo
6207    ///
6208    /// - `owner`: owner of the repo
6209    /// - `repo`: name of the repo
6210    pub fn repo_get_reviewers(
6211        &self,
6212        owner: &str,
6213        repo: &str,
6214    ) -> Request<'_, endpoints::RepoGetReviewers<'_>, (UserListHeaders, Vec<User>)> {
6215        endpoints::RepoGetReviewers { owner, repo }
6216            .make_request()
6217            .wrap::<_, _>(self)
6218    }
6219
6220    /// Get signing-key.gpg for given repository
6221    ///
6222    /// - `owner`: owner of the repo
6223    /// - `repo`: name of the repo
6224    pub fn repo_signing_key(
6225        &self,
6226        owner: &str,
6227        repo: &str,
6228    ) -> Request<'_, endpoints::RepoSigningKey<'_>, String> {
6229        endpoints::RepoSigningKey { owner, repo }
6230            .make_request()
6231            .wrap::<_, _>(self)
6232    }
6233
6234    /// List a repo's stargazers
6235    ///
6236    /// - `owner`: owner of the repo
6237    /// - `repo`: name of the repo
6238    pub fn repo_list_stargazers(
6239        &self,
6240        owner: &str,
6241        repo: &str,
6242    ) -> Request<'_, endpoints::RepoListStargazers<'_>, (UserListHeaders, Vec<User>)> {
6243        endpoints::RepoListStargazers { owner, repo }
6244            .make_request()
6245            .wrap::<_, _>(self)
6246    }
6247
6248    /// Get a commit's statuses
6249    ///
6250    /// - `owner`: owner of the repo
6251    /// - `repo`: name of the repo
6252    /// - `sha`: sha of the commit
6253    pub fn repo_list_statuses(
6254        &self,
6255        owner: &str,
6256        repo: &str,
6257        sha: &str,
6258        query: RepoListStatusesQuery,
6259    ) -> Request<'_, endpoints::RepoListStatuses<'_>, (CommitStatusListHeaders, Vec<CommitStatus>)>
6260    {
6261        endpoints::RepoListStatuses {
6262            owner,
6263            repo,
6264            sha,
6265            query,
6266        }
6267        .make_request()
6268        .wrap::<_, _>(self)
6269    }
6270
6271    /// Create a commit status
6272    ///
6273    /// - `owner`: owner of the repo
6274    /// - `repo`: name of the repo
6275    /// - `sha`: sha of the commit
6276    /// - `body`: See [`CreateStatusOption`]
6277    pub fn repo_create_status(
6278        &self,
6279        owner: &str,
6280        repo: &str,
6281        sha: &str,
6282        body: CreateStatusOption,
6283    ) -> Request<'_, endpoints::RepoCreateStatus<'_>, CommitStatus> {
6284        endpoints::RepoCreateStatus {
6285            owner,
6286            repo,
6287            sha,
6288            body: body,
6289        }
6290        .make_request()
6291        .wrap::<_, _>(self)
6292    }
6293
6294    /// List a repo's watchers
6295    ///
6296    /// - `owner`: owner of the repo
6297    /// - `repo`: name of the repo
6298    pub fn repo_list_subscribers(
6299        &self,
6300        owner: &str,
6301        repo: &str,
6302    ) -> Request<'_, endpoints::RepoListSubscribers<'_>, (UserListHeaders, Vec<User>)> {
6303        endpoints::RepoListSubscribers { owner, repo }
6304            .make_request()
6305            .wrap::<_, _>(self)
6306    }
6307
6308    /// Check if the current user is watching a repo
6309    ///
6310    /// - `owner`: owner of the repo
6311    /// - `repo`: name of the repo
6312    pub fn user_current_check_subscription(
6313        &self,
6314        owner: &str,
6315        repo: &str,
6316    ) -> Request<'_, endpoints::UserCurrentCheckSubscription<'_>, WatchInfo> {
6317        endpoints::UserCurrentCheckSubscription { owner, repo }
6318            .make_request()
6319            .wrap::<_, _>(self)
6320    }
6321
6322    /// Watch a repo
6323    ///
6324    /// - `owner`: owner of the repo
6325    /// - `repo`: name of the repo
6326    pub fn user_current_put_subscription(
6327        &self,
6328        owner: &str,
6329        repo: &str,
6330    ) -> Request<'_, endpoints::UserCurrentPutSubscription<'_>, WatchInfo> {
6331        endpoints::UserCurrentPutSubscription { owner, repo }
6332            .make_request()
6333            .wrap::<_, _>(self)
6334    }
6335
6336    /// Unwatch a repo
6337    ///
6338    /// - `owner`: owner of the repo
6339    /// - `repo`: name of the repo
6340    pub fn user_current_delete_subscription(
6341        &self,
6342        owner: &str,
6343        repo: &str,
6344    ) -> Request<'_, endpoints::UserCurrentDeleteSubscription<'_>, ()> {
6345        endpoints::UserCurrentDeleteSubscription { owner, repo }
6346            .make_request()
6347            .wrap::<_, _>(self)
6348    }
6349
6350    /// Gets information about syncing the fork default branch with the base branch
6351    ///
6352    /// - `owner`: owner of the repo
6353    /// - `repo`: name of the repo
6354    pub fn repo_sync_fork_default_info(
6355        &self,
6356        owner: &str,
6357        repo: &str,
6358    ) -> Request<'_, endpoints::RepoSyncForkDefaultInfo<'_>, SyncForkInfo> {
6359        endpoints::RepoSyncForkDefaultInfo { owner, repo }
6360            .make_request()
6361            .wrap::<_, _>(self)
6362    }
6363
6364    /// Syncs the default branch of a fork with the base branch
6365    ///
6366    /// - `owner`: owner of the repo
6367    /// - `repo`: name of the repo
6368    pub fn repo_sync_fork_default(
6369        &self,
6370        owner: &str,
6371        repo: &str,
6372    ) -> Request<'_, endpoints::RepoSyncForkDefault<'_>, ()> {
6373        endpoints::RepoSyncForkDefault { owner, repo }
6374            .make_request()
6375            .wrap::<_, _>(self)
6376    }
6377
6378    /// Gets information about syncing a fork branch with the base branch
6379    ///
6380    /// - `owner`: owner of the repo
6381    /// - `repo`: name of the repo
6382    /// - `branch`: The branch
6383    pub fn repo_sync_fork_branch_info(
6384        &self,
6385        owner: &str,
6386        repo: &str,
6387        branch: &str,
6388    ) -> Request<'_, endpoints::RepoSyncForkBranchInfo<'_>, SyncForkInfo> {
6389        endpoints::RepoSyncForkBranchInfo {
6390            owner,
6391            repo,
6392            branch,
6393        }
6394        .make_request()
6395        .wrap::<_, _>(self)
6396    }
6397
6398    /// Syncs a fork branch with the base branch
6399    ///
6400    /// - `owner`: owner of the repo
6401    /// - `repo`: name of the repo
6402    /// - `branch`: The branch
6403    pub fn repo_sync_fork_branch(
6404        &self,
6405        owner: &str,
6406        repo: &str,
6407        branch: &str,
6408    ) -> Request<'_, endpoints::RepoSyncForkBranch<'_>, ()> {
6409        endpoints::RepoSyncForkBranch {
6410            owner,
6411            repo,
6412            branch,
6413        }
6414        .make_request()
6415        .wrap::<_, _>(self)
6416    }
6417
6418    /// List tag protections for a repository
6419    ///
6420    /// - `owner`: owner of the repo
6421    /// - `repo`: name of the repo
6422    pub fn repo_list_tag_protection(
6423        &self,
6424        owner: &str,
6425        repo: &str,
6426    ) -> Request<'_, endpoints::RepoListTagProtection<'_>, Vec<TagProtection>> {
6427        endpoints::RepoListTagProtection { owner, repo }
6428            .make_request()
6429            .wrap::<_, _>(self)
6430    }
6431
6432    /// Create a tag protections for a repository
6433    ///
6434    /// - `owner`: owner of the repo
6435    /// - `repo`: name of the repo
6436    /// - `body`: See [`CreateTagProtectionOption`]
6437    pub fn repo_create_tag_protection(
6438        &self,
6439        owner: &str,
6440        repo: &str,
6441        body: CreateTagProtectionOption,
6442    ) -> Request<'_, endpoints::RepoCreateTagProtection<'_>, TagProtection> {
6443        endpoints::RepoCreateTagProtection {
6444            owner,
6445            repo,
6446            body: body,
6447        }
6448        .make_request()
6449        .wrap::<_, _>(self)
6450    }
6451
6452    /// Get a specific tag protection for the repository
6453    ///
6454    /// - `owner`: owner of the repo
6455    /// - `repo`: name of the repo
6456    /// - `id`: id of the tag protect to get
6457    pub fn repo_get_tag_protection(
6458        &self,
6459        owner: &str,
6460        repo: &str,
6461        id: i64,
6462    ) -> Request<'_, endpoints::RepoGetTagProtection<'_>, TagProtection> {
6463        endpoints::RepoGetTagProtection { owner, repo, id }
6464            .make_request()
6465            .wrap::<_, _>(self)
6466    }
6467
6468    /// Delete a specific tag protection for the repository
6469    ///
6470    /// - `owner`: owner of the repo
6471    /// - `repo`: name of the repo
6472    /// - `id`: id of protected tag
6473    pub fn repo_delete_tag_protection(
6474        &self,
6475        owner: &str,
6476        repo: &str,
6477        id: i64,
6478    ) -> Request<'_, endpoints::RepoDeleteTagProtection<'_>, ()> {
6479        endpoints::RepoDeleteTagProtection { owner, repo, id }
6480            .make_request()
6481            .wrap::<_, _>(self)
6482    }
6483
6484    /// Edit a tag protections for a repository. Only fields that are set will be changed
6485    ///
6486    /// - `owner`: owner of the repo
6487    /// - `repo`: name of the repo
6488    /// - `id`: id of protected tag
6489    /// - `body`: See [`EditTagProtectionOption`]
6490    pub fn repo_edit_tag_protection(
6491        &self,
6492        owner: &str,
6493        repo: &str,
6494        id: i64,
6495        body: EditTagProtectionOption,
6496    ) -> Request<'_, endpoints::RepoEditTagProtection<'_>, TagProtection> {
6497        endpoints::RepoEditTagProtection {
6498            owner,
6499            repo,
6500            id,
6501            body: body,
6502        }
6503        .make_request()
6504        .wrap::<_, _>(self)
6505    }
6506
6507    /// List a repository's tags
6508    ///
6509    /// - `owner`: owner of the repo
6510    /// - `repo`: name of the repo
6511    pub fn repo_list_tags(
6512        &self,
6513        owner: &str,
6514        repo: &str,
6515    ) -> Request<'_, endpoints::RepoListTags<'_>, (TagListHeaders, Vec<Tag>)> {
6516        endpoints::RepoListTags { owner, repo }
6517            .make_request()
6518            .wrap::<_, _>(self)
6519    }
6520
6521    /// Create a new git tag in a repository
6522    ///
6523    /// - `owner`: owner of the repo
6524    /// - `repo`: name of the repo
6525    /// - `body`: See [`CreateTagOption`]
6526    pub fn repo_create_tag(
6527        &self,
6528        owner: &str,
6529        repo: &str,
6530        body: CreateTagOption,
6531    ) -> Request<'_, endpoints::RepoCreateTag<'_>, Tag> {
6532        endpoints::RepoCreateTag {
6533            owner,
6534            repo,
6535            body: body,
6536        }
6537        .make_request()
6538        .wrap::<_, _>(self)
6539    }
6540
6541    /// Get the tag of a repository by tag name
6542    ///
6543    /// - `owner`: owner of the repo
6544    /// - `repo`: name of the repo
6545    /// - `tag`: name of tag
6546    pub fn repo_get_tag(
6547        &self,
6548        owner: &str,
6549        repo: &str,
6550        tag: &str,
6551    ) -> Request<'_, endpoints::RepoGetTag<'_>, Tag> {
6552        endpoints::RepoGetTag { owner, repo, tag }
6553            .make_request()
6554            .wrap::<_, _>(self)
6555    }
6556
6557    /// Delete a repository's tag by name
6558    ///
6559    /// - `owner`: owner of the repo
6560    /// - `repo`: name of the repo
6561    /// - `tag`: name of tag to delete
6562    pub fn repo_delete_tag(
6563        &self,
6564        owner: &str,
6565        repo: &str,
6566        tag: &str,
6567    ) -> Request<'_, endpoints::RepoDeleteTag<'_>, ()> {
6568        endpoints::RepoDeleteTag { owner, repo, tag }
6569            .make_request()
6570            .wrap::<_, _>(self)
6571    }
6572
6573    /// List a repository's teams
6574    ///
6575    /// - `owner`: owner of the repo
6576    /// - `repo`: name of the repo
6577    pub fn repo_list_teams(
6578        &self,
6579        owner: &str,
6580        repo: &str,
6581    ) -> Request<'_, endpoints::RepoListTeams<'_>, Vec<Team>> {
6582        endpoints::RepoListTeams { owner, repo }
6583            .make_request()
6584            .wrap::<_, _>(self)
6585    }
6586
6587    /// Check if a team is assigned to a repository
6588    ///
6589    /// - `owner`: owner of the repo
6590    /// - `repo`: name of the repo
6591    /// - `team`: team name
6592    pub fn repo_check_team(
6593        &self,
6594        owner: &str,
6595        repo: &str,
6596        team: &str,
6597    ) -> Request<'_, endpoints::RepoCheckTeam<'_>, Team> {
6598        endpoints::RepoCheckTeam { owner, repo, team }
6599            .make_request()
6600            .wrap::<_, _>(self)
6601    }
6602
6603    /// Add a team to a repository
6604    ///
6605    /// - `owner`: owner of the repo
6606    /// - `repo`: name of the repo
6607    /// - `team`: team name
6608    pub fn repo_add_team(
6609        &self,
6610        owner: &str,
6611        repo: &str,
6612        team: &str,
6613    ) -> Request<'_, endpoints::RepoAddTeam<'_>, ()> {
6614        endpoints::RepoAddTeam { owner, repo, team }
6615            .make_request()
6616            .wrap::<_, _>(self)
6617    }
6618
6619    /// Delete a team from a repository
6620    ///
6621    /// - `owner`: owner of the repo
6622    /// - `repo`: name of the repo
6623    /// - `team`: team name
6624    pub fn repo_delete_team(
6625        &self,
6626        owner: &str,
6627        repo: &str,
6628        team: &str,
6629    ) -> Request<'_, endpoints::RepoDeleteTeam<'_>, ()> {
6630        endpoints::RepoDeleteTeam { owner, repo, team }
6631            .make_request()
6632            .wrap::<_, _>(self)
6633    }
6634
6635    /// List a repo's tracked times
6636    ///
6637    /// - `owner`: owner of the repo
6638    /// - `repo`: name of the repo
6639    pub fn repo_tracked_times(
6640        &self,
6641        owner: &str,
6642        repo: &str,
6643        query: RepoTrackedTimesQuery,
6644    ) -> Request<'_, endpoints::RepoTrackedTimes<'_>, (TrackedTimeListHeaders, Vec<TrackedTime>)>
6645    {
6646        endpoints::RepoTrackedTimes { owner, repo, query }
6647            .make_request()
6648            .wrap::<_, _>(self)
6649    }
6650
6651    /// List a user's tracked times in a repo
6652    ///
6653    /// - `owner`: owner of the repo
6654    /// - `repo`: name of the repo
6655    /// - `user`: username of user
6656    pub fn user_tracked_times(
6657        &self,
6658        owner: &str,
6659        repo: &str,
6660        user: &str,
6661    ) -> Request<'_, endpoints::UserTrackedTimes<'_>, Vec<TrackedTime>> {
6662        endpoints::UserTrackedTimes { owner, repo, user }
6663            .make_request()
6664            .wrap::<_, _>(self)
6665    }
6666
6667    /// Get list of topics that a repository has
6668    ///
6669    /// - `owner`: owner of the repo
6670    /// - `repo`: name of the repo
6671    pub fn repo_list_topics(
6672        &self,
6673        owner: &str,
6674        repo: &str,
6675    ) -> Request<'_, endpoints::RepoListTopics<'_>, TopicName> {
6676        endpoints::RepoListTopics { owner, repo }
6677            .make_request()
6678            .wrap::<_, _>(self)
6679    }
6680
6681    /// Replace list of topics for a repository
6682    ///
6683    /// - `owner`: owner of the repo
6684    /// - `repo`: name of the repo
6685    /// - `body`: See [`RepoTopicOptions`]
6686    pub fn repo_update_topics(
6687        &self,
6688        owner: &str,
6689        repo: &str,
6690        body: RepoTopicOptions,
6691    ) -> Request<'_, endpoints::RepoUpdateTopics<'_>, ()> {
6692        endpoints::RepoUpdateTopics {
6693            owner,
6694            repo,
6695            body: body,
6696        }
6697        .make_request()
6698        .wrap::<_, _>(self)
6699    }
6700
6701    /// Add a topic to a repository
6702    ///
6703    /// - `owner`: owner of the repo
6704    /// - `repo`: name of the repo
6705    /// - `topic`: name of the topic to add
6706    pub fn repo_add_topic(
6707        &self,
6708        owner: &str,
6709        repo: &str,
6710        topic: &str,
6711    ) -> Request<'_, endpoints::RepoAddTopic<'_>, ()> {
6712        endpoints::RepoAddTopic { owner, repo, topic }
6713            .make_request()
6714            .wrap::<_, _>(self)
6715    }
6716
6717    /// Delete a topic from a repository
6718    ///
6719    /// - `owner`: owner of the repo
6720    /// - `repo`: name of the repo
6721    /// - `topic`: name of the topic to delete
6722    pub fn repo_delete_topic(
6723        &self,
6724        owner: &str,
6725        repo: &str,
6726        topic: &str,
6727    ) -> Request<'_, endpoints::RepoDeleteTopic<'_>, ()> {
6728        endpoints::RepoDeleteTopic { owner, repo, topic }
6729            .make_request()
6730            .wrap::<_, _>(self)
6731    }
6732
6733    /// Transfer a repo ownership
6734    ///
6735    /// - `owner`: owner of the repo to transfer
6736    /// - `repo`: name of the repo to transfer
6737    /// - `body`: Transfer Options
6738
6739    ///   See [`TransferRepoOption`]
6740    pub fn repo_transfer(
6741        &self,
6742        owner: &str,
6743        repo: &str,
6744        body: TransferRepoOption,
6745    ) -> Request<'_, endpoints::RepoTransfer<'_>, Repository> {
6746        endpoints::RepoTransfer {
6747            owner,
6748            repo,
6749            body: body,
6750        }
6751        .make_request()
6752        .wrap::<_, _>(self)
6753    }
6754
6755    /// Accept a repo transfer
6756    ///
6757    /// - `owner`: owner of the repo to transfer
6758    /// - `repo`: name of the repo to transfer
6759    pub fn accept_repo_transfer(
6760        &self,
6761        owner: &str,
6762        repo: &str,
6763    ) -> Request<'_, endpoints::AcceptRepoTransfer<'_>, Repository> {
6764        endpoints::AcceptRepoTransfer { owner, repo }
6765            .make_request()
6766            .wrap::<_, _>(self)
6767    }
6768
6769    /// Reject a repo transfer
6770    ///
6771    /// - `owner`: owner of the repo to transfer
6772    /// - `repo`: name of the repo to transfer
6773    pub fn reject_repo_transfer(
6774        &self,
6775        owner: &str,
6776        repo: &str,
6777    ) -> Request<'_, endpoints::RejectRepoTransfer<'_>, Repository> {
6778        endpoints::RejectRepoTransfer { owner, repo }
6779            .make_request()
6780            .wrap::<_, _>(self)
6781    }
6782
6783    /// Create a wiki page
6784    ///
6785    /// - `owner`: owner of the repo
6786    /// - `repo`: name of the repo
6787    /// - `body`: See [`CreateWikiPageOptions`]
6788    pub fn repo_create_wiki_page(
6789        &self,
6790        owner: &str,
6791        repo: &str,
6792        body: CreateWikiPageOptions,
6793    ) -> Request<'_, endpoints::RepoCreateWikiPage<'_>, WikiPage> {
6794        endpoints::RepoCreateWikiPage {
6795            owner,
6796            repo,
6797            body: body,
6798        }
6799        .make_request()
6800        .wrap::<_, _>(self)
6801    }
6802
6803    /// Get a wiki page
6804    ///
6805    /// - `owner`: owner of the repo
6806    /// - `repo`: name of the repo
6807    /// - `pageName`: name of the page
6808    pub fn repo_get_wiki_page(
6809        &self,
6810        owner: &str,
6811        repo: &str,
6812        page_name: &str,
6813    ) -> Request<'_, endpoints::RepoGetWikiPage<'_>, WikiPage> {
6814        endpoints::RepoGetWikiPage {
6815            owner,
6816            repo,
6817            page_name,
6818        }
6819        .make_request()
6820        .wrap::<_, _>(self)
6821    }
6822
6823    /// Delete a wiki page
6824    ///
6825    /// - `owner`: owner of the repo
6826    /// - `repo`: name of the repo
6827    /// - `pageName`: name of the page
6828    pub fn repo_delete_wiki_page(
6829        &self,
6830        owner: &str,
6831        repo: &str,
6832        page_name: &str,
6833    ) -> Request<'_, endpoints::RepoDeleteWikiPage<'_>, ()> {
6834        endpoints::RepoDeleteWikiPage {
6835            owner,
6836            repo,
6837            page_name,
6838        }
6839        .make_request()
6840        .wrap::<_, _>(self)
6841    }
6842
6843    /// Edit a wiki page
6844    ///
6845    /// - `owner`: owner of the repo
6846    /// - `repo`: name of the repo
6847    /// - `pageName`: name of the page
6848    /// - `body`: See [`CreateWikiPageOptions`]
6849    pub fn repo_edit_wiki_page(
6850        &self,
6851        owner: &str,
6852        repo: &str,
6853        page_name: &str,
6854        body: CreateWikiPageOptions,
6855    ) -> Request<'_, endpoints::RepoEditWikiPage<'_>, WikiPage> {
6856        endpoints::RepoEditWikiPage {
6857            owner,
6858            repo,
6859            page_name,
6860            body: body,
6861        }
6862        .make_request()
6863        .wrap::<_, _>(self)
6864    }
6865
6866    /// Get all wiki pages
6867    ///
6868    /// - `owner`: owner of the repo
6869    /// - `repo`: name of the repo
6870    pub fn repo_get_wiki_pages(
6871        &self,
6872        owner: &str,
6873        repo: &str,
6874    ) -> Request<'_, endpoints::RepoGetWikiPages<'_>, (WikiPageListHeaders, Vec<WikiPageMetaData>)>
6875    {
6876        endpoints::RepoGetWikiPages { owner, repo }
6877            .make_request()
6878            .wrap::<_, _>(self)
6879    }
6880
6881    /// Get revisions of a wiki page
6882    ///
6883    /// - `owner`: owner of the repo
6884    /// - `repo`: name of the repo
6885    /// - `pageName`: name of the page
6886    pub fn repo_get_wiki_page_revisions(
6887        &self,
6888        owner: &str,
6889        repo: &str,
6890        page_name: &str,
6891    ) -> Request<'_, endpoints::RepoGetWikiPageRevisions<'_>, (WikiCommitListHeaders, WikiCommitList)>
6892    {
6893        endpoints::RepoGetWikiPageRevisions {
6894            owner,
6895            repo,
6896            page_name,
6897        }
6898        .make_request()
6899        .wrap::<_, _>(self)
6900    }
6901
6902    /// Create a repository using a template
6903    ///
6904    /// - `template_owner`: name of the template repository owner
6905    /// - `template_repo`: name of the template repository
6906    /// - `body`: See [`GenerateRepoOption`]
6907    pub fn generate_repo(
6908        &self,
6909        template_owner: &str,
6910        template_repo: &str,
6911        body: GenerateRepoOption,
6912    ) -> Request<'_, endpoints::GenerateRepo<'_>, Repository> {
6913        endpoints::GenerateRepo {
6914            template_owner,
6915            template_repo,
6916            body: body,
6917        }
6918        .make_request()
6919        .wrap::<_, _>(self)
6920    }
6921
6922    /// Get a repository by id
6923    ///
6924    /// - `id`: id of the repo to get
6925    pub fn repo_get_by_id(&self, id: i64) -> Request<'_, endpoints::RepoGetById, Repository> {
6926        endpoints::RepoGetById { id }
6927            .make_request()
6928            .wrap::<_, _>(self)
6929    }
6930
6931    /// Get instance's global settings for api
6932    pub fn get_general_api_settings(
6933        &self,
6934    ) -> Request<'_, endpoints::GetGeneralApiSettings, GeneralAPISettings> {
6935        endpoints::GetGeneralApiSettings {}
6936            .make_request()
6937            .wrap::<_, _>(self)
6938    }
6939
6940    /// Get instance's global settings for Attachment
6941    pub fn get_general_attachment_settings(
6942        &self,
6943    ) -> Request<'_, endpoints::GetGeneralAttachmentSettings, GeneralAttachmentSettings> {
6944        endpoints::GetGeneralAttachmentSettings {}
6945            .make_request()
6946            .wrap::<_, _>(self)
6947    }
6948
6949    /// Get instance's global settings for repositories
6950    pub fn get_general_repository_settings(
6951        &self,
6952    ) -> Request<'_, endpoints::GetGeneralRepositorySettings, GeneralRepoSettings> {
6953        endpoints::GetGeneralRepositorySettings {}
6954            .make_request()
6955            .wrap::<_, _>(self)
6956    }
6957
6958    /// Get instance's global settings for ui
6959    pub fn get_general_ui_settings(
6960        &self,
6961    ) -> Request<'_, endpoints::GetGeneralUiSettings, GeneralUISettings> {
6962        endpoints::GetGeneralUiSettings {}
6963            .make_request()
6964            .wrap::<_, _>(self)
6965    }
6966
6967    /// Get default signing-key.gpg
6968    pub fn get_signing_key(&self) -> Request<'_, endpoints::GetSigningKey, String> {
6969        endpoints::GetSigningKey {}
6970            .make_request()
6971            .wrap::<_, _>(self)
6972    }
6973
6974    /// Get default signing-key.ssh
6975    pub fn get_ssh_signing_key(&self) -> Request<'_, endpoints::GetSshSigningKey, String> {
6976        endpoints::GetSshSigningKey {}
6977            .make_request()
6978            .wrap::<_, _>(self)
6979    }
6980
6981    /// Get a team
6982    ///
6983    /// - `id`: id of the team to get
6984    pub fn org_get_team(&self, id: i64) -> Request<'_, endpoints::OrgGetTeam, Team> {
6985        endpoints::OrgGetTeam { id }
6986            .make_request()
6987            .wrap::<_, _>(self)
6988    }
6989
6990    /// Delete a team
6991    ///
6992    /// - `id`: id of the team to delete
6993    pub fn org_delete_team(&self, id: i64) -> Request<'_, endpoints::OrgDeleteTeam, ()> {
6994        endpoints::OrgDeleteTeam { id }
6995            .make_request()
6996            .wrap::<_, _>(self)
6997    }
6998
6999    /// Edit a team
7000    ///
7001    /// - `id`: id of the team to edit
7002    /// - `body`: See [`EditTeamOption`]
7003    pub fn org_edit_team(
7004        &self,
7005        id: i64,
7006        body: EditTeamOption,
7007    ) -> Request<'_, endpoints::OrgEditTeam, Team> {
7008        endpoints::OrgEditTeam { id, body: body }
7009            .make_request()
7010            .wrap::<_, _>(self)
7011    }
7012
7013    /// List a team's activity feeds
7014    ///
7015    /// - `id`: id of the team
7016    pub fn org_list_team_activity_feeds(
7017        &self,
7018        id: i64,
7019        query: OrgListTeamActivityFeedsQuery,
7020    ) -> Request<'_, endpoints::OrgListTeamActivityFeeds, (ActivityFeedsListHeaders, Vec<Activity>)>
7021    {
7022        endpoints::OrgListTeamActivityFeeds { id, query }
7023            .make_request()
7024            .wrap::<_, _>(self)
7025    }
7026
7027    /// List a team's members
7028    ///
7029    /// - `id`: id of the team
7030    pub fn org_list_team_members(
7031        &self,
7032        id: i64,
7033    ) -> Request<'_, endpoints::OrgListTeamMembers, (UserListHeaders, Vec<User>)> {
7034        endpoints::OrgListTeamMembers { id }
7035            .make_request()
7036            .wrap::<_, _>(self)
7037    }
7038
7039    /// List a particular member of team
7040    ///
7041    /// - `id`: id of the team
7042    /// - `username`: username of the member to list
7043    pub fn org_list_team_member(
7044        &self,
7045        id: i64,
7046        username: &str,
7047    ) -> Request<'_, endpoints::OrgListTeamMember<'_>, User> {
7048        endpoints::OrgListTeamMember { id, username }
7049            .make_request()
7050            .wrap::<_, _>(self)
7051    }
7052
7053    /// Add a team member
7054    ///
7055    /// - `id`: id of the team
7056    /// - `username`: username of the user to add
7057    pub fn org_add_team_member(
7058        &self,
7059        id: i64,
7060        username: &str,
7061    ) -> Request<'_, endpoints::OrgAddTeamMember<'_>, ()> {
7062        endpoints::OrgAddTeamMember { id, username }
7063            .make_request()
7064            .wrap::<_, _>(self)
7065    }
7066
7067    /// Remove a team member
7068    ///
7069    /// - `id`: id of the team
7070    /// - `username`: username of the user to remove
7071    pub fn org_remove_team_member(
7072        &self,
7073        id: i64,
7074        username: &str,
7075    ) -> Request<'_, endpoints::OrgRemoveTeamMember<'_>, ()> {
7076        endpoints::OrgRemoveTeamMember { id, username }
7077            .make_request()
7078            .wrap::<_, _>(self)
7079    }
7080
7081    /// List a team's repos
7082    ///
7083    /// - `id`: id of the team
7084    pub fn org_list_team_repos(
7085        &self,
7086        id: i64,
7087    ) -> Request<'_, endpoints::OrgListTeamRepos, (RepositoryListHeaders, Vec<Repository>)> {
7088        endpoints::OrgListTeamRepos { id }
7089            .make_request()
7090            .wrap::<_, _>(self)
7091    }
7092
7093    /// List a particular repo of team
7094    ///
7095    /// - `id`: id of the team
7096    /// - `org`: organization that owns the repo to list
7097    /// - `repo`: name of the repo to list
7098    pub fn org_list_team_repo(
7099        &self,
7100        id: i64,
7101        org: &str,
7102        repo: &str,
7103    ) -> Request<'_, endpoints::OrgListTeamRepo<'_>, Repository> {
7104        endpoints::OrgListTeamRepo { id, org, repo }
7105            .make_request()
7106            .wrap::<_, _>(self)
7107    }
7108
7109    /// Add a repository to a team
7110    ///
7111    /// - `id`: id of the team
7112    /// - `org`: organization that owns the repo to add
7113    /// - `repo`: name of the repo to add
7114    pub fn org_add_team_repository(
7115        &self,
7116        id: i64,
7117        org: &str,
7118        repo: &str,
7119    ) -> Request<'_, endpoints::OrgAddTeamRepository<'_>, ()> {
7120        endpoints::OrgAddTeamRepository { id, org, repo }
7121            .make_request()
7122            .wrap::<_, _>(self)
7123    }
7124
7125    /// Remove a repository from a team
7126    ///
7127    /// - `id`: id of the team
7128    /// - `org`: organization that owns the repo to remove
7129    /// - `repo`: name of the repo to remove
7130    pub fn org_remove_team_repository(
7131        &self,
7132        id: i64,
7133        org: &str,
7134        repo: &str,
7135    ) -> Request<'_, endpoints::OrgRemoveTeamRepository<'_>, ()> {
7136        endpoints::OrgRemoveTeamRepository { id, org, repo }
7137            .make_request()
7138            .wrap::<_, _>(self)
7139    }
7140
7141    /// Search for topics by keyword
7142    ///
7143    pub fn topic_search(
7144        &self,
7145        query: TopicSearchQuery,
7146    ) -> Request<'_, endpoints::TopicSearch, TopicSearchResults> {
7147        endpoints::TopicSearch { query }
7148            .make_request()
7149            .wrap::<_, _>(self)
7150    }
7151
7152    /// Get the authenticated user
7153    pub fn user_get_current(&self) -> Request<'_, endpoints::UserGetCurrent, User> {
7154        endpoints::UserGetCurrent {}
7155            .make_request()
7156            .wrap::<_, _>(self)
7157    }
7158
7159    /// Get the user's runners
7160    ///
7161    pub fn get_user_runners(
7162        &self,
7163        query: GetUserRunnersQuery,
7164    ) -> Request<'_, endpoints::GetUserRunners, (ActionRunnerListHeaders, Vec<ActionRunner>)> {
7165        endpoints::GetUserRunners { query }
7166            .make_request()
7167            .wrap::<_, _>(self)
7168    }
7169
7170    /// Register a new user-level runner
7171    ///
7172    /// - `body`: See [`RegisterRunnerOptions`]
7173    pub fn register_user_runner(
7174        &self,
7175        body: RegisterRunnerOptions,
7176    ) -> Request<'_, endpoints::RegisterUserRunner, RegisterRunnerResponse> {
7177        endpoints::RegisterUserRunner { body: body }
7178            .make_request()
7179            .wrap::<_, _>(self)
7180    }
7181
7182    /// Search for user's action jobs according filter conditions
7183    ///
7184    pub fn user_search_run_jobs(
7185        &self,
7186        query: UserSearchRunJobsQuery,
7187    ) -> Request<'_, endpoints::UserSearchRunJobs, Vec<ActionRunJob>> {
7188        endpoints::UserSearchRunJobs { query }
7189            .make_request()
7190            .wrap::<_, _>(self)
7191    }
7192
7193    /// Get the user's runner registration token
7194    pub fn user_get_runner_registration_token(
7195        &self,
7196    ) -> Request<'_, endpoints::UserGetRunnerRegistrationToken, RegistrationToken> {
7197        endpoints::UserGetRunnerRegistrationToken {}
7198            .make_request()
7199            .wrap::<_, _>(self)
7200    }
7201
7202    /// Get a particular runner that belongs to the user
7203    ///
7204    /// - `runner_id`: ID of the runner
7205    pub fn get_user_runner(
7206        &self,
7207        runner_id: &str,
7208    ) -> Request<'_, endpoints::GetUserRunner<'_>, ActionRunner> {
7209        endpoints::GetUserRunner { runner_id }
7210            .make_request()
7211            .wrap::<_, _>(self)
7212    }
7213
7214    /// Delete a particular user-level runner
7215    ///
7216    /// - `runner_id`: ID of the runner
7217    pub fn delete_user_runner(
7218        &self,
7219        runner_id: &str,
7220    ) -> Request<'_, endpoints::DeleteUserRunner<'_>, ()> {
7221        endpoints::DeleteUserRunner { runner_id }
7222            .make_request()
7223            .wrap::<_, _>(self)
7224    }
7225
7226    /// List actions secrets of the current user
7227    ///
7228    pub fn user_list_actions_secrets(
7229        &self,
7230    ) -> Request<'_, endpoints::UserListActionsSecrets, (SecretListHeaders, Vec<Secret>)> {
7231        endpoints::UserListActionsSecrets {}
7232            .make_request()
7233            .wrap::<_, _>(self)
7234    }
7235
7236    /// Create or Update a secret value in a user scope
7237    ///
7238    /// - `secretname`: name of the secret
7239    /// - `body`: See [`CreateOrUpdateSecretOption`]
7240    pub fn update_user_secret(
7241        &self,
7242        secretname: &str,
7243        body: CreateOrUpdateSecretOption,
7244    ) -> Request<'_, endpoints::UpdateUserSecret<'_>, ()> {
7245        endpoints::UpdateUserSecret {
7246            secretname,
7247            body: body,
7248        }
7249        .make_request()
7250        .wrap::<_, _>(self)
7251    }
7252
7253    /// Delete a secret in a user scope
7254    ///
7255    /// - `secretname`: name of the secret
7256    pub fn delete_user_secret(
7257        &self,
7258        secretname: &str,
7259    ) -> Request<'_, endpoints::DeleteUserSecret<'_>, ()> {
7260        endpoints::DeleteUserSecret { secretname }
7261            .make_request()
7262            .wrap::<_, _>(self)
7263    }
7264
7265    /// Get the user-level list of variables which is created by current doer
7266    ///
7267    pub fn get_user_variables_list(
7268        &self,
7269    ) -> Request<'_, endpoints::GetUserVariablesList, (VariableListHeaders, Vec<ActionVariable>)>
7270    {
7271        endpoints::GetUserVariablesList {}
7272            .make_request()
7273            .wrap::<_, _>(self)
7274    }
7275
7276    /// Get a user-level variable which is created by current doer
7277    ///
7278    /// - `variablename`: name of the variable
7279    pub fn get_user_variable(
7280        &self,
7281        variablename: &str,
7282    ) -> Request<'_, endpoints::GetUserVariable<'_>, ActionVariable> {
7283        endpoints::GetUserVariable { variablename }
7284            .make_request()
7285            .wrap::<_, _>(self)
7286    }
7287
7288    /// Update a user-level variable which is created by current doer
7289    ///
7290    /// - `variablename`: name of the variable
7291    /// - `body`: See [`UpdateVariableOption`]
7292    pub fn update_user_variable(
7293        &self,
7294        variablename: &str,
7295        body: UpdateVariableOption,
7296    ) -> Request<'_, endpoints::UpdateUserVariable<'_>, ()> {
7297        endpoints::UpdateUserVariable {
7298            variablename,
7299            body: body,
7300        }
7301        .make_request()
7302        .wrap::<_, _>(self)
7303    }
7304
7305    /// Create a user-level variable
7306    ///
7307    /// - `variablename`: name of the variable
7308    /// - `body`: See [`CreateVariableOption`]
7309    pub fn create_user_variable(
7310        &self,
7311        variablename: &str,
7312        body: CreateVariableOption,
7313    ) -> Request<'_, endpoints::CreateUserVariable<'_>, ()> {
7314        endpoints::CreateUserVariable {
7315            variablename,
7316            body: body,
7317        }
7318        .make_request()
7319        .wrap::<_, _>(self)
7320    }
7321
7322    /// Delete a user-level variable which is created by current doer
7323    ///
7324    /// - `variablename`: name of the variable
7325    pub fn delete_user_variable(
7326        &self,
7327        variablename: &str,
7328    ) -> Request<'_, endpoints::DeleteUserVariable<'_>, ()> {
7329        endpoints::DeleteUserVariable { variablename }
7330            .make_request()
7331            .wrap::<_, _>(self)
7332    }
7333
7334    /// Follow a remote activitypub account
7335    ///
7336    /// - `body`: See [`APRemoteFollowOption`]
7337    pub fn user_current_activity_pub_follow(
7338        &self,
7339        body: APRemoteFollowOption,
7340    ) -> Request<'_, endpoints::UserCurrentActivityPubFollow, ()> {
7341        endpoints::UserCurrentActivityPubFollow { body: body }
7342            .make_request()
7343            .wrap::<_, _>(self)
7344    }
7345
7346    /// List the authenticated user's oauth2 applications
7347    ///
7348    pub fn user_get_oauth2_applications(
7349        &self,
7350    ) -> Request<
7351        '_,
7352        endpoints::UserGetOAuth2Applications,
7353        (OAuth2ApplicationListHeaders, Vec<OAuth2Application>),
7354    > {
7355        endpoints::UserGetOAuth2Applications {}
7356            .make_request()
7357            .wrap::<_, _>(self)
7358    }
7359
7360    /// Creates a new OAuth2 application
7361    ///
7362    /// - `body`: See [`CreateOAuth2ApplicationOptions`]
7363    pub fn user_create_oauth2_application(
7364        &self,
7365        body: CreateOAuth2ApplicationOptions,
7366    ) -> Request<'_, endpoints::UserCreateOAuth2Application, OAuth2Application> {
7367        endpoints::UserCreateOAuth2Application { body: body }
7368            .make_request()
7369            .wrap::<_, _>(self)
7370    }
7371
7372    /// Get an OAuth2 application
7373    ///
7374    /// - `id`: Application ID to be found
7375    pub fn user_get_oauth2_application(
7376        &self,
7377        id: i64,
7378    ) -> Request<'_, endpoints::UserGetOAuth2Application, OAuth2Application> {
7379        endpoints::UserGetOAuth2Application { id }
7380            .make_request()
7381            .wrap::<_, _>(self)
7382    }
7383
7384    /// Delete an OAuth2 application
7385    ///
7386    /// - `id`: token to be deleted
7387    pub fn user_delete_oauth2_application(
7388        &self,
7389        id: i64,
7390    ) -> Request<'_, endpoints::UserDeleteOAuth2Application, ()> {
7391        endpoints::UserDeleteOAuth2Application { id }
7392            .make_request()
7393            .wrap::<_, _>(self)
7394    }
7395
7396    /// Update an OAuth2 application, this includes regenerating the client secret
7397    ///
7398    /// - `id`: application to be updated
7399    /// - `body`: See [`CreateOAuth2ApplicationOptions`]
7400    pub fn user_update_oauth2_application(
7401        &self,
7402        id: i64,
7403        body: CreateOAuth2ApplicationOptions,
7404    ) -> Request<'_, endpoints::UserUpdateOAuth2Application, OAuth2Application> {
7405        endpoints::UserUpdateOAuth2Application { id, body: body }
7406            .make_request()
7407            .wrap::<_, _>(self)
7408    }
7409
7410    /// Update avatar of the current user
7411    ///
7412    /// - `body`: See [`UpdateUserAvatarOption`]
7413    pub fn user_update_avatar(
7414        &self,
7415        body: UpdateUserAvatarOption,
7416    ) -> Request<'_, endpoints::UserUpdateAvatar, ()> {
7417        endpoints::UserUpdateAvatar { body: body }
7418            .make_request()
7419            .wrap::<_, _>(self)
7420    }
7421
7422    /// Delete avatar of the current user. It will be replaced by a default one
7423    pub fn user_delete_avatar(&self) -> Request<'_, endpoints::UserDeleteAvatar, ()> {
7424        endpoints::UserDeleteAvatar {}
7425            .make_request()
7426            .wrap::<_, _>(self)
7427    }
7428
7429    /// Blocks a user from the doer
7430    ///
7431    /// - `username`: username of the user
7432    pub fn user_block_user(&self, username: &str) -> Request<'_, endpoints::UserBlockUser<'_>, ()> {
7433        endpoints::UserBlockUser { username }
7434            .make_request()
7435            .wrap::<_, _>(self)
7436    }
7437
7438    /// List all email addresses of the current user
7439    pub fn user_list_emails(&self) -> Request<'_, endpoints::UserListEmails, Vec<Email>> {
7440        endpoints::UserListEmails {}
7441            .make_request()
7442            .wrap::<_, _>(self)
7443    }
7444
7445    /// Add an email addresses to the current user's account
7446    ///
7447    /// - `body`: See [`CreateEmailOption`]
7448    pub fn user_add_email(
7449        &self,
7450        body: CreateEmailOption,
7451    ) -> Request<'_, endpoints::UserAddEmail, Vec<Email>> {
7452        endpoints::UserAddEmail { body: body }
7453            .make_request()
7454            .wrap::<_, _>(self)
7455    }
7456
7457    /// Delete email addresses from the current user's account
7458    ///
7459    /// - `body`: See [`DeleteEmailOption`]
7460    pub fn user_delete_email(
7461        &self,
7462        body: DeleteEmailOption,
7463    ) -> Request<'_, endpoints::UserDeleteEmail, ()> {
7464        endpoints::UserDeleteEmail { body: body }
7465            .make_request()
7466            .wrap::<_, _>(self)
7467    }
7468
7469    /// List the authenticated user's followers
7470    ///
7471    pub fn user_current_list_followers(
7472        &self,
7473    ) -> Request<'_, endpoints::UserCurrentListFollowers, (UserListHeaders, Vec<User>)> {
7474        endpoints::UserCurrentListFollowers {}
7475            .make_request()
7476            .wrap::<_, _>(self)
7477    }
7478
7479    /// List the users that the authenticated user is following
7480    ///
7481    pub fn user_current_list_following(
7482        &self,
7483    ) -> Request<'_, endpoints::UserCurrentListFollowing, (UserListHeaders, Vec<User>)> {
7484        endpoints::UserCurrentListFollowing {}
7485            .make_request()
7486            .wrap::<_, _>(self)
7487    }
7488
7489    /// Check whether a user is followed by the authenticated user
7490    ///
7491    /// - `username`: username of followed user
7492    pub fn user_current_check_following(
7493        &self,
7494        username: &str,
7495    ) -> Request<'_, endpoints::UserCurrentCheckFollowing<'_>, ()> {
7496        endpoints::UserCurrentCheckFollowing { username }
7497            .make_request()
7498            .wrap::<_, _>(self)
7499    }
7500
7501    /// Follow a user
7502    ///
7503    /// - `username`: username of user to follow
7504    pub fn user_current_put_follow(
7505        &self,
7506        username: &str,
7507    ) -> Request<'_, endpoints::UserCurrentPutFollow<'_>, ()> {
7508        endpoints::UserCurrentPutFollow { username }
7509            .make_request()
7510            .wrap::<_, _>(self)
7511    }
7512
7513    /// Unfollow a user
7514    ///
7515    /// - `username`: username of user to unfollow
7516    pub fn user_current_delete_follow(
7517        &self,
7518        username: &str,
7519    ) -> Request<'_, endpoints::UserCurrentDeleteFollow<'_>, ()> {
7520        endpoints::UserCurrentDeleteFollow { username }
7521            .make_request()
7522            .wrap::<_, _>(self)
7523    }
7524
7525    /// Get a Token to verify
7526    pub fn get_verification_token(&self) -> Request<'_, endpoints::GetVerificationToken, String> {
7527        endpoints::GetVerificationToken {}
7528            .make_request()
7529            .wrap::<_, _>(self)
7530    }
7531
7532    /// Verify a GPG key
7533    ///
7534    /// - `body`: See [`VerifyGPGKeyOption`]
7535    pub fn user_verify_gpg_key(
7536        &self,
7537        body: VerifyGPGKeyOption,
7538    ) -> Request<'_, endpoints::UserVerifyGpgKey, GPGKey> {
7539        endpoints::UserVerifyGpgKey { body: body }
7540            .make_request()
7541            .wrap::<_, _>(self)
7542    }
7543
7544    /// List the authenticated user's GPG keys
7545    ///
7546    pub fn user_current_list_gpg_keys(
7547        &self,
7548    ) -> Request<'_, endpoints::UserCurrentListGpgKeys, (GpgKeyListHeaders, Vec<GPGKey>)> {
7549        endpoints::UserCurrentListGpgKeys {}
7550            .make_request()
7551            .wrap::<_, _>(self)
7552    }
7553
7554    /// Add a GPG public key to current user's account
7555    ///
7556    /// - `Form`: See [`CreateGPGKeyOption`]
7557    pub fn user_current_post_gpg_key(
7558        &self,
7559        form: CreateGPGKeyOption,
7560    ) -> Request<'_, endpoints::UserCurrentPostGpgKey, GPGKey> {
7561        endpoints::UserCurrentPostGpgKey { body: form }
7562            .make_request()
7563            .wrap::<_, _>(self)
7564    }
7565
7566    /// Get a GPG key
7567    ///
7568    /// - `id`: id of key to get
7569    pub fn user_current_get_gpg_key(
7570        &self,
7571        id: i64,
7572    ) -> Request<'_, endpoints::UserCurrentGetGpgKey, GPGKey> {
7573        endpoints::UserCurrentGetGpgKey { id }
7574            .make_request()
7575            .wrap::<_, _>(self)
7576    }
7577
7578    /// Remove a GPG public key from current user's account
7579    ///
7580    /// - `id`: id of key to delete
7581    pub fn user_current_delete_gpg_key(
7582        &self,
7583        id: i64,
7584    ) -> Request<'_, endpoints::UserCurrentDeleteGpgKey, ()> {
7585        endpoints::UserCurrentDeleteGpgKey { id }
7586            .make_request()
7587            .wrap::<_, _>(self)
7588    }
7589
7590    /// List the authenticated user's webhooks
7591    ///
7592    pub fn user_list_hooks(&self) -> Request<'_, endpoints::UserListHooks, Vec<Hook>> {
7593        endpoints::UserListHooks {}
7594            .make_request()
7595            .wrap::<_, _>(self)
7596    }
7597
7598    /// Create a hook
7599    ///
7600    /// - `body`: See [`CreateHookOption`]
7601    pub fn user_create_hook(
7602        &self,
7603        body: CreateHookOption,
7604    ) -> Request<'_, endpoints::UserCreateHook, Hook> {
7605        endpoints::UserCreateHook { body: body }
7606            .make_request()
7607            .wrap::<_, _>(self)
7608    }
7609
7610    /// Get a hook
7611    ///
7612    /// - `id`: id of the hook to get
7613    pub fn user_get_hook(&self, id: i64) -> Request<'_, endpoints::UserGetHook, Hook> {
7614        endpoints::UserGetHook { id }
7615            .make_request()
7616            .wrap::<_, _>(self)
7617    }
7618
7619    /// Delete a hook
7620    ///
7621    /// - `id`: id of the hook to delete
7622    pub fn user_delete_hook(&self, id: i64) -> Request<'_, endpoints::UserDeleteHook, ()> {
7623        endpoints::UserDeleteHook { id }
7624            .make_request()
7625            .wrap::<_, _>(self)
7626    }
7627
7628    /// Update a hook
7629    ///
7630    /// - `id`: id of the hook to update
7631    /// - `body`: See [`EditHookOption`]
7632    pub fn user_edit_hook(
7633        &self,
7634        id: i64,
7635        body: EditHookOption,
7636    ) -> Request<'_, endpoints::UserEditHook, Hook> {
7637        endpoints::UserEditHook { id, body: body }
7638            .make_request()
7639            .wrap::<_, _>(self)
7640    }
7641
7642    /// List the authenticated user's public keys
7643    ///
7644    pub fn user_current_list_keys(
7645        &self,
7646        query: UserCurrentListKeysQuery,
7647    ) -> Request<'_, endpoints::UserCurrentListKeys, (PublicKeyListHeaders, Vec<PublicKey>)> {
7648        endpoints::UserCurrentListKeys { query }
7649            .make_request()
7650            .wrap::<_, _>(self)
7651    }
7652
7653    /// Create a public key
7654    ///
7655    /// - `body`: See [`CreateKeyOption`]
7656    pub fn user_current_post_key(
7657        &self,
7658        body: CreateKeyOption,
7659    ) -> Request<'_, endpoints::UserCurrentPostKey, PublicKey> {
7660        endpoints::UserCurrentPostKey { body: body }
7661            .make_request()
7662            .wrap::<_, _>(self)
7663    }
7664
7665    /// Get a public key
7666    ///
7667    /// - `id`: id of key to get
7668    pub fn user_current_get_key(
7669        &self,
7670        id: i64,
7671    ) -> Request<'_, endpoints::UserCurrentGetKey, PublicKey> {
7672        endpoints::UserCurrentGetKey { id }
7673            .make_request()
7674            .wrap::<_, _>(self)
7675    }
7676
7677    /// Delete a public key
7678    ///
7679    /// - `id`: id of key to delete
7680    pub fn user_current_delete_key(
7681        &self,
7682        id: i64,
7683    ) -> Request<'_, endpoints::UserCurrentDeleteKey, ()> {
7684        endpoints::UserCurrentDeleteKey { id }
7685            .make_request()
7686            .wrap::<_, _>(self)
7687    }
7688
7689    /// List the authenticated user's blocked users
7690    ///
7691    pub fn user_list_blocked_users(
7692        &self,
7693    ) -> Request<'_, endpoints::UserListBlockedUsers, (BlockedUserListHeaders, Vec<BlockedUser>)>
7694    {
7695        endpoints::UserListBlockedUsers {}
7696            .make_request()
7697            .wrap::<_, _>(self)
7698    }
7699
7700    /// List the current user's organizations
7701    ///
7702    pub fn org_list_current_user_orgs(
7703        &self,
7704    ) -> Request<'_, endpoints::OrgListCurrentUserOrgs, Vec<Organization>> {
7705        endpoints::OrgListCurrentUserOrgs {}
7706            .make_request()
7707            .wrap::<_, _>(self)
7708    }
7709
7710    /// Get quota information for the authenticated user
7711    pub fn user_get_quota(&self) -> Request<'_, endpoints::UserGetQuota, QuotaInfo> {
7712        endpoints::UserGetQuota {}.make_request().wrap::<_, _>(self)
7713    }
7714
7715    /// List the artifacts affecting the authenticated user's quota
7716    ///
7717    pub fn user_list_quota_artifacts(
7718        &self,
7719    ) -> Request<
7720        '_,
7721        endpoints::UserListQuotaArtifacts,
7722        (QuotaUsedArtifactListHeaders, Vec<QuotaUsedArtifact>),
7723    > {
7724        endpoints::UserListQuotaArtifacts {}
7725            .make_request()
7726            .wrap::<_, _>(self)
7727    }
7728
7729    /// List the attachments affecting the authenticated user's quota
7730    ///
7731    pub fn user_list_quota_attachments(
7732        &self,
7733    ) -> Request<
7734        '_,
7735        endpoints::UserListQuotaAttachments,
7736        (QuotaUsedAttachmentListHeaders, Vec<QuotaUsedAttachment>),
7737    > {
7738        endpoints::UserListQuotaAttachments {}
7739            .make_request()
7740            .wrap::<_, _>(self)
7741    }
7742
7743    /// Check if the authenticated user is over quota for a given subject
7744    ///
7745    pub fn user_check_quota(
7746        &self,
7747        query: UserCheckQuotaQuery,
7748    ) -> Request<'_, endpoints::UserCheckQuota, bool> {
7749        endpoints::UserCheckQuota { query }
7750            .make_request()
7751            .wrap::<_, _>(self)
7752    }
7753
7754    /// List the packages affecting the authenticated user's quota
7755    ///
7756    pub fn user_list_quota_packages(
7757        &self,
7758    ) -> Request<
7759        '_,
7760        endpoints::UserListQuotaPackages,
7761        (QuotaUsedPackageListHeaders, Vec<QuotaUsedPackage>),
7762    > {
7763        endpoints::UserListQuotaPackages {}
7764            .make_request()
7765            .wrap::<_, _>(self)
7766    }
7767
7768    /// List the repos that the authenticated user owns
7769    ///
7770    pub fn user_current_list_repos(
7771        &self,
7772        query: UserCurrentListReposQuery,
7773    ) -> Request<'_, endpoints::UserCurrentListRepos, (RepositoryListHeaders, Vec<Repository>)>
7774    {
7775        endpoints::UserCurrentListRepos { query }
7776            .make_request()
7777            .wrap::<_, _>(self)
7778    }
7779
7780    /// Create a repository
7781    ///
7782    /// - `body`: See [`CreateRepoOption`]
7783    pub fn create_current_user_repo(
7784        &self,
7785        body: CreateRepoOption,
7786    ) -> Request<'_, endpoints::CreateCurrentUserRepo, Repository> {
7787        endpoints::CreateCurrentUserRepo { body: body }
7788            .make_request()
7789            .wrap::<_, _>(self)
7790    }
7791
7792    /// Get current user's account settings
7793    pub fn get_user_settings(&self) -> Request<'_, endpoints::GetUserSettings, UserSettings> {
7794        endpoints::GetUserSettings {}
7795            .make_request()
7796            .wrap::<_, _>(self)
7797    }
7798
7799    /// Update settings in current user's account
7800    ///
7801    /// - `body`: See [`UserSettingsOptions`]
7802    pub fn update_user_settings(
7803        &self,
7804        body: UserSettingsOptions,
7805    ) -> Request<'_, endpoints::UpdateUserSettings, UserSettings> {
7806        endpoints::UpdateUserSettings { body: body }
7807            .make_request()
7808            .wrap::<_, _>(self)
7809    }
7810
7811    /// The repos that the authenticated user has starred
7812    ///
7813    pub fn user_current_list_starred(
7814        &self,
7815    ) -> Request<'_, endpoints::UserCurrentListStarred, (RepositoryListHeaders, Vec<Repository>)>
7816    {
7817        endpoints::UserCurrentListStarred {}
7818            .make_request()
7819            .wrap::<_, _>(self)
7820    }
7821
7822    /// Whether the authenticated is starring the repo
7823    ///
7824    /// - `owner`: owner of the repo
7825    /// - `repo`: name of the repo
7826    pub fn user_current_check_starring(
7827        &self,
7828        owner: &str,
7829        repo: &str,
7830    ) -> Request<'_, endpoints::UserCurrentCheckStarring<'_>, ()> {
7831        endpoints::UserCurrentCheckStarring { owner, repo }
7832            .make_request()
7833            .wrap::<_, _>(self)
7834    }
7835
7836    /// Star the given repo
7837    ///
7838    /// - `owner`: owner of the repo to star
7839    /// - `repo`: name of the repo to star
7840    pub fn user_current_put_star(
7841        &self,
7842        owner: &str,
7843        repo: &str,
7844    ) -> Request<'_, endpoints::UserCurrentPutStar<'_>, ()> {
7845        endpoints::UserCurrentPutStar { owner, repo }
7846            .make_request()
7847            .wrap::<_, _>(self)
7848    }
7849
7850    /// Unstar the given repo
7851    ///
7852    /// - `owner`: owner of the repo to unstar
7853    /// - `repo`: name of the repo to unstar
7854    pub fn user_current_delete_star(
7855        &self,
7856        owner: &str,
7857        repo: &str,
7858    ) -> Request<'_, endpoints::UserCurrentDeleteStar<'_>, ()> {
7859        endpoints::UserCurrentDeleteStar { owner, repo }
7860            .make_request()
7861            .wrap::<_, _>(self)
7862    }
7863
7864    /// Get list of all existing stopwatches
7865    ///
7866    pub fn user_get_stop_watches(
7867        &self,
7868    ) -> Request<'_, endpoints::UserGetStopWatches, (StopWatchListHeaders, Vec<StopWatch>)> {
7869        endpoints::UserGetStopWatches {}
7870            .make_request()
7871            .wrap::<_, _>(self)
7872    }
7873
7874    /// List repositories watched by the authenticated user
7875    ///
7876    pub fn user_current_list_subscriptions(
7877        &self,
7878    ) -> Request<
7879        '_,
7880        endpoints::UserCurrentListSubscriptions,
7881        (RepositoryListHeaders, Vec<Repository>),
7882    > {
7883        endpoints::UserCurrentListSubscriptions {}
7884            .make_request()
7885            .wrap::<_, _>(self)
7886    }
7887
7888    /// List all the teams a user belongs to
7889    ///
7890    pub fn user_list_teams(
7891        &self,
7892    ) -> Request<'_, endpoints::UserListTeams, (TeamListHeaders, Vec<Team>)> {
7893        endpoints::UserListTeams {}
7894            .make_request()
7895            .wrap::<_, _>(self)
7896    }
7897
7898    /// List the current user's tracked times
7899    ///
7900    pub fn user_current_tracked_times(
7901        &self,
7902        query: UserCurrentTrackedTimesQuery,
7903    ) -> Request<'_, endpoints::UserCurrentTrackedTimes, (TrackedTimeListHeaders, Vec<TrackedTime>)>
7904    {
7905        endpoints::UserCurrentTrackedTimes { query }
7906            .make_request()
7907            .wrap::<_, _>(self)
7908    }
7909
7910    /// Unblocks a user from the doer
7911    ///
7912    /// - `username`: username of the user
7913    pub fn user_unblock_user(
7914        &self,
7915        username: &str,
7916    ) -> Request<'_, endpoints::UserUnblockUser<'_>, ()> {
7917        endpoints::UserUnblockUser { username }
7918            .make_request()
7919            .wrap::<_, _>(self)
7920    }
7921
7922    /// Search for users
7923    ///
7924    pub fn user_search(
7925        &self,
7926        query: UserSearchQuery,
7927    ) -> Request<'_, endpoints::UserSearch, UserSearchResults> {
7928        endpoints::UserSearch { query }
7929            .make_request()
7930            .wrap::<_, _>(self)
7931    }
7932
7933    /// Get a user
7934    ///
7935    /// - `username`: username of user to get
7936    pub fn user_get(&self, username: &str) -> Request<'_, endpoints::UserGet<'_>, User> {
7937        endpoints::UserGet { username }
7938            .make_request()
7939            .wrap::<_, _>(self)
7940    }
7941
7942    /// List a user's activity feeds
7943    ///
7944    /// - `username`: username of user
7945    pub fn user_list_activity_feeds(
7946        &self,
7947        username: &str,
7948        query: UserListActivityFeedsQuery,
7949    ) -> Request<'_, endpoints::UserListActivityFeeds<'_>, (ActivityFeedsListHeaders, Vec<Activity>)>
7950    {
7951        endpoints::UserListActivityFeeds { username, query }
7952            .make_request()
7953            .wrap::<_, _>(self)
7954    }
7955
7956    /// List the given user's followers
7957    ///
7958    /// - `username`: username of user
7959    pub fn user_list_followers(
7960        &self,
7961        username: &str,
7962    ) -> Request<'_, endpoints::UserListFollowers<'_>, (UserListHeaders, Vec<User>)> {
7963        endpoints::UserListFollowers { username }
7964            .make_request()
7965            .wrap::<_, _>(self)
7966    }
7967
7968    /// List the users that the given user is following
7969    ///
7970    /// - `username`: username of user
7971    pub fn user_list_following(
7972        &self,
7973        username: &str,
7974    ) -> Request<'_, endpoints::UserListFollowing<'_>, (UserListHeaders, Vec<User>)> {
7975        endpoints::UserListFollowing { username }
7976            .make_request()
7977            .wrap::<_, _>(self)
7978    }
7979
7980    /// Check if one user is following another user
7981    ///
7982    /// - `username`: username of following user
7983    /// - `target`: username of followed user
7984    pub fn user_check_following(
7985        &self,
7986        username: &str,
7987        target: &str,
7988    ) -> Request<'_, endpoints::UserCheckFollowing<'_>, ()> {
7989        endpoints::UserCheckFollowing { username, target }
7990            .make_request()
7991            .wrap::<_, _>(self)
7992    }
7993
7994    /// List the given user's GPG keys
7995    ///
7996    /// - `username`: username of user
7997    pub fn user_list_gpg_keys(
7998        &self,
7999        username: &str,
8000    ) -> Request<'_, endpoints::UserListGpgKeys<'_>, (GpgKeyListHeaders, Vec<GPGKey>)> {
8001        endpoints::UserListGpgKeys { username }
8002            .make_request()
8003            .wrap::<_, _>(self)
8004    }
8005
8006    /// Get a user's heatmap
8007    ///
8008    /// - `username`: username of user to get
8009    pub fn user_get_heatmap_data(
8010        &self,
8011        username: &str,
8012    ) -> Request<'_, endpoints::UserGetHeatmapData<'_>, Vec<UserHeatmapData>> {
8013        endpoints::UserGetHeatmapData { username }
8014            .make_request()
8015            .wrap::<_, _>(self)
8016    }
8017
8018    /// List the given user's public keys
8019    ///
8020    /// - `username`: username of user
8021    pub fn user_list_keys(
8022        &self,
8023        username: &str,
8024        query: UserListKeysQuery,
8025    ) -> Request<'_, endpoints::UserListKeys<'_>, (PublicKeyListHeaders, Vec<PublicKey>)> {
8026        endpoints::UserListKeys { username, query }
8027            .make_request()
8028            .wrap::<_, _>(self)
8029    }
8030
8031    /// List a user's organizations
8032    ///
8033    /// - `username`: username of user
8034    pub fn org_list_user_orgs(
8035        &self,
8036        username: &str,
8037    ) -> Request<'_, endpoints::OrgListUserOrgs<'_>, Vec<Organization>> {
8038        endpoints::OrgListUserOrgs { username }
8039            .make_request()
8040            .wrap::<_, _>(self)
8041    }
8042
8043    /// Get user permissions in organization
8044    ///
8045    /// - `username`: username of user
8046    /// - `org`: name of the organization
8047    pub fn org_get_user_permissions(
8048        &self,
8049        username: &str,
8050        org: &str,
8051    ) -> Request<'_, endpoints::OrgGetUserPermissions<'_>, OrganizationPermissions> {
8052        endpoints::OrgGetUserPermissions { username, org }
8053            .make_request()
8054            .wrap::<_, _>(self)
8055    }
8056
8057    /// List the repos owned by the given user
8058    ///
8059    /// - `username`: username of user
8060    pub fn user_list_repos(
8061        &self,
8062        username: &str,
8063    ) -> Request<'_, endpoints::UserListRepos<'_>, (RepositoryListHeaders, Vec<Repository>)> {
8064        endpoints::UserListRepos { username }
8065            .make_request()
8066            .wrap::<_, _>(self)
8067    }
8068
8069    /// The repos that the given user has starred
8070    ///
8071    /// - `username`: username of user
8072    pub fn user_list_starred(
8073        &self,
8074        username: &str,
8075    ) -> Request<'_, endpoints::UserListStarred<'_>, (RepositoryListHeaders, Vec<Repository>)> {
8076        endpoints::UserListStarred { username }
8077            .make_request()
8078            .wrap::<_, _>(self)
8079    }
8080
8081    /// List the repositories watched by a user
8082    ///
8083    /// - `username`: username of the user
8084    pub fn user_list_subscriptions(
8085        &self,
8086        username: &str,
8087    ) -> Request<'_, endpoints::UserListSubscriptions<'_>, (RepositoryListHeaders, Vec<Repository>)>
8088    {
8089        endpoints::UserListSubscriptions { username }
8090            .make_request()
8091            .wrap::<_, _>(self)
8092    }
8093
8094    /// List the specified user's access tokens
8095    ///
8096    /// - `username`: username of user
8097    pub fn user_get_tokens(
8098        &self,
8099        username: &str,
8100    ) -> Request<'_, endpoints::UserGetTokens<'_>, (AccessTokenListHeaders, Vec<AccessToken>)> {
8101        endpoints::UserGetTokens { username }
8102            .make_request()
8103            .wrap::<_, _>(self)
8104    }
8105
8106    /// Generate an access token for the specified user
8107    ///
8108    /// - `username`: username of user
8109    /// - `body`: See [`CreateAccessTokenOption`]
8110    pub fn user_create_token(
8111        &self,
8112        username: &str,
8113        body: CreateAccessTokenOption,
8114    ) -> Request<'_, endpoints::UserCreateToken<'_>, AccessToken> {
8115        endpoints::UserCreateToken {
8116            username,
8117            body: body,
8118        }
8119        .make_request()
8120        .wrap::<_, _>(self)
8121    }
8122
8123    /// Delete an access token from the specified user's account
8124    ///
8125    /// - `username`: username of user
8126    /// - `token`: token to be deleted, identified by ID and if not available by name
8127    pub fn user_delete_access_token(
8128        &self,
8129        username: &str,
8130        token: &str,
8131    ) -> Request<'_, endpoints::UserDeleteAccessToken<'_>, ()> {
8132        endpoints::UserDeleteAccessToken { username, token }
8133            .make_request()
8134            .wrap::<_, _>(self)
8135    }
8136
8137    /// Returns the version of the running application
8138    pub fn get_version(&self) -> Request<'_, endpoints::GetVersion, ServerVersion> {
8139        endpoints::GetVersion {}.make_request().wrap::<_, _>(self)
8140    }
8141}