1use crate::StructureError;
2use std::collections::BTreeMap;
3#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
5pub struct APIError {
6 pub message: Option<String>,
7 #[serde(deserialize_with = "crate::none_if_blank_url")]
8 pub url: Option<url::Url>,
9}
10
11#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
12pub struct APIForbiddenError {
13 pub message: Option<String>,
14 pub url: Option<String>,
15}
16
17#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
18pub struct APIInvalidTopicsError {
19 #[serde(rename = "invalidTopics")]
20 pub invalid_topics: Option<Vec<String>>,
21 pub message: Option<String>,
22}
23
24#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
25pub struct APINotFound {
26 pub errors: Option<Vec<String>>,
27 pub message: Option<String>,
28 pub url: Option<String>,
29}
30
31#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
32pub struct APIRepoArchivedError {
33 pub message: Option<String>,
34 pub url: Option<String>,
35}
36
37#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
38pub struct APIUnauthorizedError {
39 pub message: Option<String>,
40 pub url: Option<String>,
41}
42
43#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
44pub struct APIValidationError {
45 pub message: Option<String>,
46 pub url: Option<String>,
47}
48
49#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
50pub struct AccessToken {
51 pub id: Option<i64>,
52 pub name: Option<String>,
53 pub scopes: Option<Vec<String>>,
54 pub sha1: Option<String>,
55 pub token_last_eight: Option<String>,
56}
57
58#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
60pub struct ActionTask {
61 #[serde(with = "time::serde::rfc3339::option")]
62 pub created_at: Option<time::OffsetDateTime>,
63 pub display_title: Option<String>,
64 pub event: Option<String>,
65 pub head_branch: Option<String>,
66 pub head_sha: Option<String>,
67 pub id: Option<i64>,
68 pub name: Option<String>,
69 pub run_number: Option<i64>,
70 #[serde(with = "time::serde::rfc3339::option")]
71 pub run_started_at: Option<time::OffsetDateTime>,
72 pub status: Option<String>,
73 #[serde(with = "time::serde::rfc3339::option")]
74 pub updated_at: Option<time::OffsetDateTime>,
75 #[serde(deserialize_with = "crate::none_if_blank_url")]
76 pub url: Option<url::Url>,
77 pub workflow_id: Option<String>,
78}
79
80#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
82pub struct ActionTaskResponse {
83 pub total_count: Option<i64>,
84 pub workflow_runs: Option<Vec<ActionTask>>,
85}
86
87#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
89pub struct ActionVariable {
90 pub data: Option<String>,
92 pub name: Option<String>,
94 pub owner_id: Option<i64>,
96 pub repo_id: Option<i64>,
98}
99
100#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
101pub struct Activity {
102 pub act_user: Option<User>,
103 pub act_user_id: Option<i64>,
104 pub comment: Option<Comment>,
105 pub comment_id: Option<i64>,
106 pub content: Option<String>,
107 #[serde(with = "time::serde::rfc3339::option")]
108 pub created: Option<time::OffsetDateTime>,
109 pub id: Option<i64>,
110 pub is_private: Option<bool>,
111 pub op_type: Option<ActivityOpType>,
113 pub ref_name: Option<String>,
114 pub repo: Option<Repository>,
115 pub repo_id: Option<i64>,
116 pub user_id: Option<i64>,
117}
118
119#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
122pub enum ActivityOpType {
123 #[serde(rename = "create_repo")]
124 CreateRepo,
125 #[serde(rename = "rename_repo")]
126 RenameRepo,
127 #[serde(rename = "star_repo")]
128 StarRepo,
129 #[serde(rename = "watch_repo")]
130 WatchRepo,
131 #[serde(rename = "commit_repo")]
132 CommitRepo,
133 #[serde(rename = "create_issue")]
134 CreateIssue,
135 #[serde(rename = "create_pull_request")]
136 CreatePullRequest,
137 #[serde(rename = "transfer_repo")]
138 TransferRepo,
139 #[serde(rename = "push_tag")]
140 PushTag,
141 #[serde(rename = "comment_issue")]
142 CommentIssue,
143 #[serde(rename = "merge_pull_request")]
144 MergePullRequest,
145 #[serde(rename = "close_issue")]
146 CloseIssue,
147 #[serde(rename = "reopen_issue")]
148 ReopenIssue,
149 #[serde(rename = "close_pull_request")]
150 ClosePullRequest,
151 #[serde(rename = "reopen_pull_request")]
152 ReopenPullRequest,
153 #[serde(rename = "delete_tag")]
154 DeleteTag,
155 #[serde(rename = "delete_branch")]
156 DeleteBranch,
157 #[serde(rename = "mirror_sync_push")]
158 MirrorSyncPush,
159 #[serde(rename = "mirror_sync_create")]
160 MirrorSyncCreate,
161 #[serde(rename = "mirror_sync_delete")]
162 MirrorSyncDelete,
163 #[serde(rename = "approve_pull_request")]
164 ApprovePullRequest,
165 #[serde(rename = "reject_pull_request")]
166 RejectPullRequest,
167 #[serde(rename = "comment_pull")]
168 CommentPull,
169 #[serde(rename = "publish_release")]
170 PublishRelease,
171 #[serde(rename = "pull_review_dismissed")]
172 PullReviewDismissed,
173 #[serde(rename = "pull_request_ready_for_review")]
174 PullRequestReadyForReview,
175 #[serde(rename = "auto_merge_pull_request")]
176 AutoMergePullRequest,
177}
178#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
180pub struct ActivityPub {
181 #[serde(rename = "@context")]
182 pub context: Option<String>,
183}
184
185#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
187pub struct AddCollaboratorOption {
188 pub permission: Option<AddCollaboratorOptionPermission>,
189}
190
191#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
192pub enum AddCollaboratorOptionPermission {
193 #[serde(rename = "read")]
194 Read,
195 #[serde(rename = "write")]
196 Write,
197 #[serde(rename = "admin")]
198 Admin,
199}
200#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
202pub struct AddTimeOption {
203 #[serde(with = "time::serde::rfc3339::option")]
204 pub created: Option<time::OffsetDateTime>,
205 pub time: i64,
207 pub user_name: Option<String>,
209}
210
211#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
213pub struct AnnotatedTag {
214 pub archive_download_count: Option<TagArchiveDownloadCount>,
215 pub message: Option<String>,
216 pub object: Option<AnnotatedTagObject>,
217 pub sha: Option<String>,
218 pub tag: Option<String>,
219 pub tagger: Option<CommitUser>,
220 #[serde(deserialize_with = "crate::none_if_blank_url")]
221 pub url: Option<url::Url>,
222 pub verification: Option<PayloadCommitVerification>,
223}
224
225#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
227pub struct AnnotatedTagObject {
228 pub sha: Option<String>,
229 #[serde(rename = "type")]
230 pub r#type: Option<String>,
231 #[serde(deserialize_with = "crate::none_if_blank_url")]
232 pub url: Option<url::Url>,
233}
234
235#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
237pub struct Attachment {
238 #[serde(deserialize_with = "crate::none_if_blank_url")]
239 pub browser_download_url: Option<url::Url>,
240 #[serde(with = "time::serde::rfc3339::option")]
241 pub created_at: Option<time::OffsetDateTime>,
242 pub download_count: Option<i64>,
243 pub id: Option<i64>,
244 pub name: Option<String>,
245 pub size: Option<i64>,
246 #[serde(rename = "type")]
247 pub r#type: Option<AttachmentType>,
248 pub uuid: Option<String>,
249}
250
251#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
252pub enum AttachmentType {
253 #[serde(rename = "attachment")]
254 Attachment,
255 #[serde(rename = "external")]
256 External,
257}
258#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
259pub struct BlockedUser {
260 pub block_id: Option<i64>,
261 #[serde(with = "time::serde::rfc3339::option")]
262 pub created_at: Option<time::OffsetDateTime>,
263}
264
265#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
267pub struct Branch {
268 pub commit: Option<PayloadCommit>,
269 pub effective_branch_protection_name: Option<String>,
270 pub enable_status_check: Option<bool>,
271 pub name: Option<String>,
272 pub protected: Option<bool>,
273 pub required_approvals: Option<i64>,
274 pub status_check_contexts: Option<Vec<String>>,
275 pub user_can_merge: Option<bool>,
276 pub user_can_push: Option<bool>,
277}
278
279#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
281pub struct BranchProtection {
282 pub apply_to_admins: Option<bool>,
283 pub approvals_whitelist_teams: Option<Vec<String>>,
284 pub approvals_whitelist_username: Option<Vec<String>>,
285 pub block_on_official_review_requests: Option<bool>,
286 pub block_on_outdated_branch: Option<bool>,
287 pub block_on_rejected_reviews: Option<bool>,
288 pub branch_name: Option<String>,
290 #[serde(with = "time::serde::rfc3339::option")]
291 pub created_at: Option<time::OffsetDateTime>,
292 pub dismiss_stale_approvals: Option<bool>,
293 pub enable_approvals_whitelist: Option<bool>,
294 pub enable_merge_whitelist: Option<bool>,
295 pub enable_push: Option<bool>,
296 pub enable_push_whitelist: Option<bool>,
297 pub enable_status_check: Option<bool>,
298 pub ignore_stale_approvals: Option<bool>,
299 pub merge_whitelist_teams: Option<Vec<String>>,
300 pub merge_whitelist_usernames: Option<Vec<String>>,
301 pub protected_file_patterns: Option<String>,
302 pub push_whitelist_deploy_keys: Option<bool>,
303 pub push_whitelist_teams: Option<Vec<String>>,
304 pub push_whitelist_usernames: Option<Vec<String>>,
305 pub require_signed_commits: Option<bool>,
306 pub required_approvals: Option<i64>,
307 pub rule_name: Option<String>,
308 pub status_check_contexts: Option<Vec<String>>,
309 pub unprotected_file_patterns: Option<String>,
310 #[serde(with = "time::serde::rfc3339::option")]
311 pub updated_at: Option<time::OffsetDateTime>,
312}
313
314#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
316pub struct ChangeFileOperation {
317 pub content: Option<String>,
319 pub from_path: Option<String>,
321 pub operation: ChangeFileOperationOperation,
323 pub path: String,
325 pub sha: Option<String>,
327}
328
329#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
332pub enum ChangeFileOperationOperation {
333 #[serde(rename = "create")]
334 Create,
335 #[serde(rename = "update")]
336 Update,
337 #[serde(rename = "delete")]
338 Delete,
339}
340#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
344pub struct ChangeFilesOptions {
345 pub author: Option<Identity>,
346 pub branch: Option<String>,
348 pub committer: Option<Identity>,
349 pub dates: Option<CommitDateOptions>,
350 pub files: Vec<ChangeFileOperation>,
352 pub message: Option<String>,
354 pub new_branch: Option<String>,
356 pub signoff: Option<bool>,
358}
359
360#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
362pub struct ChangedFile {
363 pub additions: Option<i64>,
364 pub changes: Option<i64>,
365 #[serde(deserialize_with = "crate::none_if_blank_url")]
366 pub contents_url: Option<url::Url>,
367 pub deletions: Option<i64>,
368 pub filename: Option<String>,
369 #[serde(deserialize_with = "crate::none_if_blank_url")]
370 pub html_url: Option<url::Url>,
371 pub previous_filename: Option<String>,
372 #[serde(deserialize_with = "crate::none_if_blank_url")]
373 pub raw_url: Option<url::Url>,
374 pub status: Option<String>,
375}
376
377#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
379pub struct CombinedStatus {
380 #[serde(deserialize_with = "crate::none_if_blank_url")]
381 pub commit_url: Option<url::Url>,
382 pub repository: Option<Repository>,
383 pub sha: Option<String>,
384 pub state: Option<String>,
385 pub statuses: Option<Vec<CommitStatus>>,
386 pub total_count: Option<i64>,
387 #[serde(deserialize_with = "crate::none_if_blank_url")]
388 pub url: Option<url::Url>,
389}
390
391#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
393pub struct Comment {
394 pub assets: Option<Vec<Attachment>>,
395 pub body: Option<String>,
396 #[serde(with = "time::serde::rfc3339::option")]
397 pub created_at: Option<time::OffsetDateTime>,
398 #[serde(deserialize_with = "crate::none_if_blank_url")]
399 pub html_url: Option<url::Url>,
400 pub id: Option<i64>,
401 #[serde(deserialize_with = "crate::none_if_blank_url")]
402 pub issue_url: Option<url::Url>,
403 pub original_author: Option<String>,
404 pub original_author_id: Option<i64>,
405 #[serde(deserialize_with = "crate::none_if_blank_url")]
406 pub pull_request_url: Option<url::Url>,
407 #[serde(with = "time::serde::rfc3339::option")]
408 pub updated_at: Option<time::OffsetDateTime>,
409 pub user: Option<User>,
410}
411
412#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
413pub struct Commit {
414 pub author: Option<User>,
415 pub commit: Option<RepoCommit>,
416 pub committer: Option<User>,
417 #[serde(with = "time::serde::rfc3339::option")]
418 pub created: Option<time::OffsetDateTime>,
419 pub files: Option<Vec<CommitAffectedFiles>>,
420 #[serde(deserialize_with = "crate::none_if_blank_url")]
421 pub html_url: Option<url::Url>,
422 pub parents: Option<Vec<CommitMeta>>,
423 pub sha: Option<String>,
424 pub stats: Option<CommitStats>,
425 #[serde(deserialize_with = "crate::none_if_blank_url")]
426 pub url: Option<url::Url>,
427}
428
429#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
431pub struct CommitAffectedFiles {
432 pub filename: Option<String>,
433 pub status: Option<String>,
434}
435
436#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
438pub struct CommitDateOptions {
439 #[serde(with = "time::serde::rfc3339::option")]
440 pub author: Option<time::OffsetDateTime>,
441 #[serde(with = "time::serde::rfc3339::option")]
442 pub committer: Option<time::OffsetDateTime>,
443}
444
445#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
446pub struct CommitMeta {
447 #[serde(with = "time::serde::rfc3339::option")]
448 pub created: Option<time::OffsetDateTime>,
449 pub sha: Option<String>,
450 #[serde(deserialize_with = "crate::none_if_blank_url")]
451 pub url: Option<url::Url>,
452}
453
454#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
456pub struct CommitStats {
457 pub additions: Option<i64>,
458 pub deletions: Option<i64>,
459 pub total: Option<i64>,
460}
461
462#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
464pub struct CommitStatus {
465 pub context: Option<String>,
466 #[serde(with = "time::serde::rfc3339::option")]
467 pub created_at: Option<time::OffsetDateTime>,
468 pub creator: Option<User>,
469 pub description: Option<String>,
470 pub id: Option<i64>,
471 pub status: Option<String>,
472 #[serde(deserialize_with = "crate::none_if_blank_url")]
473 pub target_url: Option<url::Url>,
474 #[serde(with = "time::serde::rfc3339::option")]
475 pub updated_at: Option<time::OffsetDateTime>,
476 #[serde(deserialize_with = "crate::none_if_blank_url")]
477 pub url: Option<url::Url>,
478}
479
480#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
484pub struct CommitStatusState {}
485
486#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
487pub struct CommitUser {
488 pub date: Option<String>,
489 pub email: Option<String>,
490 pub name: Option<String>,
491}
492
493#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
494pub struct Compare {
495 pub commits: Option<Vec<Commit>>,
496 pub total_commits: Option<i64>,
497}
498
499#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
501pub struct ContentsResponse {
502 #[serde(rename = "_links")]
503 pub links: Option<FileLinksResponse>,
504 pub content: Option<String>,
506 #[serde(deserialize_with = "crate::none_if_blank_url")]
507 pub download_url: Option<url::Url>,
508 pub encoding: Option<String>,
510 #[serde(deserialize_with = "crate::none_if_blank_url")]
511 pub git_url: Option<url::Url>,
512 #[serde(deserialize_with = "crate::none_if_blank_url")]
513 pub html_url: Option<url::Url>,
514 pub last_commit_sha: Option<String>,
515 pub name: Option<String>,
516 pub path: Option<String>,
517 pub sha: Option<String>,
518 pub size: Option<i64>,
519 #[serde(deserialize_with = "crate::none_if_blank_url")]
520 pub submodule_git_url: Option<url::Url>,
522 pub target: Option<String>,
524 #[serde(rename = "type")]
526 pub r#type: Option<String>,
527 #[serde(deserialize_with = "crate::none_if_blank_url")]
528 pub url: Option<url::Url>,
529}
530
531#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
533pub struct CreateAccessTokenOption {
534 pub name: String,
535 pub scopes: Option<Vec<String>>,
536}
537
538#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
540pub struct CreateBranchProtectionOption {
541 pub apply_to_admins: Option<bool>,
542 pub approvals_whitelist_teams: Option<Vec<String>>,
543 pub approvals_whitelist_username: Option<Vec<String>>,
544 pub block_on_official_review_requests: Option<bool>,
545 pub block_on_outdated_branch: Option<bool>,
546 pub block_on_rejected_reviews: Option<bool>,
547 pub branch_name: Option<String>,
549 pub dismiss_stale_approvals: Option<bool>,
550 pub enable_approvals_whitelist: Option<bool>,
551 pub enable_merge_whitelist: Option<bool>,
552 pub enable_push: Option<bool>,
553 pub enable_push_whitelist: Option<bool>,
554 pub enable_status_check: Option<bool>,
555 pub ignore_stale_approvals: Option<bool>,
556 pub merge_whitelist_teams: Option<Vec<String>>,
557 pub merge_whitelist_usernames: Option<Vec<String>>,
558 pub protected_file_patterns: Option<String>,
559 pub push_whitelist_deploy_keys: Option<bool>,
560 pub push_whitelist_teams: Option<Vec<String>>,
561 pub push_whitelist_usernames: Option<Vec<String>>,
562 pub require_signed_commits: Option<bool>,
563 pub required_approvals: Option<i64>,
564 pub rule_name: Option<String>,
565 pub status_check_contexts: Option<Vec<String>>,
566 pub unprotected_file_patterns: Option<String>,
567}
568
569#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
571pub struct CreateBranchRepoOption {
572 pub new_branch_name: String,
574 pub old_branch_name: Option<String>,
578 pub old_ref_name: Option<String>,
580}
581
582#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
584pub struct CreateEmailOption {
585 pub emails: Option<Vec<String>>,
587}
588
589#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
593pub struct CreateFileOptions {
594 pub author: Option<Identity>,
595 pub branch: Option<String>,
597 pub committer: Option<Identity>,
598 pub content: String,
600 pub dates: Option<CommitDateOptions>,
601 pub message: Option<String>,
603 pub new_branch: Option<String>,
605 pub signoff: Option<bool>,
607}
608
609#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
611pub struct CreateForkOption {
612 pub name: Option<String>,
614 pub organization: Option<String>,
616}
617
618#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
620pub struct CreateGPGKeyOption {
621 pub armored_public_key: String,
623 pub armored_signature: Option<String>,
624}
625
626#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
628pub struct CreateHookOption {
629 pub active: Option<bool>,
630 pub authorization_header: Option<String>,
631 pub branch_filter: Option<String>,
632 pub config: CreateHookOptionConfig,
633 pub events: Option<Vec<String>>,
634 #[serde(rename = "type")]
635 pub r#type: CreateHookOptionType,
636}
637
638#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
639pub enum CreateHookOptionType {
640 #[serde(rename = "forgejo")]
641 Forgejo,
642 #[serde(rename = "dingtalk")]
643 Dingtalk,
644 #[serde(rename = "discord")]
645 Discord,
646 #[serde(rename = "gitea")]
647 Gitea,
648 #[serde(rename = "gogs")]
649 Gogs,
650 #[serde(rename = "msteams")]
651 Msteams,
652 #[serde(rename = "slack")]
653 Slack,
654 #[serde(rename = "telegram")]
655 Telegram,
656 #[serde(rename = "feishu")]
657 Feishu,
658 #[serde(rename = "wechatwork")]
659 Wechatwork,
660 #[serde(rename = "packagist")]
661 Packagist,
662}
663#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
667pub struct CreateHookOptionConfig {
668 pub content_type: String,
669 pub url: url::Url,
670 #[serde(flatten)]
671 pub additional: BTreeMap<String, String>,
672}
673
674#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
676pub struct CreateIssueCommentOption {
677 pub body: String,
678 #[serde(with = "time::serde::rfc3339::option")]
679 pub updated_at: Option<time::OffsetDateTime>,
680}
681
682#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
684pub struct CreateIssueOption {
685 pub assignee: Option<String>,
687 pub assignees: Option<Vec<String>>,
688 pub body: Option<String>,
689 pub closed: Option<bool>,
690 #[serde(with = "time::serde::rfc3339::option")]
691 pub due_date: Option<time::OffsetDateTime>,
692 pub labels: Option<Vec<i64>>,
694 pub milestone: Option<i64>,
696 #[serde(rename = "ref")]
697 pub r#ref: Option<String>,
698 pub title: String,
699}
700
701#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
703pub struct CreateKeyOption {
704 pub key: String,
706 pub read_only: Option<bool>,
708 pub title: String,
710}
711
712#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
714pub struct CreateLabelOption {
715 pub color: String,
716 pub description: Option<String>,
717 pub exclusive: Option<bool>,
718 pub is_archived: Option<bool>,
719 pub name: String,
720}
721
722#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
724pub struct CreateMilestoneOption {
725 pub description: Option<String>,
726 #[serde(with = "time::serde::rfc3339::option")]
727 pub due_on: Option<time::OffsetDateTime>,
728 pub state: Option<CreateMilestoneOptionState>,
729 pub title: Option<String>,
730}
731
732#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
733pub enum CreateMilestoneOptionState {
734 #[serde(rename = "open")]
735 Open,
736 #[serde(rename = "closed")]
737 Closed,
738}
739#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
741pub struct CreateOAuth2ApplicationOptions {
742 pub confidential_client: Option<bool>,
743 pub name: Option<String>,
744 pub redirect_uris: Option<Vec<String>>,
745}
746
747#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
749pub struct CreateOrUpdateSecretOption {
750 pub data: String,
752}
753
754#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
756pub struct CreateOrgOption {
757 pub description: Option<String>,
758 pub email: Option<String>,
759 pub full_name: Option<String>,
760 pub location: Option<String>,
761 pub repo_admin_change_team_access: Option<bool>,
762 pub username: String,
763 pub visibility: Option<CreateOrgOptionVisibility>,
765 pub website: Option<String>,
766}
767
768#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
771pub enum CreateOrgOptionVisibility {
772 #[serde(rename = "public")]
773 Public,
774 #[serde(rename = "limited")]
775 Limited,
776 #[serde(rename = "private")]
777 Private,
778}
779#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
781pub struct CreatePullRequestOption {
782 pub assignee: Option<String>,
783 pub assignees: Option<Vec<String>>,
784 pub base: Option<String>,
785 pub body: Option<String>,
786 #[serde(with = "time::serde::rfc3339::option")]
787 pub due_date: Option<time::OffsetDateTime>,
788 pub head: Option<String>,
789 pub labels: Option<Vec<i64>>,
790 pub milestone: Option<i64>,
791 pub title: Option<String>,
792}
793
794#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
796pub struct CreatePullReviewComment {
797 pub body: Option<String>,
798 pub new_position: Option<i64>,
800 pub old_position: Option<i64>,
802 pub path: Option<String>,
804}
805
806#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
808pub struct CreatePullReviewCommentOptions {}
809
810#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
812pub struct CreatePullReviewOptions {
813 pub body: Option<String>,
814 pub comments: Option<Vec<CreatePullReviewComment>>,
815 pub commit_id: Option<String>,
816 pub event: Option<String>,
817}
818
819#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
820pub struct CreatePushMirrorOption {
821 pub interval: Option<String>,
822 pub remote_address: Option<String>,
823 pub remote_password: Option<String>,
824 pub remote_username: Option<String>,
825 pub sync_on_commit: Option<bool>,
826 pub use_ssh: Option<bool>,
827}
828
829#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
831pub struct CreateQuotaGroupOptions {
832 pub name: Option<String>,
834 pub rules: Option<Vec<CreateQuotaRuleOptions>>,
838}
839
840#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
842pub struct CreateQuotaRuleOptions {
843 pub limit: Option<i64>,
845 pub name: Option<String>,
847 pub subjects: Option<Vec<CreateQuotaRuleOptionsSubjects>>,
849}
850
851#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
852pub enum CreateQuotaRuleOptionsSubjects {
853 #[serde(rename = "none")]
854 None,
855 #[serde(rename = "size:all")]
856 SizeAll,
857 #[serde(rename = "size:repos:all")]
858 SizeReposAll,
859 #[serde(rename = "size:repos:public")]
860 SizeReposPublic,
861 #[serde(rename = "size:repos:private")]
862 SizeReposPrivate,
863 #[serde(rename = "size:git:all")]
864 SizeGitAll,
865 #[serde(rename = "size:git:lfs")]
866 SizeGitLfs,
867 #[serde(rename = "size:assets:all")]
868 SizeAssetsAll,
869 #[serde(rename = "size:assets:attachments:all")]
870 SizeAssetsAttachmentsAll,
871 #[serde(rename = "size:assets:attachments:issues")]
872 SizeAssetsAttachmentsIssues,
873 #[serde(rename = "size:assets:attachments:releases")]
874 SizeAssetsAttachmentsReleases,
875 #[serde(rename = "size:assets:artifacts")]
876 SizeAssetsArtifacts,
877 #[serde(rename = "size:assets:packages:all")]
878 SizeAssetsPackagesAll,
879 #[serde(rename = "size:assets:wiki")]
880 SizeAssetsWiki,
881}
882#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
884pub struct CreateReleaseOption {
885 pub body: Option<String>,
886 pub draft: Option<bool>,
887 pub hide_archive_links: Option<bool>,
888 pub name: Option<String>,
889 pub prerelease: Option<bool>,
890 pub tag_name: String,
891 pub target_commitish: Option<String>,
892}
893
894#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
896pub struct CreateRepoOption {
897 pub auto_init: Option<bool>,
899 pub default_branch: Option<String>,
901 pub description: Option<String>,
903 pub gitignores: Option<String>,
905 pub issue_labels: Option<String>,
907 pub license: Option<String>,
909 pub name: String,
911 pub object_format_name: Option<ObjectFormatName>,
912 pub private: Option<bool>,
914 pub readme: Option<String>,
916 pub template: Option<bool>,
918 pub trust_model: Option<CreateRepoOptionTrustModel>,
920}
921
922#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
925pub enum CreateRepoOptionTrustModel {
926 #[serde(rename = "default")]
927 Default,
928 #[serde(rename = "collaborator")]
929 Collaborator,
930 #[serde(rename = "committer")]
931 Committer,
932 #[serde(rename = "collaboratorcommitter")]
933 Collaboratorcommitter,
934}
935#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
937pub struct CreateStatusOption {
938 pub context: Option<String>,
939 pub description: Option<String>,
940 pub state: Option<String>,
941 #[serde(deserialize_with = "crate::none_if_blank_url")]
942 pub target_url: Option<url::Url>,
943}
944
945#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
947pub struct CreateTagOption {
948 pub message: Option<String>,
949 pub tag_name: String,
950 pub target: Option<String>,
951}
952
953#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
955pub struct CreateTagProtectionOption {
956 pub name_pattern: Option<String>,
957 pub whitelist_teams: Option<Vec<String>>,
958 pub whitelist_usernames: Option<Vec<String>>,
959}
960
961#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
963pub struct CreateTeamOption {
964 pub can_create_org_repo: Option<bool>,
965 pub description: Option<String>,
966 pub includes_all_repositories: Option<bool>,
967 pub name: String,
968 pub permission: Option<CreateTeamOptionPermission>,
969 pub units: Option<Vec<String>>,
970 pub units_map: Option<BTreeMap<String, String>>,
971}
972
973#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
974pub enum CreateTeamOptionPermission {
975 #[serde(rename = "read")]
976 Read,
977 #[serde(rename = "write")]
978 Write,
979 #[serde(rename = "admin")]
980 Admin,
981}
982#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
984pub struct CreateUserOption {
985 #[serde(with = "time::serde::rfc3339::option")]
986 pub created_at: Option<time::OffsetDateTime>,
992 pub email: String,
993 pub full_name: Option<String>,
994 pub login_name: Option<String>,
995 pub must_change_password: Option<bool>,
996 pub password: Option<String>,
997 pub restricted: Option<bool>,
998 pub send_notify: Option<bool>,
999 pub source_id: Option<i64>,
1000 pub username: String,
1001 pub visibility: Option<String>,
1002}
1003
1004#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1006pub struct CreateVariableOption {
1007 pub value: String,
1009}
1010
1011#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1013pub struct CreateWikiPageOptions {
1014 pub content_base64: Option<String>,
1016 pub message: Option<String>,
1018 pub title: Option<String>,
1020}
1021
1022#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1024pub struct Cron {
1025 pub exec_times: Option<i64>,
1026 pub name: Option<String>,
1027 #[serde(with = "time::serde::rfc3339::option")]
1028 pub next: Option<time::OffsetDateTime>,
1029 #[serde(with = "time::serde::rfc3339::option")]
1030 pub prev: Option<time::OffsetDateTime>,
1031 pub schedule: Option<String>,
1032}
1033
1034#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
1035pub enum DefaultMergeStyle {
1036 #[serde(rename = "merge")]
1037 Merge,
1038 #[serde(rename = "rebase")]
1039 Rebase,
1040 #[serde(rename = "rebase-merge")]
1041 RebaseMerge,
1042 #[serde(rename = "squash")]
1043 Squash,
1044 #[serde(rename = "fast-forward-only")]
1045 FastForwardOnly,
1046}
1047#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1049pub struct DeleteEmailOption {
1050 pub emails: Option<Vec<String>>,
1052}
1053
1054#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1058pub struct DeleteFileOptions {
1059 pub author: Option<Identity>,
1060 pub branch: Option<String>,
1062 pub committer: Option<Identity>,
1063 pub dates: Option<CommitDateOptions>,
1064 pub message: Option<String>,
1066 pub new_branch: Option<String>,
1068 pub sha: String,
1070 pub signoff: Option<bool>,
1072}
1073
1074#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1076pub struct DeleteLabelsOption {
1077 #[serde(with = "time::serde::rfc3339::option")]
1078 pub updated_at: Option<time::OffsetDateTime>,
1079}
1080
1081#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1083pub struct DeployKey {
1084 #[serde(with = "time::serde::rfc3339::option")]
1085 pub created_at: Option<time::OffsetDateTime>,
1086 pub fingerprint: Option<String>,
1087 pub id: Option<i64>,
1088 pub key: Option<String>,
1089 pub key_id: Option<i64>,
1090 pub read_only: Option<bool>,
1091 pub repository: Option<Repository>,
1092 pub title: Option<String>,
1093 #[serde(deserialize_with = "crate::none_if_blank_url")]
1094 pub url: Option<url::Url>,
1095}
1096
1097#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1099pub struct DismissPullReviewOptions {
1100 pub message: Option<String>,
1101 pub priors: Option<bool>,
1102}
1103
1104#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1106pub struct DispatchWorkflowOption {
1107 pub inputs: Option<BTreeMap<String, String>>,
1109 #[serde(rename = "ref")]
1111 pub r#ref: String,
1112}
1113
1114#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1116pub struct EditAttachmentOptions {
1117 #[serde(deserialize_with = "crate::none_if_blank_url")]
1118 pub browser_download_url: Option<url::Url>,
1120 pub name: Option<String>,
1121}
1122
1123#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1125pub struct EditBranchProtectionOption {
1126 pub apply_to_admins: Option<bool>,
1127 pub approvals_whitelist_teams: Option<Vec<String>>,
1128 pub approvals_whitelist_username: Option<Vec<String>>,
1129 pub block_on_official_review_requests: Option<bool>,
1130 pub block_on_outdated_branch: Option<bool>,
1131 pub block_on_rejected_reviews: Option<bool>,
1132 pub dismiss_stale_approvals: Option<bool>,
1133 pub enable_approvals_whitelist: Option<bool>,
1134 pub enable_merge_whitelist: Option<bool>,
1135 pub enable_push: Option<bool>,
1136 pub enable_push_whitelist: Option<bool>,
1137 pub enable_status_check: Option<bool>,
1138 pub ignore_stale_approvals: Option<bool>,
1139 pub merge_whitelist_teams: Option<Vec<String>>,
1140 pub merge_whitelist_usernames: Option<Vec<String>>,
1141 pub protected_file_patterns: Option<String>,
1142 pub push_whitelist_deploy_keys: Option<bool>,
1143 pub push_whitelist_teams: Option<Vec<String>>,
1144 pub push_whitelist_usernames: Option<Vec<String>>,
1145 pub require_signed_commits: Option<bool>,
1146 pub required_approvals: Option<i64>,
1147 pub status_check_contexts: Option<Vec<String>>,
1148 pub unprotected_file_patterns: Option<String>,
1149}
1150
1151#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1153pub struct EditDeadlineOption {
1154 #[serde(with = "time::serde::rfc3339")]
1155 pub due_date: time::OffsetDateTime,
1156}
1157
1158#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1160pub struct EditGitHookOption {
1161 pub content: Option<String>,
1162}
1163
1164#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1166pub struct EditHookOption {
1167 pub active: Option<bool>,
1168 pub authorization_header: Option<String>,
1169 pub branch_filter: Option<String>,
1170 pub config: Option<BTreeMap<String, String>>,
1171 pub events: Option<Vec<String>>,
1172}
1173
1174#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1176pub struct EditIssueCommentOption {
1177 pub body: String,
1178 #[serde(with = "time::serde::rfc3339::option")]
1179 pub updated_at: Option<time::OffsetDateTime>,
1180}
1181
1182#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1184pub struct EditIssueOption {
1185 pub assignee: Option<String>,
1187 pub assignees: Option<Vec<String>>,
1188 pub body: Option<String>,
1189 #[serde(with = "time::serde::rfc3339::option")]
1190 pub due_date: Option<time::OffsetDateTime>,
1191 pub milestone: Option<i64>,
1192 #[serde(rename = "ref")]
1193 pub r#ref: Option<String>,
1194 pub state: Option<String>,
1195 pub title: Option<String>,
1196 pub unset_due_date: Option<bool>,
1197 #[serde(with = "time::serde::rfc3339::option")]
1198 pub updated_at: Option<time::OffsetDateTime>,
1199}
1200
1201#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1203pub struct EditLabelOption {
1204 pub color: Option<String>,
1205 pub description: Option<String>,
1206 pub exclusive: Option<bool>,
1207 pub is_archived: Option<bool>,
1208 pub name: Option<String>,
1209}
1210
1211#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1213pub struct EditMilestoneOption {
1214 pub description: Option<String>,
1215 #[serde(with = "time::serde::rfc3339::option")]
1216 pub due_on: Option<time::OffsetDateTime>,
1217 pub state: Option<String>,
1218 pub title: Option<String>,
1219}
1220
1221#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1223pub struct EditOrgOption {
1224 pub description: Option<String>,
1225 pub email: Option<String>,
1226 pub full_name: Option<String>,
1227 pub location: Option<String>,
1228 pub repo_admin_change_team_access: Option<bool>,
1229 pub visibility: Option<EditOrgOptionVisibility>,
1231 pub website: Option<String>,
1232}
1233
1234#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
1237pub enum EditOrgOptionVisibility {
1238 #[serde(rename = "public")]
1239 Public,
1240 #[serde(rename = "limited")]
1241 Limited,
1242 #[serde(rename = "private")]
1243 Private,
1244}
1245#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1247pub struct EditPullRequestOption {
1248 pub allow_maintainer_edit: Option<bool>,
1249 pub assignee: Option<String>,
1250 pub assignees: Option<Vec<String>>,
1251 pub base: Option<String>,
1252 pub body: Option<String>,
1253 #[serde(with = "time::serde::rfc3339::option")]
1254 pub due_date: Option<time::OffsetDateTime>,
1255 pub labels: Option<Vec<i64>>,
1256 pub milestone: Option<i64>,
1257 pub state: Option<String>,
1258 pub title: Option<String>,
1259 pub unset_due_date: Option<bool>,
1260}
1261
1262#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1264pub struct EditQuotaRuleOptions {
1265 pub limit: Option<i64>,
1267 pub subjects: Option<Vec<String>>,
1269}
1270
1271#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1273pub struct EditReactionOption {
1274 pub content: Option<String>,
1275}
1276
1277#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1279pub struct EditReleaseOption {
1280 pub body: Option<String>,
1281 pub draft: Option<bool>,
1282 pub hide_archive_links: Option<bool>,
1283 pub name: Option<String>,
1284 pub prerelease: Option<bool>,
1285 pub tag_name: Option<String>,
1286 pub target_commitish: Option<String>,
1287}
1288
1289#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1291pub struct EditRepoOption {
1292 pub allow_fast_forward_only_merge: Option<bool>,
1294 pub allow_manual_merge: Option<bool>,
1296 pub allow_merge_commits: Option<bool>,
1298 pub allow_rebase: Option<bool>,
1300 pub allow_rebase_explicit: Option<bool>,
1302 pub allow_rebase_update: Option<bool>,
1304 pub allow_squash_merge: Option<bool>,
1306 pub archived: Option<bool>,
1308 pub autodetect_manual_merge: Option<bool>,
1310 pub default_allow_maintainer_edit: Option<bool>,
1312 pub default_branch: Option<String>,
1314 pub default_delete_branch_after_merge: Option<bool>,
1316 pub default_merge_style: Option<DefaultMergeStyle>,
1317 pub default_update_style: Option<String>,
1319 pub description: Option<String>,
1321 pub enable_prune: Option<bool>,
1323 pub external_tracker: Option<ExternalTracker>,
1324 pub external_wiki: Option<ExternalWiki>,
1325 pub globally_editable_wiki: Option<bool>,
1327 pub has_actions: Option<bool>,
1329 pub has_issues: Option<bool>,
1331 pub has_packages: Option<bool>,
1333 pub has_projects: Option<bool>,
1335 pub has_pull_requests: Option<bool>,
1337 pub has_releases: Option<bool>,
1339 pub has_wiki: Option<bool>,
1341 pub ignore_whitespace_conflicts: Option<bool>,
1343 pub internal_tracker: Option<InternalTracker>,
1344 pub mirror_interval: Option<String>,
1346 pub name: Option<String>,
1348 pub private: Option<bool>,
1354 pub template: Option<bool>,
1356 pub website: Option<String>,
1358 pub wiki_branch: Option<String>,
1360}
1361
1362#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1364pub struct EditTagProtectionOption {
1365 pub name_pattern: Option<String>,
1366 pub whitelist_teams: Option<Vec<String>>,
1367 pub whitelist_usernames: Option<Vec<String>>,
1368}
1369
1370#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1372pub struct EditTeamOption {
1373 pub can_create_org_repo: Option<bool>,
1374 pub description: Option<String>,
1375 pub includes_all_repositories: Option<bool>,
1376 pub name: String,
1377 pub permission: Option<EditTeamOptionPermission>,
1378 pub units: Option<Vec<String>>,
1379 pub units_map: Option<BTreeMap<String, String>>,
1380}
1381
1382#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
1383pub enum EditTeamOptionPermission {
1384 #[serde(rename = "read")]
1385 Read,
1386 #[serde(rename = "write")]
1387 Write,
1388 #[serde(rename = "admin")]
1389 Admin,
1390}
1391#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1393pub struct EditUserOption {
1394 pub active: Option<bool>,
1395 pub admin: Option<bool>,
1396 pub allow_create_organization: Option<bool>,
1397 pub allow_git_hook: Option<bool>,
1398 pub allow_import_local: Option<bool>,
1399 pub description: Option<String>,
1400 pub email: Option<String>,
1401 pub full_name: Option<String>,
1402 pub location: Option<String>,
1403 pub login_name: Option<String>,
1404 pub max_repo_creation: Option<i64>,
1405 pub must_change_password: Option<bool>,
1406 pub password: Option<String>,
1407 pub prohibit_login: Option<bool>,
1408 pub pronouns: Option<String>,
1409 pub restricted: Option<bool>,
1410 pub source_id: Option<i64>,
1411 pub visibility: Option<String>,
1412 pub website: Option<String>,
1413}
1414
1415#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1417pub struct Email {
1418 pub email: Option<String>,
1419 pub primary: Option<bool>,
1420 pub user_id: Option<i64>,
1421 pub username: Option<String>,
1422 pub verified: Option<bool>,
1423}
1424
1425#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1427pub struct ExternalTracker {
1428 pub external_tracker_format: Option<String>,
1430 pub external_tracker_regexp_pattern: Option<String>,
1432 pub external_tracker_style: Option<String>,
1434 #[serde(deserialize_with = "crate::none_if_blank_url")]
1435 pub external_tracker_url: Option<url::Url>,
1437}
1438
1439#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1441pub struct ExternalWiki {
1442 #[serde(deserialize_with = "crate::none_if_blank_url")]
1443 pub external_wiki_url: Option<url::Url>,
1445}
1446
1447#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1448pub struct FileCommitResponse {
1449 pub author: Option<CommitUser>,
1450 pub committer: Option<CommitUser>,
1451 #[serde(with = "time::serde::rfc3339::option")]
1452 pub created: Option<time::OffsetDateTime>,
1453 #[serde(deserialize_with = "crate::none_if_blank_url")]
1454 pub html_url: Option<url::Url>,
1455 pub message: Option<String>,
1456 pub parents: Option<Vec<CommitMeta>>,
1457 pub sha: Option<String>,
1458 pub tree: Option<CommitMeta>,
1459 #[serde(deserialize_with = "crate::none_if_blank_url")]
1460 pub url: Option<url::Url>,
1461}
1462
1463#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1465pub struct FileDeleteResponse {
1466 pub commit: Option<FileCommitResponse>,
1467 pub content: Option<serde_json::Value>,
1468 pub verification: Option<PayloadCommitVerification>,
1469}
1470
1471#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1473pub struct FileLinksResponse {
1474 pub git: Option<String>,
1475 pub html: Option<String>,
1476 #[serde(rename = "self")]
1477 pub this: Option<String>,
1478}
1479
1480#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1482pub struct FileResponse {
1483 pub commit: Option<FileCommitResponse>,
1484 pub content: Option<ContentsResponse>,
1485 pub verification: Option<PayloadCommitVerification>,
1486}
1487
1488#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1490pub struct FilesResponse {
1491 pub commit: Option<FileCommitResponse>,
1492 pub files: Option<Vec<ContentsResponse>>,
1493 pub verification: Option<PayloadCommitVerification>,
1494}
1495
1496#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1498pub struct ForgeLike {}
1499
1500#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1502pub struct GPGKey {
1503 pub can_certify: Option<bool>,
1504 pub can_encrypt_comms: Option<bool>,
1505 pub can_encrypt_storage: Option<bool>,
1506 pub can_sign: Option<bool>,
1507 #[serde(with = "time::serde::rfc3339::option")]
1508 pub created_at: Option<time::OffsetDateTime>,
1509 pub emails: Option<Vec<GPGKeyEmail>>,
1510 #[serde(with = "time::serde::rfc3339::option")]
1511 pub expires_at: Option<time::OffsetDateTime>,
1512 pub id: Option<i64>,
1513 pub key_id: Option<String>,
1514 pub primary_key_id: Option<String>,
1515 pub public_key: Option<String>,
1516 pub subkeys: Option<Vec<GPGKey>>,
1517 pub verified: Option<bool>,
1518}
1519
1520#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1522pub struct GPGKeyEmail {
1523 pub email: Option<String>,
1524 pub verified: Option<bool>,
1525}
1526
1527#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1529pub struct GeneralAPISettings {
1530 pub default_git_trees_per_page: Option<i64>,
1531 pub default_max_blob_size: Option<i64>,
1532 pub default_paging_num: Option<i64>,
1533 pub max_response_items: Option<i64>,
1534}
1535
1536#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1538pub struct GeneralAttachmentSettings {
1539 pub allowed_types: Option<String>,
1540 pub enabled: Option<bool>,
1541 pub max_files: Option<i64>,
1542 pub max_size: Option<i64>,
1543}
1544
1545#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1547pub struct GeneralRepoSettings {
1548 pub forks_disabled: Option<bool>,
1549 pub http_git_disabled: Option<bool>,
1550 pub lfs_disabled: Option<bool>,
1551 pub migrations_disabled: Option<bool>,
1552 pub mirrors_disabled: Option<bool>,
1553 pub stars_disabled: Option<bool>,
1554 pub time_tracking_disabled: Option<bool>,
1555}
1556
1557#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1559pub struct GeneralUISettings {
1560 pub allowed_reactions: Option<Vec<String>>,
1561 pub custom_emojis: Option<Vec<String>>,
1562 pub default_theme: Option<String>,
1563}
1564
1565#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1567pub struct GenerateRepoOption {
1568 pub avatar: Option<bool>,
1570 pub default_branch: Option<String>,
1572 pub description: Option<String>,
1574 pub git_content: Option<bool>,
1576 pub git_hooks: Option<bool>,
1578 pub labels: Option<bool>,
1580 pub name: String,
1582 pub owner: String,
1584 pub private: Option<bool>,
1586 pub protected_branch: Option<bool>,
1588 pub topics: Option<bool>,
1590 pub webhooks: Option<bool>,
1592}
1593
1594#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1596pub struct GitBlobResponse {
1597 pub content: Option<String>,
1598 pub encoding: Option<String>,
1599 pub sha: Option<String>,
1600 pub size: Option<i64>,
1601 #[serde(deserialize_with = "crate::none_if_blank_url")]
1602 pub url: Option<url::Url>,
1603}
1604
1605#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1607pub struct GitEntry {
1608 pub mode: Option<String>,
1609 pub path: Option<String>,
1610 pub sha: Option<String>,
1611 pub size: Option<i64>,
1612 #[serde(rename = "type")]
1613 pub r#type: Option<String>,
1614 #[serde(deserialize_with = "crate::none_if_blank_url")]
1615 pub url: Option<url::Url>,
1616}
1617
1618#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1620pub struct GitHook {
1621 pub content: Option<String>,
1622 pub is_active: Option<bool>,
1623 pub name: Option<String>,
1624}
1625
1626#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1627pub struct GitObject {
1628 pub sha: Option<String>,
1629 #[serde(rename = "type")]
1630 pub r#type: Option<String>,
1631 #[serde(deserialize_with = "crate::none_if_blank_url")]
1632 pub url: Option<url::Url>,
1633}
1634
1635#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1637pub struct GitTreeResponse {
1638 pub page: Option<i64>,
1639 pub sha: Option<String>,
1640 pub total_count: Option<i64>,
1641 pub tree: Option<Vec<GitEntry>>,
1642 pub truncated: Option<bool>,
1643 #[serde(deserialize_with = "crate::none_if_blank_url")]
1644 pub url: Option<url::Url>,
1645}
1646
1647#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1649pub struct GitignoreTemplateInfo {
1650 pub name: Option<String>,
1651 pub source: Option<String>,
1652}
1653
1654#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1656pub struct Hook {
1657 pub active: Option<bool>,
1658 pub authorization_header: Option<String>,
1659 pub branch_filter: Option<String>,
1660 pub config: Option<BTreeMap<String, String>>,
1662 pub content_type: Option<String>,
1663 #[serde(with = "time::serde::rfc3339::option")]
1664 pub created_at: Option<time::OffsetDateTime>,
1665 pub events: Option<Vec<String>>,
1666 pub id: Option<i64>,
1667 pub metadata: Option<serde_json::Value>,
1668 #[serde(rename = "type")]
1669 pub r#type: Option<String>,
1670 #[serde(with = "time::serde::rfc3339::option")]
1671 pub updated_at: Option<time::OffsetDateTime>,
1672 #[serde(deserialize_with = "crate::none_if_blank_url")]
1673 pub url: Option<url::Url>,
1674}
1675
1676#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1678pub struct Identity {
1679 pub email: Option<String>,
1680 pub name: Option<String>,
1681}
1682
1683#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1685pub struct InternalTracker {
1686 pub allow_only_contributors_to_track_time: Option<bool>,
1688 pub enable_issue_dependencies: Option<bool>,
1690 pub enable_time_tracker: Option<bool>,
1692}
1693
1694#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1696pub struct Issue {
1697 pub assets: Option<Vec<Attachment>>,
1698 pub assignee: Option<User>,
1699 pub assignees: Option<Vec<User>>,
1700 pub body: Option<String>,
1701 #[serde(with = "time::serde::rfc3339::option")]
1702 pub closed_at: Option<time::OffsetDateTime>,
1703 pub comments: Option<i64>,
1704 #[serde(with = "time::serde::rfc3339::option")]
1705 pub created_at: Option<time::OffsetDateTime>,
1706 #[serde(with = "time::serde::rfc3339::option")]
1707 pub due_date: Option<time::OffsetDateTime>,
1708 #[serde(deserialize_with = "crate::none_if_blank_url")]
1709 pub html_url: Option<url::Url>,
1710 pub id: Option<i64>,
1711 pub is_locked: Option<bool>,
1712 pub labels: Option<Vec<Label>>,
1713 pub milestone: Option<Milestone>,
1714 pub number: Option<i64>,
1715 pub original_author: Option<String>,
1716 pub original_author_id: Option<i64>,
1717 pub pin_order: Option<i64>,
1718 pub pull_request: Option<PullRequestMeta>,
1719 #[serde(rename = "ref")]
1720 pub r#ref: Option<String>,
1721 pub repository: Option<RepositoryMeta>,
1722 pub state: Option<StateType>,
1723 pub title: Option<String>,
1724 #[serde(with = "time::serde::rfc3339::option")]
1725 pub updated_at: Option<time::OffsetDateTime>,
1726 #[serde(deserialize_with = "crate::none_if_blank_url")]
1727 pub url: Option<url::Url>,
1728 pub user: Option<User>,
1729}
1730
1731#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1732pub struct IssueConfig {
1733 pub blank_issues_enabled: Option<bool>,
1734 pub contact_links: Option<Vec<IssueConfigContactLink>>,
1735}
1736
1737#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1738pub struct IssueConfigContactLink {
1739 pub about: Option<String>,
1740 pub name: Option<String>,
1741 #[serde(deserialize_with = "crate::none_if_blank_url")]
1742 pub url: Option<url::Url>,
1743}
1744
1745#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1746pub struct IssueConfigValidation {
1747 pub message: Option<String>,
1748 pub valid: Option<bool>,
1749}
1750
1751#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1753pub struct IssueDeadline {
1754 #[serde(with = "time::serde::rfc3339::option")]
1755 pub due_date: Option<time::OffsetDateTime>,
1756}
1757
1758#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1760pub struct IssueFormField {
1761 pub attributes: Option<BTreeMap<String, serde_json::Value>>,
1762 pub id: Option<String>,
1763 #[serde(rename = "type")]
1764 pub r#type: Option<String>,
1765 pub validations: Option<BTreeMap<String, serde_json::Value>>,
1766 pub visible: Option<Vec<String>>,
1767}
1768
1769#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1770pub struct IssueFormFieldType {}
1771
1772#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1774pub struct IssueFormFieldVisible {}
1775
1776#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1778pub struct IssueLabelsOption {
1779 pub labels: Option<Vec<serde_json::Value>>,
1783 #[serde(with = "time::serde::rfc3339::option")]
1784 pub updated_at: Option<time::OffsetDateTime>,
1785}
1786
1787#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1789pub struct IssueMeta {
1790 pub index: Option<i64>,
1791 pub owner: Option<String>,
1792 pub repo: Option<String>,
1793}
1794
1795#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1797pub struct IssueTemplate {
1798 pub about: Option<String>,
1799 pub body: Option<Vec<IssueFormField>>,
1800 pub content: Option<String>,
1801 pub file_name: Option<String>,
1802 pub labels: Option<Vec<String>>,
1803 pub name: Option<String>,
1804 #[serde(rename = "ref")]
1805 pub r#ref: Option<String>,
1806 pub title: Option<String>,
1807}
1808
1809#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1811pub struct Label {
1812 pub color: Option<String>,
1813 pub description: Option<String>,
1814 pub exclusive: Option<bool>,
1815 pub id: Option<i64>,
1816 pub is_archived: Option<bool>,
1817 pub name: Option<String>,
1818 #[serde(deserialize_with = "crate::none_if_blank_url")]
1819 pub url: Option<url::Url>,
1820}
1821
1822#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1824pub struct LabelTemplate {
1825 pub color: Option<String>,
1826 pub description: Option<String>,
1827 pub exclusive: Option<bool>,
1828 pub name: Option<String>,
1829}
1830
1831#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1833pub struct LicenseTemplateInfo {
1834 pub body: Option<String>,
1835 pub implementation: Option<String>,
1836 pub key: Option<String>,
1837 pub name: Option<String>,
1838 #[serde(deserialize_with = "crate::none_if_blank_url")]
1839 pub url: Option<url::Url>,
1840}
1841
1842#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1844pub struct LicensesTemplateListEntry {
1845 pub key: Option<String>,
1846 pub name: Option<String>,
1847 #[serde(deserialize_with = "crate::none_if_blank_url")]
1848 pub url: Option<url::Url>,
1849}
1850
1851#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1853pub struct MarkdownOption {
1854 #[serde(rename = "Context")]
1860 pub context: Option<String>,
1861 #[serde(rename = "Mode")]
1867 pub mode: Option<String>,
1868 #[serde(rename = "Text")]
1874 pub text: Option<String>,
1875 #[serde(rename = "Wiki")]
1881 pub wiki: Option<bool>,
1882}
1883
1884#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1886pub struct MarkupOption {
1887 #[serde(rename = "BranchPath")]
1893 pub branch_path: Option<String>,
1894 #[serde(rename = "Context")]
1900 pub context: Option<String>,
1901 #[serde(rename = "FilePath")]
1907 pub file_path: Option<String>,
1908 #[serde(rename = "Mode")]
1914 pub mode: Option<String>,
1915 #[serde(rename = "Text")]
1921 pub text: Option<String>,
1922 #[serde(rename = "Wiki")]
1928 pub wiki: Option<bool>,
1929}
1930
1931#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1933pub struct MergePullRequestOption {
1934 #[serde(rename = "Do")]
1935 pub r#do: MergePullRequestOptionDo,
1936 #[serde(rename = "MergeCommitID")]
1937 pub merge_commit_id: Option<String>,
1938 #[serde(rename = "MergeMessageField")]
1939 pub merge_message_field: Option<String>,
1940 #[serde(rename = "MergeTitleField")]
1941 pub merge_title_field: Option<String>,
1942 pub delete_branch_after_merge: Option<bool>,
1943 pub force_merge: Option<bool>,
1944 pub head_commit_id: Option<String>,
1945 pub merge_when_checks_succeed: Option<bool>,
1946}
1947
1948#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
1949pub enum MergePullRequestOptionDo {
1950 #[serde(rename = "merge")]
1951 Merge,
1952 #[serde(rename = "rebase")]
1953 Rebase,
1954 #[serde(rename = "rebase-merge")]
1955 RebaseMerge,
1956 #[serde(rename = "squash")]
1957 Squash,
1958 #[serde(rename = "fast-forward-only")]
1959 FastForwardOnly,
1960 #[serde(rename = "manually-merged")]
1961 ManuallyMerged,
1962}
1963#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1967pub struct MigrateRepoOptions {
1968 pub auth_password: Option<String>,
1969 pub auth_token: Option<String>,
1970 pub auth_username: Option<String>,
1971 pub clone_addr: String,
1972 pub description: Option<String>,
1973 pub issues: Option<bool>,
1974 pub labels: Option<bool>,
1975 pub lfs: Option<bool>,
1976 pub lfs_endpoint: Option<String>,
1977 pub milestones: Option<bool>,
1978 pub mirror: Option<bool>,
1979 pub mirror_interval: Option<String>,
1980 pub private: Option<bool>,
1981 pub pull_requests: Option<bool>,
1982 pub releases: Option<bool>,
1983 pub repo_name: String,
1984 pub repo_owner: Option<String>,
1986 pub service: Option<MigrateRepoOptionsService>,
1987 pub uid: Option<i64>,
1989 pub wiki: Option<bool>,
1990}
1991
1992#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
1993pub enum MigrateRepoOptionsService {
1994 #[serde(rename = "git")]
1995 Git,
1996 #[serde(rename = "github")]
1997 Github,
1998 #[serde(rename = "gitea")]
1999 Gitea,
2000 #[serde(rename = "gitlab")]
2001 Gitlab,
2002 #[serde(rename = "gogs")]
2003 Gogs,
2004 #[serde(rename = "onedev")]
2005 Onedev,
2006 #[serde(rename = "gitbucket")]
2007 Gitbucket,
2008 #[serde(rename = "codebase")]
2009 Codebase,
2010}
2011#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2013pub struct Milestone {
2014 #[serde(with = "time::serde::rfc3339::option")]
2015 pub closed_at: Option<time::OffsetDateTime>,
2016 pub closed_issues: Option<i64>,
2017 #[serde(with = "time::serde::rfc3339::option")]
2018 pub created_at: Option<time::OffsetDateTime>,
2019 pub description: Option<String>,
2020 #[serde(with = "time::serde::rfc3339::option")]
2021 pub due_on: Option<time::OffsetDateTime>,
2022 pub id: Option<i64>,
2023 pub open_issues: Option<i64>,
2024 pub state: Option<StateType>,
2025 pub title: Option<String>,
2026 #[serde(with = "time::serde::rfc3339::option")]
2027 pub updated_at: Option<time::OffsetDateTime>,
2028}
2029
2030#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2032pub struct NewIssuePinsAllowed {
2033 pub issues: Option<bool>,
2034 pub pull_requests: Option<bool>,
2035}
2036
2037#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2039pub struct NodeInfo {
2040 pub metadata: Option<BTreeMap<String, serde_json::Value>>,
2041 #[serde(rename = "openRegistrations")]
2042 pub open_registrations: Option<bool>,
2043 pub protocols: Option<Vec<String>>,
2044 pub services: Option<NodeInfoServices>,
2045 pub software: Option<NodeInfoSoftware>,
2046 pub usage: Option<NodeInfoUsage>,
2047 pub version: Option<String>,
2048}
2049
2050#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2052pub struct NodeInfoServices {
2053 pub inbound: Option<Vec<String>>,
2054 pub outbound: Option<Vec<String>>,
2055}
2056
2057#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2059pub struct NodeInfoSoftware {
2060 pub homepage: Option<String>,
2061 pub name: Option<String>,
2062 pub repository: Option<String>,
2063 pub version: Option<String>,
2064}
2065
2066#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2068pub struct NodeInfoUsage {
2069 #[serde(rename = "localComments")]
2070 pub local_comments: Option<i64>,
2071 #[serde(rename = "localPosts")]
2072 pub local_posts: Option<i64>,
2073 pub users: Option<NodeInfoUsageUsers>,
2074}
2075
2076#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2078pub struct NodeInfoUsageUsers {
2079 #[serde(rename = "activeHalfyear")]
2080 pub active_halfyear: Option<i64>,
2081 #[serde(rename = "activeMonth")]
2082 pub active_month: Option<i64>,
2083 pub total: Option<i64>,
2084}
2085
2086#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2088pub struct Note {
2089 pub commit: Option<Commit>,
2090 pub message: Option<String>,
2091}
2092
2093#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2094pub struct NoteOptions {
2095 pub message: Option<String>,
2096}
2097
2098#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2100pub struct NotificationCount {
2101 pub new: Option<i64>,
2102}
2103
2104#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2106pub struct NotificationSubject {
2107 #[serde(deserialize_with = "crate::none_if_blank_url")]
2108 pub html_url: Option<url::Url>,
2109 #[serde(deserialize_with = "crate::none_if_blank_url")]
2110 pub latest_comment_html_url: Option<url::Url>,
2111 #[serde(deserialize_with = "crate::none_if_blank_url")]
2112 pub latest_comment_url: Option<url::Url>,
2113 pub state: Option<StateType>,
2114 pub title: Option<String>,
2115 #[serde(rename = "type")]
2116 pub r#type: Option<String>,
2117 #[serde(deserialize_with = "crate::none_if_blank_url")]
2118 pub url: Option<url::Url>,
2119}
2120
2121#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2123pub struct NotificationThread {
2124 pub id: Option<i64>,
2125 pub pinned: Option<bool>,
2126 pub repository: Option<Repository>,
2127 pub subject: Option<NotificationSubject>,
2128 pub unread: Option<bool>,
2129 #[serde(with = "time::serde::rfc3339::option")]
2130 pub updated_at: Option<time::OffsetDateTime>,
2131 #[serde(deserialize_with = "crate::none_if_blank_url")]
2132 pub url: Option<url::Url>,
2133}
2134
2135#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2137pub struct NotifySubjectType {}
2138
2139#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2140pub struct OAuth2Application {
2141 pub client_id: Option<String>,
2142 pub client_secret: Option<String>,
2143 pub confidential_client: Option<bool>,
2144 #[serde(with = "time::serde::rfc3339::option")]
2145 pub created: Option<time::OffsetDateTime>,
2146 pub id: Option<i64>,
2147 pub name: Option<String>,
2148 pub redirect_uris: Option<Vec<String>>,
2149}
2150
2151#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
2154pub enum ObjectFormatName {
2155 #[serde(rename = "sha1")]
2156 Sha1,
2157 #[serde(rename = "sha256")]
2158 Sha256,
2159}
2160#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2162pub struct Organization {
2163 #[serde(deserialize_with = "crate::none_if_blank_url")]
2164 pub avatar_url: Option<url::Url>,
2165 pub description: Option<String>,
2166 pub email: Option<String>,
2167 pub full_name: Option<String>,
2168 pub id: Option<i64>,
2169 pub location: Option<String>,
2170 pub name: Option<String>,
2171 pub repo_admin_change_team_access: Option<bool>,
2172 pub username: Option<String>,
2174 pub visibility: Option<String>,
2175 pub website: Option<String>,
2176}
2177
2178#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2180pub struct OrganizationPermissions {
2181 pub can_create_repository: Option<bool>,
2182 pub can_read: Option<bool>,
2183 pub can_write: Option<bool>,
2184 pub is_admin: Option<bool>,
2185 pub is_owner: Option<bool>,
2186}
2187
2188#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2190pub struct PRBranchInfo {
2191 pub label: Option<String>,
2192 #[serde(rename = "ref")]
2193 pub r#ref: Option<String>,
2194 pub repo: Option<Repository>,
2195 pub repo_id: Option<i64>,
2196 pub sha: Option<String>,
2197}
2198
2199#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2201pub struct Package {
2202 #[serde(with = "time::serde::rfc3339::option")]
2203 pub created_at: Option<time::OffsetDateTime>,
2204 pub creator: Option<User>,
2205 #[serde(deserialize_with = "crate::none_if_blank_url")]
2206 pub html_url: Option<url::Url>,
2207 pub id: Option<i64>,
2208 pub name: Option<String>,
2209 pub owner: Option<User>,
2210 pub repository: Option<Repository>,
2211 #[serde(rename = "type")]
2212 pub r#type: Option<String>,
2213 pub version: Option<String>,
2214}
2215
2216#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2218pub struct PackageFile {
2219 #[serde(rename = "Size")]
2220 pub size: Option<i64>,
2221 pub id: Option<i64>,
2222 pub md5: Option<String>,
2223 pub name: Option<String>,
2224 pub sha1: Option<String>,
2225 pub sha256: Option<String>,
2226 pub sha512: Option<String>,
2227}
2228
2229#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2231pub struct PayloadCommit {
2232 pub added: Option<Vec<String>>,
2233 pub author: Option<PayloadUser>,
2234 pub committer: Option<PayloadUser>,
2235 pub id: Option<String>,
2237 pub message: Option<String>,
2238 pub modified: Option<Vec<String>>,
2239 pub removed: Option<Vec<String>>,
2240 #[serde(with = "time::serde::rfc3339::option")]
2241 pub timestamp: Option<time::OffsetDateTime>,
2242 #[serde(deserialize_with = "crate::none_if_blank_url")]
2243 pub url: Option<url::Url>,
2244 pub verification: Option<PayloadCommitVerification>,
2245}
2246
2247#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2249pub struct PayloadCommitVerification {
2250 pub payload: Option<String>,
2251 pub reason: Option<String>,
2252 pub signature: Option<String>,
2253 pub signer: Option<PayloadUser>,
2254 pub verified: Option<bool>,
2255}
2256
2257#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2259pub struct PayloadUser {
2260 pub email: Option<String>,
2261 pub name: Option<String>,
2263 pub username: Option<String>,
2264}
2265
2266#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2268pub struct Permission {
2269 pub admin: Option<bool>,
2270 pub pull: Option<bool>,
2271 pub push: Option<bool>,
2272}
2273
2274#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2276pub struct PublicKey {
2277 #[serde(with = "time::serde::rfc3339::option")]
2278 pub created_at: Option<time::OffsetDateTime>,
2279 pub fingerprint: Option<String>,
2280 pub id: Option<i64>,
2281 pub key: Option<String>,
2282 pub key_type: Option<String>,
2283 pub read_only: Option<bool>,
2284 pub title: Option<String>,
2285 #[serde(deserialize_with = "crate::none_if_blank_url")]
2286 pub url: Option<url::Url>,
2287 pub user: Option<User>,
2288}
2289
2290#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2292pub struct PullRequest {
2293 pub additions: Option<i64>,
2294 pub allow_maintainer_edit: Option<bool>,
2295 pub assignee: Option<User>,
2296 pub assignees: Option<Vec<User>>,
2297 pub base: Option<PRBranchInfo>,
2298 pub body: Option<String>,
2299 pub changed_files: Option<i64>,
2300 #[serde(with = "time::serde::rfc3339::option")]
2301 pub closed_at: Option<time::OffsetDateTime>,
2302 pub comments: Option<i64>,
2303 #[serde(with = "time::serde::rfc3339::option")]
2304 pub created_at: Option<time::OffsetDateTime>,
2305 pub deletions: Option<i64>,
2306 #[serde(deserialize_with = "crate::none_if_blank_url")]
2307 pub diff_url: Option<url::Url>,
2308 pub draft: Option<bool>,
2309 #[serde(with = "time::serde::rfc3339::option")]
2310 pub due_date: Option<time::OffsetDateTime>,
2311 pub head: Option<PRBranchInfo>,
2312 #[serde(deserialize_with = "crate::none_if_blank_url")]
2313 pub html_url: Option<url::Url>,
2314 pub id: Option<i64>,
2315 pub is_locked: Option<bool>,
2316 pub labels: Option<Vec<Label>>,
2317 pub merge_base: Option<String>,
2318 pub merge_commit_sha: Option<String>,
2319 pub mergeable: Option<bool>,
2320 pub merged: Option<bool>,
2321 #[serde(with = "time::serde::rfc3339::option")]
2322 pub merged_at: Option<time::OffsetDateTime>,
2323 pub merged_by: Option<User>,
2324 pub milestone: Option<Milestone>,
2325 pub number: Option<i64>,
2326 #[serde(deserialize_with = "crate::none_if_blank_url")]
2327 pub patch_url: Option<url::Url>,
2328 pub pin_order: Option<i64>,
2329 #[serde(deserialize_with = "crate::requested_reviewers_ignore_null")]
2330 pub requested_reviewers: Option<Vec<User>>,
2331 pub requested_reviewers_teams: Option<Vec<Team>>,
2332 pub review_comments: Option<i64>,
2334 pub state: Option<StateType>,
2335 pub title: Option<String>,
2336 #[serde(with = "time::serde::rfc3339::option")]
2337 pub updated_at: Option<time::OffsetDateTime>,
2338 #[serde(deserialize_with = "crate::none_if_blank_url")]
2339 pub url: Option<url::Url>,
2340 pub user: Option<User>,
2341}
2342
2343#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2345pub struct PullRequestMeta {
2346 pub draft: Option<bool>,
2347 #[serde(deserialize_with = "crate::none_if_blank_url")]
2348 pub html_url: Option<url::Url>,
2349 pub merged: Option<bool>,
2350 #[serde(with = "time::serde::rfc3339::option")]
2351 pub merged_at: Option<time::OffsetDateTime>,
2352}
2353
2354#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2356pub struct PullReview {
2357 pub body: Option<String>,
2358 pub comments_count: Option<i64>,
2359 pub commit_id: Option<String>,
2360 pub dismissed: Option<bool>,
2361 #[serde(deserialize_with = "crate::none_if_blank_url")]
2362 pub html_url: Option<url::Url>,
2363 pub id: Option<i64>,
2364 pub official: Option<bool>,
2365 #[serde(deserialize_with = "crate::none_if_blank_url")]
2366 pub pull_request_url: Option<url::Url>,
2367 pub stale: Option<bool>,
2368 pub state: Option<String>,
2369 #[serde(with = "time::serde::rfc3339::option")]
2370 pub submitted_at: Option<time::OffsetDateTime>,
2371 pub team: Option<Team>,
2372 #[serde(with = "time::serde::rfc3339::option")]
2373 pub updated_at: Option<time::OffsetDateTime>,
2374 pub user: Option<User>,
2375}
2376
2377#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2379pub struct PullReviewComment {
2380 pub body: Option<String>,
2381 pub commit_id: Option<String>,
2382 #[serde(with = "time::serde::rfc3339::option")]
2383 pub created_at: Option<time::OffsetDateTime>,
2384 pub diff_hunk: Option<String>,
2385 #[serde(deserialize_with = "crate::none_if_blank_url")]
2386 pub html_url: Option<url::Url>,
2387 pub id: Option<i64>,
2388 pub original_commit_id: Option<String>,
2389 pub original_position: Option<u64>,
2390 pub path: Option<String>,
2391 pub position: Option<u64>,
2392 pub pull_request_review_id: Option<i64>,
2393 #[serde(deserialize_with = "crate::none_if_blank_url")]
2394 pub pull_request_url: Option<url::Url>,
2395 pub resolver: Option<User>,
2396 #[serde(with = "time::serde::rfc3339::option")]
2397 pub updated_at: Option<time::OffsetDateTime>,
2398 pub user: Option<User>,
2399}
2400
2401#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2403pub struct PullReviewRequestOptions {
2404 pub reviewers: Option<Vec<String>>,
2405 pub team_reviewers: Option<Vec<String>>,
2406}
2407
2408#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2410pub struct PushMirror {
2411 #[serde(with = "time::serde::rfc3339::option")]
2412 pub created: Option<time::OffsetDateTime>,
2413 pub interval: Option<String>,
2414 pub last_error: Option<String>,
2415 #[serde(with = "time::serde::rfc3339::option")]
2416 pub last_update: Option<time::OffsetDateTime>,
2417 pub public_key: Option<String>,
2418 pub remote_address: Option<String>,
2419 pub remote_name: Option<String>,
2420 pub repo_name: Option<String>,
2421 pub sync_on_commit: Option<bool>,
2422}
2423
2424#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2426pub struct QuotaGroup {
2427 pub name: Option<String>,
2429 pub rules: Option<Vec<QuotaRuleInfo>>,
2431}
2432
2433#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2435pub struct QuotaInfo {
2436 pub groups: Option<Vec<QuotaGroup>>,
2437 pub used: Option<QuotaUsed>,
2438}
2439
2440#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2442pub struct QuotaRuleInfo {
2443 pub limit: Option<i64>,
2445 pub name: Option<String>,
2447 pub subjects: Option<Vec<String>>,
2449}
2450
2451#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2453pub struct QuotaUsed {
2454 pub size: Option<QuotaUsedSize>,
2455}
2456
2457#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2459pub struct QuotaUsedArtifact {
2460 #[serde(deserialize_with = "crate::none_if_blank_url")]
2461 pub html_url: Option<url::Url>,
2463 pub name: Option<String>,
2465 pub size: Option<i64>,
2467}
2468
2469#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2471pub struct QuotaUsedAttachment {
2472 #[serde(deserialize_with = "crate::none_if_blank_url")]
2473 pub api_url: Option<url::Url>,
2475 pub contained_in: Option<QuotaUsedAttachmentContainedIn>,
2477 pub name: Option<String>,
2479 pub size: Option<i64>,
2481}
2482
2483#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2485pub struct QuotaUsedAttachmentContainedIn {
2486 #[serde(deserialize_with = "crate::none_if_blank_url")]
2487 pub api_url: Option<url::Url>,
2489 #[serde(deserialize_with = "crate::none_if_blank_url")]
2490 pub html_url: Option<url::Url>,
2492}
2493
2494#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2496pub struct QuotaUsedPackage {
2497 #[serde(deserialize_with = "crate::none_if_blank_url")]
2498 pub html_url: Option<url::Url>,
2500 pub name: Option<String>,
2502 pub size: Option<i64>,
2504 #[serde(rename = "type")]
2506 pub r#type: Option<String>,
2507 pub version: Option<String>,
2509}
2510
2511#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2513pub struct QuotaUsedSize {
2514 pub assets: Option<QuotaUsedSizeAssets>,
2515 pub git: Option<QuotaUsedSizeGit>,
2516 pub repos: Option<QuotaUsedSizeRepos>,
2517}
2518
2519#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2521pub struct QuotaUsedSizeAssets {
2522 pub artifacts: Option<i64>,
2524 pub attachments: Option<QuotaUsedSizeAssetsAttachments>,
2525 pub packages: Option<QuotaUsedSizeAssetsPackages>,
2526}
2527
2528#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2530pub struct QuotaUsedSizeAssetsAttachments {
2531 pub issues: Option<i64>,
2533 pub releases: Option<i64>,
2535}
2536
2537#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2539pub struct QuotaUsedSizeAssetsPackages {
2540 pub all: Option<i64>,
2542}
2543
2544#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2546pub struct QuotaUsedSizeGit {
2547 #[serde(rename = "LFS")]
2549 pub lfs: Option<i64>,
2550}
2551
2552#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2554pub struct QuotaUsedSizeRepos {
2555 pub private: Option<i64>,
2557 pub public: Option<i64>,
2559}
2560
2561#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2563pub struct Reaction {
2564 pub content: Option<String>,
2565 #[serde(with = "time::serde::rfc3339::option")]
2566 pub created_at: Option<time::OffsetDateTime>,
2567 pub user: Option<User>,
2568}
2569
2570#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2571pub struct Reference {
2572 pub object: Option<GitObject>,
2573 #[serde(rename = "ref")]
2574 pub r#ref: Option<String>,
2575 #[serde(deserialize_with = "crate::none_if_blank_url")]
2576 pub url: Option<url::Url>,
2577}
2578
2579#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2581pub struct Release {
2582 pub archive_download_count: Option<TagArchiveDownloadCount>,
2583 pub assets: Option<Vec<Attachment>>,
2584 pub author: Option<User>,
2585 pub body: Option<String>,
2586 #[serde(with = "time::serde::rfc3339::option")]
2587 pub created_at: Option<time::OffsetDateTime>,
2588 pub draft: Option<bool>,
2589 pub hide_archive_links: Option<bool>,
2590 #[serde(deserialize_with = "crate::none_if_blank_url")]
2591 pub html_url: Option<url::Url>,
2592 pub id: Option<i64>,
2593 pub name: Option<String>,
2594 pub prerelease: Option<bool>,
2595 #[serde(with = "time::serde::rfc3339::option")]
2596 pub published_at: Option<time::OffsetDateTime>,
2597 pub tag_name: Option<String>,
2598 #[serde(deserialize_with = "crate::none_if_blank_url")]
2599 pub tarball_url: Option<url::Url>,
2600 pub target_commitish: Option<String>,
2601 #[serde(deserialize_with = "crate::none_if_blank_url")]
2602 pub upload_url: Option<url::Url>,
2603 #[serde(deserialize_with = "crate::none_if_blank_url")]
2604 pub url: Option<url::Url>,
2605 #[serde(deserialize_with = "crate::none_if_blank_url")]
2606 pub zipball_url: Option<url::Url>,
2607}
2608
2609#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2611pub struct RenameUserOption {
2612 pub new_username: String,
2614}
2615
2616#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2618pub struct ReplaceFlagsOption {
2619 pub flags: Option<Vec<String>>,
2620}
2621
2622#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2624pub struct RepoCollaboratorPermission {
2625 pub permission: Option<String>,
2626 pub role_name: Option<String>,
2627 pub user: Option<User>,
2628}
2629
2630#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2631pub struct RepoCommit {
2632 pub author: Option<CommitUser>,
2633 pub committer: Option<CommitUser>,
2634 pub message: Option<String>,
2635 pub tree: Option<CommitMeta>,
2636 #[serde(deserialize_with = "crate::none_if_blank_url")]
2637 pub url: Option<url::Url>,
2638 pub verification: Option<PayloadCommitVerification>,
2639}
2640
2641#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2643pub struct RepoTopicOptions {
2644 pub topics: Option<Vec<String>>,
2646}
2647
2648#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2650pub struct RepoTransfer {
2651 pub doer: Option<User>,
2652 pub recipient: Option<User>,
2653 pub teams: Option<Vec<Team>>,
2654}
2655
2656#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2658pub struct Repository {
2659 pub allow_fast_forward_only_merge: Option<bool>,
2660 pub allow_merge_commits: Option<bool>,
2661 pub allow_rebase: Option<bool>,
2662 pub allow_rebase_explicit: Option<bool>,
2663 pub allow_rebase_update: Option<bool>,
2664 pub allow_squash_merge: Option<bool>,
2665 pub archived: Option<bool>,
2666 #[serde(with = "time::serde::rfc3339::option")]
2667 pub archived_at: Option<time::OffsetDateTime>,
2668 #[serde(deserialize_with = "crate::none_if_blank_url")]
2669 pub avatar_url: Option<url::Url>,
2670 #[serde(deserialize_with = "crate::none_if_blank_url")]
2671 pub clone_url: Option<url::Url>,
2672 #[serde(with = "time::serde::rfc3339::option")]
2673 pub created_at: Option<time::OffsetDateTime>,
2674 pub default_allow_maintainer_edit: Option<bool>,
2675 pub default_branch: Option<String>,
2676 pub default_delete_branch_after_merge: Option<bool>,
2677 pub default_merge_style: Option<DefaultMergeStyle>,
2678 pub default_update_style: Option<String>,
2679 pub description: Option<String>,
2680 pub empty: Option<bool>,
2681 pub external_tracker: Option<ExternalTracker>,
2682 pub external_wiki: Option<ExternalWiki>,
2683 pub fork: Option<bool>,
2684 pub forks_count: Option<i64>,
2685 pub full_name: Option<String>,
2686 pub globally_editable_wiki: Option<bool>,
2687 pub has_actions: Option<bool>,
2688 pub has_issues: Option<bool>,
2689 pub has_packages: Option<bool>,
2690 pub has_projects: Option<bool>,
2691 pub has_pull_requests: Option<bool>,
2692 pub has_releases: Option<bool>,
2693 pub has_wiki: Option<bool>,
2694 #[serde(deserialize_with = "crate::none_if_blank_url")]
2695 pub html_url: Option<url::Url>,
2696 pub id: Option<i64>,
2697 pub ignore_whitespace_conflicts: Option<bool>,
2698 pub internal: Option<bool>,
2699 pub internal_tracker: Option<InternalTracker>,
2700 pub language: Option<String>,
2701 #[serde(deserialize_with = "crate::none_if_blank_url")]
2702 pub languages_url: Option<url::Url>,
2703 pub link: Option<String>,
2704 pub mirror: Option<bool>,
2705 pub mirror_interval: Option<String>,
2706 #[serde(with = "time::serde::rfc3339::option")]
2707 pub mirror_updated: Option<time::OffsetDateTime>,
2708 pub name: Option<String>,
2709 pub object_format_name: Option<ObjectFormatName>,
2710 pub open_issues_count: Option<i64>,
2711 pub open_pr_counter: Option<i64>,
2712 #[serde(deserialize_with = "crate::none_if_blank_url")]
2713 pub original_url: Option<url::Url>,
2714 pub owner: Option<User>,
2715 pub parent: Option<Box<Repository>>,
2716 pub permissions: Option<Permission>,
2717 pub private: Option<bool>,
2718 pub release_counter: Option<i64>,
2719 pub repo_transfer: Option<RepoTransfer>,
2720 pub size: Option<i64>,
2721 #[serde(deserialize_with = "crate::deserialize_optional_ssh_url")]
2722 pub ssh_url: Option<url::Url>,
2723 pub stars_count: Option<i64>,
2724 pub template: Option<bool>,
2725 pub topics: Option<Vec<String>>,
2726 #[serde(with = "time::serde::rfc3339::option")]
2727 pub updated_at: Option<time::OffsetDateTime>,
2728 #[serde(deserialize_with = "crate::none_if_blank_url")]
2729 pub url: Option<url::Url>,
2730 pub watchers_count: Option<i64>,
2731 pub website: Option<String>,
2732 pub wiki_branch: Option<String>,
2733}
2734
2735#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2737pub struct RepositoryMeta {
2738 pub full_name: Option<String>,
2739 pub id: Option<i64>,
2740 pub name: Option<String>,
2741 pub owner: Option<String>,
2742}
2743
2744#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2746pub struct ReviewStateType {}
2747
2748#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2750pub struct SearchResults {
2751 pub data: Option<Vec<Repository>>,
2752 pub ok: Option<bool>,
2753}
2754
2755#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2757pub struct Secret {
2758 #[serde(with = "time::serde::rfc3339::option")]
2759 pub created_at: Option<time::OffsetDateTime>,
2760 pub name: Option<String>,
2762}
2763
2764#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2766pub struct ServerVersion {
2767 pub version: Option<String>,
2768}
2769
2770#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2772pub struct SetUserQuotaGroupsOptions {
2773 pub groups: Vec<String>,
2775}
2776
2777#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
2780pub enum StateType {
2781 #[serde(rename = "open")]
2782 Open,
2783 #[serde(rename = "closed")]
2784 Closed,
2785}
2786#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2788pub struct StopWatch {
2789 #[serde(with = "time::serde::rfc3339::option")]
2790 pub created: Option<time::OffsetDateTime>,
2791 pub duration: Option<String>,
2792 pub issue_index: Option<i64>,
2793 pub issue_title: Option<String>,
2794 pub repo_name: Option<String>,
2795 pub repo_owner_name: Option<String>,
2796 pub seconds: Option<i64>,
2797}
2798
2799#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2801pub struct SubmitPullReviewOptions {
2802 pub body: Option<String>,
2803 pub event: Option<String>,
2804}
2805
2806#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2808pub struct Tag {
2809 pub archive_download_count: Option<TagArchiveDownloadCount>,
2810 pub commit: Option<CommitMeta>,
2811 pub id: Option<String>,
2812 pub message: Option<String>,
2813 pub name: Option<String>,
2814 #[serde(deserialize_with = "crate::none_if_blank_url")]
2815 pub tarball_url: Option<url::Url>,
2816 #[serde(deserialize_with = "crate::none_if_blank_url")]
2817 pub zipball_url: Option<url::Url>,
2818}
2819
2820#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2822pub struct TagArchiveDownloadCount {
2823 pub tar_gz: Option<i64>,
2824 pub zip: Option<i64>,
2825}
2826
2827#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2829pub struct TagProtection {
2830 #[serde(with = "time::serde::rfc3339::option")]
2831 pub created_at: Option<time::OffsetDateTime>,
2832 pub id: Option<i64>,
2833 pub name_pattern: Option<String>,
2834 #[serde(with = "time::serde::rfc3339::option")]
2835 pub updated_at: Option<time::OffsetDateTime>,
2836 pub whitelist_teams: Option<Vec<String>>,
2837 pub whitelist_usernames: Option<Vec<String>>,
2838}
2839
2840#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2842pub struct Team {
2843 pub can_create_org_repo: Option<bool>,
2844 pub description: Option<String>,
2845 pub id: Option<i64>,
2846 pub includes_all_repositories: Option<bool>,
2847 pub name: Option<String>,
2848 pub organization: Option<Organization>,
2849 pub permission: Option<TeamPermission>,
2850 pub units: Option<Vec<String>>,
2851 pub units_map: Option<BTreeMap<String, String>>,
2852}
2853
2854#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
2855pub enum TeamPermission {
2856 #[serde(rename = "none")]
2857 None,
2858 #[serde(rename = "read")]
2859 Read,
2860 #[serde(rename = "write")]
2861 Write,
2862 #[serde(rename = "admin")]
2863 Admin,
2864 #[serde(rename = "owner")]
2865 Owner,
2866}
2867#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2869pub struct TimeStamp {}
2870
2871#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2873pub struct TimelineComment {
2874 pub assignee: Option<User>,
2875 pub assignee_team: Option<Team>,
2876 pub body: Option<String>,
2877 #[serde(with = "time::serde::rfc3339::option")]
2878 pub created_at: Option<time::OffsetDateTime>,
2879 pub dependent_issue: Option<Issue>,
2880 #[serde(deserialize_with = "crate::none_if_blank_url")]
2881 pub html_url: Option<url::Url>,
2882 pub id: Option<i64>,
2883 #[serde(deserialize_with = "crate::none_if_blank_url")]
2884 pub issue_url: Option<url::Url>,
2885 pub label: Option<Label>,
2886 pub milestone: Option<Milestone>,
2887 pub new_ref: Option<String>,
2888 pub new_title: Option<String>,
2889 pub old_milestone: Option<Milestone>,
2890 pub old_project_id: Option<i64>,
2891 pub old_ref: Option<String>,
2892 pub old_title: Option<String>,
2893 pub project_id: Option<i64>,
2894 #[serde(deserialize_with = "crate::none_if_blank_url")]
2895 pub pull_request_url: Option<url::Url>,
2896 pub ref_action: Option<String>,
2897 pub ref_comment: Option<Comment>,
2898 pub ref_commit_sha: Option<String>,
2900 pub ref_issue: Option<Issue>,
2901 pub removed_assignee: Option<bool>,
2903 pub resolve_doer: Option<User>,
2904 pub review_id: Option<i64>,
2905 pub tracked_time: Option<TrackedTime>,
2906 #[serde(rename = "type")]
2907 pub r#type: Option<String>,
2908 #[serde(with = "time::serde::rfc3339::option")]
2909 pub updated_at: Option<time::OffsetDateTime>,
2910 pub user: Option<User>,
2911}
2912
2913#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2915pub struct TopicName {
2916 pub topics: Option<Vec<String>>,
2917}
2918
2919#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2921pub struct TopicResponse {
2922 #[serde(with = "time::serde::rfc3339::option")]
2923 pub created: Option<time::OffsetDateTime>,
2924 pub id: Option<i64>,
2925 pub repo_count: Option<i64>,
2926 pub topic_name: Option<String>,
2927 #[serde(with = "time::serde::rfc3339::option")]
2928 pub updated: Option<time::OffsetDateTime>,
2929}
2930
2931#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2933pub struct TrackedTime {
2934 #[serde(with = "time::serde::rfc3339::option")]
2935 pub created: Option<time::OffsetDateTime>,
2936 pub id: Option<i64>,
2937 pub issue: Option<Issue>,
2938 pub issue_id: Option<i64>,
2940 pub time: Option<i64>,
2942 pub user_id: Option<i64>,
2944 pub user_name: Option<String>,
2945}
2946
2947#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2949pub struct TransferRepoOption {
2950 pub new_owner: String,
2951 pub team_ids: Option<Vec<i64>>,
2953}
2954
2955#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2957pub struct UpdateBranchRepoOption {
2958 pub name: String,
2960}
2961
2962#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2966pub struct UpdateFileOptions {
2967 pub author: Option<Identity>,
2968 pub branch: Option<String>,
2970 pub committer: Option<Identity>,
2971 pub content: String,
2973 pub dates: Option<CommitDateOptions>,
2974 pub from_path: Option<String>,
2976 pub message: Option<String>,
2978 pub new_branch: Option<String>,
2980 pub sha: String,
2982 pub signoff: Option<bool>,
2984}
2985
2986#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2988pub struct UpdateRepoAvatarOption {
2989 pub image: Option<String>,
2991}
2992
2993#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2995pub struct UpdateUserAvatarOption {
2996 pub image: Option<String>,
2998}
2999
3000#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3002pub struct UpdateVariableOption {
3003 pub name: Option<String>,
3005 pub value: String,
3007}
3008
3009#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3011pub struct User {
3012 pub active: Option<bool>,
3014 #[serde(deserialize_with = "crate::none_if_blank_url")]
3015 pub avatar_url: Option<url::Url>,
3017 #[serde(with = "time::serde::rfc3339::option")]
3018 pub created: Option<time::OffsetDateTime>,
3019 pub description: Option<String>,
3021 pub email: Option<String>,
3022 pub followers_count: Option<i64>,
3024 pub following_count: Option<i64>,
3025 pub full_name: Option<String>,
3027 #[serde(deserialize_with = "crate::none_if_blank_url")]
3028 pub html_url: Option<url::Url>,
3030 pub id: Option<i64>,
3032 pub is_admin: Option<bool>,
3034 pub language: Option<String>,
3036 #[serde(with = "time::serde::rfc3339::option")]
3037 pub last_login: Option<time::OffsetDateTime>,
3038 pub location: Option<String>,
3040 pub login: Option<String>,
3042 pub login_name: Option<String>,
3044 pub prohibit_login: Option<bool>,
3046 pub pronouns: Option<String>,
3048 pub restricted: Option<bool>,
3050 pub source_id: Option<i64>,
3052 pub starred_repos_count: Option<i64>,
3053 pub visibility: Option<String>,
3055 pub website: Option<String>,
3057}
3058
3059#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3061pub struct UserHeatmapData {
3062 pub contributions: Option<i64>,
3063 pub timestamp: Option<i64>,
3064}
3065
3066#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3068pub struct UserSettings {
3069 pub description: Option<String>,
3070 pub diff_view_style: Option<String>,
3071 pub enable_repo_unit_hints: Option<bool>,
3072 pub full_name: Option<String>,
3073 pub hide_activity: Option<bool>,
3074 pub hide_email: Option<bool>,
3076 pub language: Option<String>,
3077 pub location: Option<String>,
3078 pub pronouns: Option<String>,
3079 pub theme: Option<String>,
3080 pub website: Option<String>,
3081}
3082
3083#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3085pub struct UserSettingsOptions {
3086 pub description: Option<String>,
3087 pub diff_view_style: Option<String>,
3088 pub enable_repo_unit_hints: Option<bool>,
3089 pub full_name: Option<String>,
3090 pub hide_activity: Option<bool>,
3091 pub hide_email: Option<bool>,
3093 pub language: Option<String>,
3094 pub location: Option<String>,
3095 pub pronouns: Option<String>,
3096 pub theme: Option<String>,
3097 pub website: Option<String>,
3098}
3099
3100#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3102pub struct WatchInfo {
3103 #[serde(with = "time::serde::rfc3339::option")]
3104 pub created_at: Option<time::OffsetDateTime>,
3105 pub ignored: Option<bool>,
3106 pub reason: Option<serde_json::Value>,
3107 #[serde(deserialize_with = "crate::none_if_blank_url")]
3108 pub repository_url: Option<url::Url>,
3109 pub subscribed: Option<bool>,
3110 #[serde(deserialize_with = "crate::none_if_blank_url")]
3111 pub url: Option<url::Url>,
3112}
3113
3114#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3116pub struct WikiCommit {
3117 pub author: Option<CommitUser>,
3118 pub commiter: Option<CommitUser>,
3119 pub message: Option<String>,
3120 pub sha: Option<String>,
3121}
3122
3123#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3125pub struct WikiCommitList {
3126 pub commits: Option<Vec<WikiCommit>>,
3127 pub count: Option<i64>,
3128}
3129
3130#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3132pub struct WikiPage {
3133 pub commit_count: Option<i64>,
3134 pub content_base64: Option<String>,
3136 pub footer: Option<String>,
3137 #[serde(deserialize_with = "crate::none_if_blank_url")]
3138 pub html_url: Option<url::Url>,
3139 pub last_commit: Option<WikiCommit>,
3140 pub sidebar: Option<String>,
3141 pub sub_url: Option<String>,
3142 pub title: Option<String>,
3143}
3144
3145#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3147pub struct WikiPageMetaData {
3148 #[serde(deserialize_with = "crate::none_if_blank_url")]
3149 pub html_url: Option<url::Url>,
3150 pub last_commit: Option<WikiCommit>,
3151 pub sub_url: Option<String>,
3152 pub title: Option<String>,
3153}
3154
3155pub struct AccessTokenListHeaders {
3156 pub x_total_count: Option<i64>,
3157}
3158
3159impl TryFrom<&reqwest::header::HeaderMap> for AccessTokenListHeaders {
3160 type Error = StructureError;
3161
3162 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3163 let x_total_count = map
3164 .get("x-total-count")
3165 .map(|s| -> Result<_, _> {
3166 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3167 s.parse::<i64>()
3168 .map_err(|_| StructureError::HeaderParseFailed)
3169 })
3170 .transpose()?;
3171 Ok(Self { x_total_count })
3172 }
3173}
3174
3175pub struct ActivityFeedsListHeaders {
3176 pub x_total_count: Option<i64>,
3177}
3178
3179impl TryFrom<&reqwest::header::HeaderMap> for ActivityFeedsListHeaders {
3180 type Error = StructureError;
3181
3182 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3183 let x_total_count = map
3184 .get("x-total-count")
3185 .map(|s| -> Result<_, _> {
3186 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3187 s.parse::<i64>()
3188 .map_err(|_| StructureError::HeaderParseFailed)
3189 })
3190 .transpose()?;
3191 Ok(Self { x_total_count })
3192 }
3193}
3194
3195pub struct BlockedUserListHeaders {
3196 pub x_total_count: Option<i64>,
3197}
3198
3199impl TryFrom<&reqwest::header::HeaderMap> for BlockedUserListHeaders {
3200 type Error = StructureError;
3201
3202 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3203 let x_total_count = map
3204 .get("x-total-count")
3205 .map(|s| -> Result<_, _> {
3206 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3207 s.parse::<i64>()
3208 .map_err(|_| StructureError::HeaderParseFailed)
3209 })
3210 .transpose()?;
3211 Ok(Self { x_total_count })
3212 }
3213}
3214
3215pub struct BranchListHeaders {
3216 pub x_total_count: Option<i64>,
3217}
3218
3219impl TryFrom<&reqwest::header::HeaderMap> for BranchListHeaders {
3220 type Error = StructureError;
3221
3222 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3223 let x_total_count = map
3224 .get("x-total-count")
3225 .map(|s| -> Result<_, _> {
3226 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3227 s.parse::<i64>()
3228 .map_err(|_| StructureError::HeaderParseFailed)
3229 })
3230 .transpose()?;
3231 Ok(Self { x_total_count })
3232 }
3233}
3234
3235pub struct ChangedFileListHeaders {
3236 pub x_has_more: Option<bool>,
3237 pub x_total_count: Option<i64>,
3238}
3239
3240impl TryFrom<&reqwest::header::HeaderMap> for ChangedFileListHeaders {
3241 type Error = StructureError;
3242
3243 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3244 let x_has_more = map
3245 .get("x-hasmore")
3246 .map(|s| -> Result<_, _> {
3247 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3248 s.parse::<bool>()
3249 .map_err(|_| StructureError::HeaderParseFailed)
3250 })
3251 .transpose()?;
3252 let x_total_count = map
3253 .get("x-total-count")
3254 .map(|s| -> Result<_, _> {
3255 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3256 s.parse::<i64>()
3257 .map_err(|_| StructureError::HeaderParseFailed)
3258 })
3259 .transpose()?;
3260 Ok(Self {
3261 x_has_more,
3262 x_total_count,
3263 })
3264 }
3265}
3266
3267pub struct CommentListHeaders {
3268 pub x_total_count: Option<i64>,
3269}
3270
3271impl TryFrom<&reqwest::header::HeaderMap> for CommentListHeaders {
3272 type Error = StructureError;
3273
3274 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3275 let x_total_count = map
3276 .get("x-total-count")
3277 .map(|s| -> Result<_, _> {
3278 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3279 s.parse::<i64>()
3280 .map_err(|_| StructureError::HeaderParseFailed)
3281 })
3282 .transpose()?;
3283 Ok(Self { x_total_count })
3284 }
3285}
3286
3287pub struct CommitListHeaders {
3288 pub x_has_more: Option<bool>,
3289 pub x_total_count: Option<i64>,
3290}
3291
3292impl TryFrom<&reqwest::header::HeaderMap> for CommitListHeaders {
3293 type Error = StructureError;
3294
3295 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3296 let x_has_more = map
3297 .get("x-hasmore")
3298 .map(|s| -> Result<_, _> {
3299 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3300 s.parse::<bool>()
3301 .map_err(|_| StructureError::HeaderParseFailed)
3302 })
3303 .transpose()?;
3304 let x_total_count = map
3305 .get("x-total-count")
3306 .map(|s| -> Result<_, _> {
3307 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3308 s.parse::<i64>()
3309 .map_err(|_| StructureError::HeaderParseFailed)
3310 })
3311 .transpose()?;
3312 Ok(Self {
3313 x_has_more,
3314 x_total_count,
3315 })
3316 }
3317}
3318
3319pub struct CommitStatusListHeaders {
3320 pub x_total_count: Option<i64>,
3321}
3322
3323impl TryFrom<&reqwest::header::HeaderMap> for CommitStatusListHeaders {
3324 type Error = StructureError;
3325
3326 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3327 let x_total_count = map
3328 .get("x-total-count")
3329 .map(|s| -> Result<_, _> {
3330 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3331 s.parse::<i64>()
3332 .map_err(|_| StructureError::HeaderParseFailed)
3333 })
3334 .transpose()?;
3335 Ok(Self { x_total_count })
3336 }
3337}
3338
3339pub struct CronListHeaders {
3340 pub x_total_count: Option<i64>,
3341}
3342
3343impl TryFrom<&reqwest::header::HeaderMap> for CronListHeaders {
3344 type Error = StructureError;
3345
3346 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3347 let x_total_count = map
3348 .get("x-total-count")
3349 .map(|s| -> Result<_, _> {
3350 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3351 s.parse::<i64>()
3352 .map_err(|_| StructureError::HeaderParseFailed)
3353 })
3354 .transpose()?;
3355 Ok(Self { x_total_count })
3356 }
3357}
3358
3359pub struct DeployKeyListHeaders {
3360 pub x_total_count: Option<i64>,
3361}
3362
3363impl TryFrom<&reqwest::header::HeaderMap> for DeployKeyListHeaders {
3364 type Error = StructureError;
3365
3366 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3367 let x_total_count = map
3368 .get("x-total-count")
3369 .map(|s| -> Result<_, _> {
3370 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3371 s.parse::<i64>()
3372 .map_err(|_| StructureError::HeaderParseFailed)
3373 })
3374 .transpose()?;
3375 Ok(Self { x_total_count })
3376 }
3377}
3378
3379pub struct GpgKeyListHeaders {
3380 pub x_total_count: Option<i64>,
3381}
3382
3383impl TryFrom<&reqwest::header::HeaderMap> for GpgKeyListHeaders {
3384 type Error = StructureError;
3385
3386 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3387 let x_total_count = map
3388 .get("x-total-count")
3389 .map(|s| -> Result<_, _> {
3390 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3391 s.parse::<i64>()
3392 .map_err(|_| StructureError::HeaderParseFailed)
3393 })
3394 .transpose()?;
3395 Ok(Self { x_total_count })
3396 }
3397}
3398
3399pub struct GitHookListHeaders {
3400 pub x_total_count: Option<i64>,
3401}
3402
3403impl TryFrom<&reqwest::header::HeaderMap> for GitHookListHeaders {
3404 type Error = StructureError;
3405
3406 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3407 let x_total_count = map
3408 .get("x-total-count")
3409 .map(|s| -> Result<_, _> {
3410 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3411 s.parse::<i64>()
3412 .map_err(|_| StructureError::HeaderParseFailed)
3413 })
3414 .transpose()?;
3415 Ok(Self { x_total_count })
3416 }
3417}
3418
3419pub struct HookListHeaders {
3420 pub x_total_count: Option<i64>,
3421}
3422
3423impl TryFrom<&reqwest::header::HeaderMap> for HookListHeaders {
3424 type Error = StructureError;
3425
3426 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3427 let x_total_count = map
3428 .get("x-total-count")
3429 .map(|s| -> Result<_, _> {
3430 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3431 s.parse::<i64>()
3432 .map_err(|_| StructureError::HeaderParseFailed)
3433 })
3434 .transpose()?;
3435 Ok(Self { x_total_count })
3436 }
3437}
3438
3439pub struct IssueListHeaders {
3440 pub x_total_count: Option<i64>,
3441}
3442
3443impl TryFrom<&reqwest::header::HeaderMap> for IssueListHeaders {
3444 type Error = StructureError;
3445
3446 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3447 let x_total_count = map
3448 .get("x-total-count")
3449 .map(|s| -> Result<_, _> {
3450 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3451 s.parse::<i64>()
3452 .map_err(|_| StructureError::HeaderParseFailed)
3453 })
3454 .transpose()?;
3455 Ok(Self { x_total_count })
3456 }
3457}
3458
3459pub struct LabelListHeaders {
3460 pub x_total_count: Option<i64>,
3461}
3462
3463impl TryFrom<&reqwest::header::HeaderMap> for LabelListHeaders {
3464 type Error = StructureError;
3465
3466 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3467 let x_total_count = map
3468 .get("x-total-count")
3469 .map(|s| -> Result<_, _> {
3470 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3471 s.parse::<i64>()
3472 .map_err(|_| StructureError::HeaderParseFailed)
3473 })
3474 .transpose()?;
3475 Ok(Self { x_total_count })
3476 }
3477}
3478
3479pub struct MilestoneListHeaders {
3480 pub x_total_count: Option<i64>,
3481}
3482
3483impl TryFrom<&reqwest::header::HeaderMap> for MilestoneListHeaders {
3484 type Error = StructureError;
3485
3486 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3487 let x_total_count = map
3488 .get("x-total-count")
3489 .map(|s| -> Result<_, _> {
3490 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3491 s.parse::<i64>()
3492 .map_err(|_| StructureError::HeaderParseFailed)
3493 })
3494 .transpose()?;
3495 Ok(Self { x_total_count })
3496 }
3497}
3498
3499pub struct NotificationThreadListHeaders {
3500 pub x_total_count: Option<i64>,
3501}
3502
3503impl TryFrom<&reqwest::header::HeaderMap> for NotificationThreadListHeaders {
3504 type Error = StructureError;
3505
3506 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3507 let x_total_count = map
3508 .get("x-total-count")
3509 .map(|s| -> Result<_, _> {
3510 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3511 s.parse::<i64>()
3512 .map_err(|_| StructureError::HeaderParseFailed)
3513 })
3514 .transpose()?;
3515 Ok(Self { x_total_count })
3516 }
3517}
3518
3519pub struct OAuth2ApplicationListHeaders {
3520 pub x_total_count: Option<i64>,
3521}
3522
3523impl TryFrom<&reqwest::header::HeaderMap> for OAuth2ApplicationListHeaders {
3524 type Error = StructureError;
3525
3526 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3527 let x_total_count = map
3528 .get("x-total-count")
3529 .map(|s| -> Result<_, _> {
3530 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3531 s.parse::<i64>()
3532 .map_err(|_| StructureError::HeaderParseFailed)
3533 })
3534 .transpose()?;
3535 Ok(Self { x_total_count })
3536 }
3537}
3538
3539pub struct OrganizationListHeaders {
3540 pub x_total_count: Option<i64>,
3541}
3542
3543impl TryFrom<&reqwest::header::HeaderMap> for OrganizationListHeaders {
3544 type Error = StructureError;
3545
3546 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3547 let x_total_count = map
3548 .get("x-total-count")
3549 .map(|s| -> Result<_, _> {
3550 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3551 s.parse::<i64>()
3552 .map_err(|_| StructureError::HeaderParseFailed)
3553 })
3554 .transpose()?;
3555 Ok(Self { x_total_count })
3556 }
3557}
3558
3559pub struct PackageFileListHeaders {
3560 pub x_total_count: Option<i64>,
3561}
3562
3563impl TryFrom<&reqwest::header::HeaderMap> for PackageFileListHeaders {
3564 type Error = StructureError;
3565
3566 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3567 let x_total_count = map
3568 .get("x-total-count")
3569 .map(|s| -> Result<_, _> {
3570 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3571 s.parse::<i64>()
3572 .map_err(|_| StructureError::HeaderParseFailed)
3573 })
3574 .transpose()?;
3575 Ok(Self { x_total_count })
3576 }
3577}
3578
3579pub struct PackageListHeaders {
3580 pub x_total_count: Option<i64>,
3581}
3582
3583impl TryFrom<&reqwest::header::HeaderMap> for PackageListHeaders {
3584 type Error = StructureError;
3585
3586 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3587 let x_total_count = map
3588 .get("x-total-count")
3589 .map(|s| -> Result<_, _> {
3590 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3591 s.parse::<i64>()
3592 .map_err(|_| StructureError::HeaderParseFailed)
3593 })
3594 .transpose()?;
3595 Ok(Self { x_total_count })
3596 }
3597}
3598
3599pub struct PublicKeyListHeaders {
3600 pub x_total_count: Option<i64>,
3601}
3602
3603impl TryFrom<&reqwest::header::HeaderMap> for PublicKeyListHeaders {
3604 type Error = StructureError;
3605
3606 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3607 let x_total_count = map
3608 .get("x-total-count")
3609 .map(|s| -> Result<_, _> {
3610 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3611 s.parse::<i64>()
3612 .map_err(|_| StructureError::HeaderParseFailed)
3613 })
3614 .transpose()?;
3615 Ok(Self { x_total_count })
3616 }
3617}
3618
3619pub struct PullRequestListHeaders {
3620 pub x_total_count: Option<i64>,
3621}
3622
3623impl TryFrom<&reqwest::header::HeaderMap> for PullRequestListHeaders {
3624 type Error = StructureError;
3625
3626 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3627 let x_total_count = map
3628 .get("x-total-count")
3629 .map(|s| -> Result<_, _> {
3630 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3631 s.parse::<i64>()
3632 .map_err(|_| StructureError::HeaderParseFailed)
3633 })
3634 .transpose()?;
3635 Ok(Self { x_total_count })
3636 }
3637}
3638
3639pub struct PullReviewListHeaders {
3640 pub x_total_count: Option<i64>,
3641}
3642
3643impl TryFrom<&reqwest::header::HeaderMap> for PullReviewListHeaders {
3644 type Error = StructureError;
3645
3646 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3647 let x_total_count = map
3648 .get("x-total-count")
3649 .map(|s| -> Result<_, _> {
3650 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3651 s.parse::<i64>()
3652 .map_err(|_| StructureError::HeaderParseFailed)
3653 })
3654 .transpose()?;
3655 Ok(Self { x_total_count })
3656 }
3657}
3658
3659pub struct PushMirrorListHeaders {
3660 pub x_total_count: Option<i64>,
3661}
3662
3663impl TryFrom<&reqwest::header::HeaderMap> for PushMirrorListHeaders {
3664 type Error = StructureError;
3665
3666 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3667 let x_total_count = map
3668 .get("x-total-count")
3669 .map(|s| -> Result<_, _> {
3670 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3671 s.parse::<i64>()
3672 .map_err(|_| StructureError::HeaderParseFailed)
3673 })
3674 .transpose()?;
3675 Ok(Self { x_total_count })
3676 }
3677}
3678
3679pub struct QuotaGroupListHeaders {
3680 pub x_total_count: Option<i64>,
3681}
3682
3683impl TryFrom<&reqwest::header::HeaderMap> for QuotaGroupListHeaders {
3684 type Error = StructureError;
3685
3686 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3687 let x_total_count = map
3688 .get("x-total-count")
3689 .map(|s| -> Result<_, _> {
3690 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3691 s.parse::<i64>()
3692 .map_err(|_| StructureError::HeaderParseFailed)
3693 })
3694 .transpose()?;
3695 Ok(Self { x_total_count })
3696 }
3697}
3698
3699pub struct QuotaRuleInfoListHeaders {
3700 pub x_total_count: Option<i64>,
3701}
3702
3703impl TryFrom<&reqwest::header::HeaderMap> for QuotaRuleInfoListHeaders {
3704 type Error = StructureError;
3705
3706 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3707 let x_total_count = map
3708 .get("x-total-count")
3709 .map(|s| -> Result<_, _> {
3710 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3711 s.parse::<i64>()
3712 .map_err(|_| StructureError::HeaderParseFailed)
3713 })
3714 .transpose()?;
3715 Ok(Self { x_total_count })
3716 }
3717}
3718
3719pub struct QuotaUsedArtifactListHeaders {
3720 pub x_total_count: Option<i64>,
3721}
3722
3723impl TryFrom<&reqwest::header::HeaderMap> for QuotaUsedArtifactListHeaders {
3724 type Error = StructureError;
3725
3726 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3727 let x_total_count = map
3728 .get("x-total-count")
3729 .map(|s| -> Result<_, _> {
3730 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3731 s.parse::<i64>()
3732 .map_err(|_| StructureError::HeaderParseFailed)
3733 })
3734 .transpose()?;
3735 Ok(Self { x_total_count })
3736 }
3737}
3738
3739pub struct QuotaUsedAttachmentListHeaders {
3740 pub x_total_count: Option<i64>,
3741}
3742
3743impl TryFrom<&reqwest::header::HeaderMap> for QuotaUsedAttachmentListHeaders {
3744 type Error = StructureError;
3745
3746 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3747 let x_total_count = map
3748 .get("x-total-count")
3749 .map(|s| -> Result<_, _> {
3750 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3751 s.parse::<i64>()
3752 .map_err(|_| StructureError::HeaderParseFailed)
3753 })
3754 .transpose()?;
3755 Ok(Self { x_total_count })
3756 }
3757}
3758
3759pub struct QuotaUsedPackageListHeaders {
3760 pub x_total_count: Option<i64>,
3761}
3762
3763impl TryFrom<&reqwest::header::HeaderMap> for QuotaUsedPackageListHeaders {
3764 type Error = StructureError;
3765
3766 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3767 let x_total_count = map
3768 .get("x-total-count")
3769 .map(|s| -> Result<_, _> {
3770 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3771 s.parse::<i64>()
3772 .map_err(|_| StructureError::HeaderParseFailed)
3773 })
3774 .transpose()?;
3775 Ok(Self { x_total_count })
3776 }
3777}
3778
3779pub struct ReactionListHeaders {
3780 pub x_total_count: Option<i64>,
3781}
3782
3783impl TryFrom<&reqwest::header::HeaderMap> for ReactionListHeaders {
3784 type Error = StructureError;
3785
3786 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3787 let x_total_count = map
3788 .get("x-total-count")
3789 .map(|s| -> Result<_, _> {
3790 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3791 s.parse::<i64>()
3792 .map_err(|_| StructureError::HeaderParseFailed)
3793 })
3794 .transpose()?;
3795 Ok(Self { x_total_count })
3796 }
3797}
3798
3799pub struct RegistrationTokenHeaders {
3800 pub token: Option<String>,
3801}
3802
3803impl TryFrom<&reqwest::header::HeaderMap> for RegistrationTokenHeaders {
3804 type Error = StructureError;
3805
3806 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3807 let token = map
3808 .get("token")
3809 .map(|s| -> Result<_, _> {
3810 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3811 Ok(s.to_string())
3812 })
3813 .transpose()?;
3814 Ok(Self { token })
3815 }
3816}
3817
3818pub struct ReleaseListHeaders {
3819 pub x_total_count: Option<i64>,
3820}
3821
3822impl TryFrom<&reqwest::header::HeaderMap> for ReleaseListHeaders {
3823 type Error = StructureError;
3824
3825 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3826 let x_total_count = map
3827 .get("x-total-count")
3828 .map(|s| -> Result<_, _> {
3829 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3830 s.parse::<i64>()
3831 .map_err(|_| StructureError::HeaderParseFailed)
3832 })
3833 .transpose()?;
3834 Ok(Self { x_total_count })
3835 }
3836}
3837
3838pub struct RepositoryListHeaders {
3839 pub x_total_count: Option<i64>,
3840}
3841
3842impl TryFrom<&reqwest::header::HeaderMap> for RepositoryListHeaders {
3843 type Error = StructureError;
3844
3845 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3846 let x_total_count = map
3847 .get("x-total-count")
3848 .map(|s| -> Result<_, _> {
3849 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3850 s.parse::<i64>()
3851 .map_err(|_| StructureError::HeaderParseFailed)
3852 })
3853 .transpose()?;
3854 Ok(Self { x_total_count })
3855 }
3856}
3857
3858pub struct SecretListHeaders {
3859 pub x_total_count: Option<i64>,
3860}
3861
3862impl TryFrom<&reqwest::header::HeaderMap> for SecretListHeaders {
3863 type Error = StructureError;
3864
3865 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3866 let x_total_count = map
3867 .get("x-total-count")
3868 .map(|s| -> Result<_, _> {
3869 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3870 s.parse::<i64>()
3871 .map_err(|_| StructureError::HeaderParseFailed)
3872 })
3873 .transpose()?;
3874 Ok(Self { x_total_count })
3875 }
3876}
3877
3878pub struct StopWatchListHeaders {
3879 pub x_total_count: Option<i64>,
3880}
3881
3882impl TryFrom<&reqwest::header::HeaderMap> for StopWatchListHeaders {
3883 type Error = StructureError;
3884
3885 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3886 let x_total_count = map
3887 .get("x-total-count")
3888 .map(|s| -> Result<_, _> {
3889 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3890 s.parse::<i64>()
3891 .map_err(|_| StructureError::HeaderParseFailed)
3892 })
3893 .transpose()?;
3894 Ok(Self { x_total_count })
3895 }
3896}
3897
3898pub struct TagListHeaders {
3899 pub x_total_count: Option<i64>,
3900}
3901
3902impl TryFrom<&reqwest::header::HeaderMap> for TagListHeaders {
3903 type Error = StructureError;
3904
3905 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3906 let x_total_count = map
3907 .get("x-total-count")
3908 .map(|s| -> Result<_, _> {
3909 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3910 s.parse::<i64>()
3911 .map_err(|_| StructureError::HeaderParseFailed)
3912 })
3913 .transpose()?;
3914 Ok(Self { x_total_count })
3915 }
3916}
3917
3918pub struct TeamListHeaders {
3919 pub x_total_count: Option<i64>,
3920}
3921
3922impl TryFrom<&reqwest::header::HeaderMap> for TeamListHeaders {
3923 type Error = StructureError;
3924
3925 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3926 let x_total_count = map
3927 .get("x-total-count")
3928 .map(|s| -> Result<_, _> {
3929 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3930 s.parse::<i64>()
3931 .map_err(|_| StructureError::HeaderParseFailed)
3932 })
3933 .transpose()?;
3934 Ok(Self { x_total_count })
3935 }
3936}
3937
3938pub struct TimelineListHeaders {
3939 pub x_total_count: Option<i64>,
3940}
3941
3942impl TryFrom<&reqwest::header::HeaderMap> for TimelineListHeaders {
3943 type Error = StructureError;
3944
3945 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3946 let x_total_count = map
3947 .get("x-total-count")
3948 .map(|s| -> Result<_, _> {
3949 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3950 s.parse::<i64>()
3951 .map_err(|_| StructureError::HeaderParseFailed)
3952 })
3953 .transpose()?;
3954 Ok(Self { x_total_count })
3955 }
3956}
3957
3958pub struct TrackedTimeListHeaders {
3959 pub x_total_count: Option<i64>,
3960}
3961
3962impl TryFrom<&reqwest::header::HeaderMap> for TrackedTimeListHeaders {
3963 type Error = StructureError;
3964
3965 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3966 let x_total_count = map
3967 .get("x-total-count")
3968 .map(|s| -> Result<_, _> {
3969 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3970 s.parse::<i64>()
3971 .map_err(|_| StructureError::HeaderParseFailed)
3972 })
3973 .transpose()?;
3974 Ok(Self { x_total_count })
3975 }
3976}
3977
3978pub struct UserListHeaders {
3979 pub x_total_count: Option<i64>,
3980}
3981
3982impl TryFrom<&reqwest::header::HeaderMap> for UserListHeaders {
3983 type Error = StructureError;
3984
3985 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
3986 let x_total_count = map
3987 .get("x-total-count")
3988 .map(|s| -> Result<_, _> {
3989 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
3990 s.parse::<i64>()
3991 .map_err(|_| StructureError::HeaderParseFailed)
3992 })
3993 .transpose()?;
3994 Ok(Self { x_total_count })
3995 }
3996}
3997
3998pub struct VariableListHeaders {
3999 pub x_total_count: Option<i64>,
4000}
4001
4002impl TryFrom<&reqwest::header::HeaderMap> for VariableListHeaders {
4003 type Error = StructureError;
4004
4005 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
4006 let x_total_count = map
4007 .get("x-total-count")
4008 .map(|s| -> Result<_, _> {
4009 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
4010 s.parse::<i64>()
4011 .map_err(|_| StructureError::HeaderParseFailed)
4012 })
4013 .transpose()?;
4014 Ok(Self { x_total_count })
4015 }
4016}
4017
4018pub struct WikiCommitListHeaders {
4019 pub x_total_count: Option<i64>,
4020}
4021
4022impl TryFrom<&reqwest::header::HeaderMap> for WikiCommitListHeaders {
4023 type Error = StructureError;
4024
4025 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
4026 let x_total_count = map
4027 .get("x-total-count")
4028 .map(|s| -> Result<_, _> {
4029 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
4030 s.parse::<i64>()
4031 .map_err(|_| StructureError::HeaderParseFailed)
4032 })
4033 .transpose()?;
4034 Ok(Self { x_total_count })
4035 }
4036}
4037
4038pub struct WikiPageListHeaders {
4039 pub x_total_count: Option<i64>,
4040}
4041
4042impl TryFrom<&reqwest::header::HeaderMap> for WikiPageListHeaders {
4043 type Error = StructureError;
4044
4045 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
4046 let x_total_count = map
4047 .get("x-total-count")
4048 .map(|s| -> Result<_, _> {
4049 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
4050 s.parse::<i64>()
4051 .map_err(|_| StructureError::HeaderParseFailed)
4052 })
4053 .transpose()?;
4054 Ok(Self { x_total_count })
4055 }
4056}
4057
4058pub struct QuotaExceededHeaders {
4059 pub message: Option<String>,
4060 pub user_id: Option<i64>,
4061 pub username: Option<String>,
4062}
4063
4064impl TryFrom<&reqwest::header::HeaderMap> for QuotaExceededHeaders {
4065 type Error = StructureError;
4066
4067 fn try_from(map: &reqwest::header::HeaderMap) -> Result<Self, Self::Error> {
4068 let message = map
4069 .get("message")
4070 .map(|s| -> Result<_, _> {
4071 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
4072 Ok(s.to_string())
4073 })
4074 .transpose()?;
4075 let user_id = map
4076 .get("user_id")
4077 .map(|s| -> Result<_, _> {
4078 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
4079 s.parse::<i64>()
4080 .map_err(|_| StructureError::HeaderParseFailed)
4081 })
4082 .transpose()?;
4083 let username = map
4084 .get("username")
4085 .map(|s| -> Result<_, _> {
4086 let s = s.to_str().map_err(|_| StructureError::HeaderNotAscii)?;
4087 Ok(s.to_string())
4088 })
4089 .transpose()?;
4090 Ok(Self {
4091 message,
4092 user_id,
4093 username,
4094 })
4095 }
4096}
4097
4098#[derive(Debug, Clone, PartialEq, Default)]
4099pub struct AdminCronListQuery {
4100 pub page: Option<u32>,
4102 pub limit: Option<u32>,
4104}
4105
4106impl std::fmt::Display for AdminCronListQuery {
4107 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4108 if let Some(page) = &self.page {
4109 write!(f, "page={page}&")?;
4110 }
4111 if let Some(limit) = &self.limit {
4112 write!(f, "limit={limit}&")?;
4113 }
4114
4115 Ok(())
4116 }
4117}
4118
4119#[derive(Debug, Clone, PartialEq, Default)]
4120pub struct AdminGetAllEmailsQuery {
4121 pub page: Option<u32>,
4123 pub limit: Option<u32>,
4125}
4126
4127impl std::fmt::Display for AdminGetAllEmailsQuery {
4128 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4129 if let Some(page) = &self.page {
4130 write!(f, "page={page}&")?;
4131 }
4132 if let Some(limit) = &self.limit {
4133 write!(f, "limit={limit}&")?;
4134 }
4135
4136 Ok(())
4137 }
4138}
4139
4140#[derive(Debug, Clone, PartialEq, Default)]
4141pub struct AdminSearchEmailsQuery {
4142 pub q: Option<String>,
4144 pub page: Option<u32>,
4146 pub limit: Option<u32>,
4148}
4149
4150impl std::fmt::Display for AdminSearchEmailsQuery {
4151 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4152 if let Some(q) = &self.q {
4153 write!(f, "q={q}&")?;
4154 }
4155 if let Some(page) = &self.page {
4156 write!(f, "page={page}&")?;
4157 }
4158 if let Some(limit) = &self.limit {
4159 write!(f, "limit={limit}&")?;
4160 }
4161
4162 Ok(())
4163 }
4164}
4165
4166#[derive(Debug, Clone, PartialEq, Default)]
4167pub struct AdminListHooksQuery {
4168 pub page: Option<u32>,
4170 pub limit: Option<u32>,
4172}
4173
4174impl std::fmt::Display for AdminListHooksQuery {
4175 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4176 if let Some(page) = &self.page {
4177 write!(f, "page={page}&")?;
4178 }
4179 if let Some(limit) = &self.limit {
4180 write!(f, "limit={limit}&")?;
4181 }
4182
4183 Ok(())
4184 }
4185}
4186
4187#[derive(Debug, Clone, PartialEq, Default)]
4188pub struct AdminGetAllOrgsQuery {
4189 pub page: Option<u32>,
4191 pub limit: Option<u32>,
4193}
4194
4195impl std::fmt::Display for AdminGetAllOrgsQuery {
4196 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4197 if let Some(page) = &self.page {
4198 write!(f, "page={page}&")?;
4199 }
4200 if let Some(limit) = &self.limit {
4201 write!(f, "limit={limit}&")?;
4202 }
4203
4204 Ok(())
4205 }
4206}
4207
4208#[derive(Debug, Clone, PartialEq, Default)]
4209pub struct AdminUnadoptedListQuery {
4210 pub page: Option<u32>,
4212 pub limit: Option<u32>,
4214 pub pattern: Option<String>,
4216}
4217
4218impl std::fmt::Display for AdminUnadoptedListQuery {
4219 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4220 if let Some(page) = &self.page {
4221 write!(f, "page={page}&")?;
4222 }
4223 if let Some(limit) = &self.limit {
4224 write!(f, "limit={limit}&")?;
4225 }
4226 if let Some(pattern) = &self.pattern {
4227 write!(f, "pattern={pattern}&")?;
4228 }
4229
4230 Ok(())
4231 }
4232}
4233
4234#[derive(Debug, Clone, PartialEq, Default)]
4235pub struct AdminSearchUsersQuery {
4236 pub source_id: Option<u64>,
4238 pub login_name: Option<String>,
4240 pub sort: Option<AdminSearchUsersQuerySort>,
4242 pub page: Option<u32>,
4244 pub limit: Option<u32>,
4246}
4247
4248impl std::fmt::Display for AdminSearchUsersQuery {
4249 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4250 if let Some(source_id) = &self.source_id {
4251 write!(f, "source_id={source_id}&")?;
4252 }
4253 if let Some(login_name) = &self.login_name {
4254 write!(f, "login_name={login_name}&")?;
4255 }
4256 if let Some(sort) = &self.sort {
4257 write!(f, "sort={}&", sort.as_str())?;
4258 }
4259 if let Some(page) = &self.page {
4260 write!(f, "page={page}&")?;
4261 }
4262 if let Some(limit) = &self.limit {
4263 write!(f, "limit={limit}&")?;
4264 }
4265
4266 Ok(())
4267 }
4268}
4269
4270#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
4271pub enum AdminSearchUsersQuerySort {
4272 #[serde(rename = "oldest")]
4273 Oldest,
4274 #[serde(rename = "newest")]
4275 Newest,
4276 #[serde(rename = "alphabetically")]
4277 Alphabetically,
4278 #[serde(rename = "reversealphabetically")]
4279 Reversealphabetically,
4280 #[serde(rename = "recentupdate")]
4281 Recentupdate,
4282 #[serde(rename = "leastupdate")]
4283 Leastupdate,
4284}
4285
4286impl AdminSearchUsersQuerySort {
4287 fn as_str(&self) -> &'static str {
4288 match self {
4289 AdminSearchUsersQuerySort::Oldest => "oldest",
4290 AdminSearchUsersQuerySort::Newest => "newest",
4291 AdminSearchUsersQuerySort::Alphabetically => "alphabetically",
4292 AdminSearchUsersQuerySort::Reversealphabetically => "reversealphabetically",
4293 AdminSearchUsersQuerySort::Recentupdate => "recentupdate",
4294 AdminSearchUsersQuerySort::Leastupdate => "leastupdate",
4295 }
4296 }
4297}
4298#[derive(Debug, Clone, PartialEq, Default)]
4299pub struct AdminDeleteUserQuery {
4300 pub purge: Option<bool>,
4302}
4303
4304impl std::fmt::Display for AdminDeleteUserQuery {
4305 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4306 if let Some(purge) = &self.purge {
4307 write!(f, "purge={purge}&")?;
4308 }
4309
4310 Ok(())
4311 }
4312}
4313
4314#[derive(Debug, Clone, PartialEq, Default)]
4315pub struct NotifyGetListQuery {
4316 pub all: Option<bool>,
4318 pub status_types: Option<Vec<String>>,
4320 pub subject_type: Option<Vec<NotifyGetListQuerySubjectType>>,
4322 pub since: Option<time::OffsetDateTime>,
4324 pub before: Option<time::OffsetDateTime>,
4326 pub page: Option<u32>,
4328 pub limit: Option<u32>,
4330}
4331
4332impl std::fmt::Display for NotifyGetListQuery {
4333 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4334 if let Some(all) = &self.all {
4335 write!(f, "all={all}&")?;
4336 }
4337 if let Some(status_types) = &self.status_types {
4338 if !status_types.is_empty() {
4339 for item in status_types {
4340 write!(f, "status-types=")?;
4341 write!(f, "{item}")?;
4342 write!(f, "&")?;
4343 }
4344 }
4345 }
4346 if let Some(subject_type) = &self.subject_type {
4347 if !subject_type.is_empty() {
4348 for item in subject_type {
4349 write!(f, "subject-type=")?;
4350 write!(f, "{}", item.as_str())?;
4351 write!(f, "&")?;
4352 }
4353 }
4354 }
4355 if let Some(since) = &self.since {
4356 write!(
4357 f,
4358 "since={field_name}&",
4359 field_name = since
4360 .format(&time::format_description::well_known::Rfc3339)
4361 .unwrap()
4362 )?;
4363 }
4364 if let Some(before) = &self.before {
4365 write!(
4366 f,
4367 "before={field_name}&",
4368 field_name = before
4369 .format(&time::format_description::well_known::Rfc3339)
4370 .unwrap()
4371 )?;
4372 }
4373 if let Some(page) = &self.page {
4374 write!(f, "page={page}&")?;
4375 }
4376 if let Some(limit) = &self.limit {
4377 write!(f, "limit={limit}&")?;
4378 }
4379
4380 Ok(())
4381 }
4382}
4383
4384#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
4385pub enum NotifyGetListQuerySubjectType {
4386 #[serde(rename = "issue")]
4387 Issue,
4388 #[serde(rename = "pull")]
4389 Pull,
4390 #[serde(rename = "commit")]
4391 Commit,
4392 #[serde(rename = "repository")]
4393 Repository,
4394}
4395
4396impl NotifyGetListQuerySubjectType {
4397 fn as_str(&self) -> &'static str {
4398 match self {
4399 NotifyGetListQuerySubjectType::Issue => "issue",
4400 NotifyGetListQuerySubjectType::Pull => "pull",
4401 NotifyGetListQuerySubjectType::Commit => "commit",
4402 NotifyGetListQuerySubjectType::Repository => "repository",
4403 }
4404 }
4405}
4406#[derive(Debug, Clone, PartialEq, Default)]
4407pub struct NotifyReadListQuery {
4408 pub last_read_at: Option<time::OffsetDateTime>,
4410 pub all: Option<String>,
4412 pub status_types: Option<Vec<String>>,
4414 pub to_status: Option<String>,
4416}
4417
4418impl std::fmt::Display for NotifyReadListQuery {
4419 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4420 if let Some(last_read_at) = &self.last_read_at {
4421 write!(
4422 f,
4423 "last_read_at={field_name}&",
4424 field_name = last_read_at
4425 .format(&time::format_description::well_known::Rfc3339)
4426 .unwrap()
4427 )?;
4428 }
4429 if let Some(all) = &self.all {
4430 write!(f, "all={all}&")?;
4431 }
4432 if let Some(status_types) = &self.status_types {
4433 if !status_types.is_empty() {
4434 for item in status_types {
4435 write!(f, "status-types=")?;
4436 write!(f, "{item}")?;
4437 write!(f, "&")?;
4438 }
4439 }
4440 }
4441 if let Some(to_status) = &self.to_status {
4442 write!(f, "to-status={to_status}&")?;
4443 }
4444
4445 Ok(())
4446 }
4447}
4448
4449#[derive(Debug, Clone, PartialEq, Default)]
4450pub struct NotifyReadThreadQuery {
4451 pub to_status: Option<String>,
4453}
4454
4455impl std::fmt::Display for NotifyReadThreadQuery {
4456 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4457 if let Some(to_status) = &self.to_status {
4458 write!(f, "to-status={to_status}&")?;
4459 }
4460
4461 Ok(())
4462 }
4463}
4464
4465#[derive(Debug, Clone, PartialEq, Default)]
4466pub struct OrgGetAllQuery {
4467 pub page: Option<u32>,
4469 pub limit: Option<u32>,
4471}
4472
4473impl std::fmt::Display for OrgGetAllQuery {
4474 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4475 if let Some(page) = &self.page {
4476 write!(f, "page={page}&")?;
4477 }
4478 if let Some(limit) = &self.limit {
4479 write!(f, "limit={limit}&")?;
4480 }
4481
4482 Ok(())
4483 }
4484}
4485
4486#[derive(Debug, Clone, PartialEq, Default)]
4487pub struct OrgListActionsSecretsQuery {
4488 pub page: Option<u32>,
4490 pub limit: Option<u32>,
4492}
4493
4494impl std::fmt::Display for OrgListActionsSecretsQuery {
4495 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4496 if let Some(page) = &self.page {
4497 write!(f, "page={page}&")?;
4498 }
4499 if let Some(limit) = &self.limit {
4500 write!(f, "limit={limit}&")?;
4501 }
4502
4503 Ok(())
4504 }
4505}
4506
4507#[derive(Debug, Clone, PartialEq, Default)]
4508pub struct GetOrgVariablesListQuery {
4509 pub page: Option<u32>,
4511 pub limit: Option<u32>,
4513}
4514
4515impl std::fmt::Display for GetOrgVariablesListQuery {
4516 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4517 if let Some(page) = &self.page {
4518 write!(f, "page={page}&")?;
4519 }
4520 if let Some(limit) = &self.limit {
4521 write!(f, "limit={limit}&")?;
4522 }
4523
4524 Ok(())
4525 }
4526}
4527
4528#[derive(Debug, Clone, PartialEq, Default)]
4529pub struct OrgListActivityFeedsQuery {
4530 pub date: Option<time::Date>,
4532 pub page: Option<u32>,
4534 pub limit: Option<u32>,
4536}
4537
4538impl std::fmt::Display for OrgListActivityFeedsQuery {
4539 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4540 if let Some(date) = &self.date {
4541 write!(
4542 f,
4543 "date={field_name}&",
4544 field_name = date
4545 .format(&time::format_description::well_known::Rfc3339)
4546 .unwrap()
4547 )?;
4548 }
4549 if let Some(page) = &self.page {
4550 write!(f, "page={page}&")?;
4551 }
4552 if let Some(limit) = &self.limit {
4553 write!(f, "limit={limit}&")?;
4554 }
4555
4556 Ok(())
4557 }
4558}
4559
4560#[derive(Debug, Clone, PartialEq, Default)]
4561pub struct OrgListHooksQuery {
4562 pub page: Option<u32>,
4564 pub limit: Option<u32>,
4566}
4567
4568impl std::fmt::Display for OrgListHooksQuery {
4569 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4570 if let Some(page) = &self.page {
4571 write!(f, "page={page}&")?;
4572 }
4573 if let Some(limit) = &self.limit {
4574 write!(f, "limit={limit}&")?;
4575 }
4576
4577 Ok(())
4578 }
4579}
4580
4581#[derive(Debug, Clone, PartialEq, Default)]
4582pub struct OrgListLabelsQuery {
4583 pub page: Option<u32>,
4585 pub limit: Option<u32>,
4587}
4588
4589impl std::fmt::Display for OrgListLabelsQuery {
4590 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4591 if let Some(page) = &self.page {
4592 write!(f, "page={page}&")?;
4593 }
4594 if let Some(limit) = &self.limit {
4595 write!(f, "limit={limit}&")?;
4596 }
4597
4598 Ok(())
4599 }
4600}
4601
4602#[derive(Debug, Clone, PartialEq, Default)]
4603pub struct OrgListBlockedUsersQuery {
4604 pub page: Option<u32>,
4606 pub limit: Option<u32>,
4608}
4609
4610impl std::fmt::Display for OrgListBlockedUsersQuery {
4611 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4612 if let Some(page) = &self.page {
4613 write!(f, "page={page}&")?;
4614 }
4615 if let Some(limit) = &self.limit {
4616 write!(f, "limit={limit}&")?;
4617 }
4618
4619 Ok(())
4620 }
4621}
4622
4623#[derive(Debug, Clone, PartialEq, Default)]
4624pub struct OrgListMembersQuery {
4625 pub page: Option<u32>,
4627 pub limit: Option<u32>,
4629}
4630
4631impl std::fmt::Display for OrgListMembersQuery {
4632 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4633 if let Some(page) = &self.page {
4634 write!(f, "page={page}&")?;
4635 }
4636 if let Some(limit) = &self.limit {
4637 write!(f, "limit={limit}&")?;
4638 }
4639
4640 Ok(())
4641 }
4642}
4643
4644#[derive(Debug, Clone, PartialEq, Default)]
4645pub struct OrgListPublicMembersQuery {
4646 pub page: Option<u32>,
4648 pub limit: Option<u32>,
4650}
4651
4652impl std::fmt::Display for OrgListPublicMembersQuery {
4653 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4654 if let Some(page) = &self.page {
4655 write!(f, "page={page}&")?;
4656 }
4657 if let Some(limit) = &self.limit {
4658 write!(f, "limit={limit}&")?;
4659 }
4660
4661 Ok(())
4662 }
4663}
4664
4665#[derive(Debug, Clone, PartialEq, Default)]
4666pub struct OrgListQuotaArtifactsQuery {
4667 pub page: Option<u32>,
4669 pub limit: Option<u32>,
4671}
4672
4673impl std::fmt::Display for OrgListQuotaArtifactsQuery {
4674 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4675 if let Some(page) = &self.page {
4676 write!(f, "page={page}&")?;
4677 }
4678 if let Some(limit) = &self.limit {
4679 write!(f, "limit={limit}&")?;
4680 }
4681
4682 Ok(())
4683 }
4684}
4685
4686#[derive(Debug, Clone, PartialEq, Default)]
4687pub struct OrgListQuotaAttachmentsQuery {
4688 pub page: Option<u32>,
4690 pub limit: Option<u32>,
4692}
4693
4694impl std::fmt::Display for OrgListQuotaAttachmentsQuery {
4695 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4696 if let Some(page) = &self.page {
4697 write!(f, "page={page}&")?;
4698 }
4699 if let Some(limit) = &self.limit {
4700 write!(f, "limit={limit}&")?;
4701 }
4702
4703 Ok(())
4704 }
4705}
4706
4707#[derive(Debug, Clone, PartialEq, Default)]
4708pub struct OrgListQuotaPackagesQuery {
4709 pub page: Option<u32>,
4711 pub limit: Option<u32>,
4713}
4714
4715impl std::fmt::Display for OrgListQuotaPackagesQuery {
4716 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4717 if let Some(page) = &self.page {
4718 write!(f, "page={page}&")?;
4719 }
4720 if let Some(limit) = &self.limit {
4721 write!(f, "limit={limit}&")?;
4722 }
4723
4724 Ok(())
4725 }
4726}
4727
4728#[derive(Debug, Clone, PartialEq, Default)]
4729pub struct OrgListReposQuery {
4730 pub page: Option<u32>,
4732 pub limit: Option<u32>,
4734}
4735
4736impl std::fmt::Display for OrgListReposQuery {
4737 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4738 if let Some(page) = &self.page {
4739 write!(f, "page={page}&")?;
4740 }
4741 if let Some(limit) = &self.limit {
4742 write!(f, "limit={limit}&")?;
4743 }
4744
4745 Ok(())
4746 }
4747}
4748
4749#[derive(Debug, Clone, PartialEq, Default)]
4750pub struct OrgListTeamsQuery {
4751 pub page: Option<u32>,
4753 pub limit: Option<u32>,
4755}
4756
4757impl std::fmt::Display for OrgListTeamsQuery {
4758 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4759 if let Some(page) = &self.page {
4760 write!(f, "page={page}&")?;
4761 }
4762 if let Some(limit) = &self.limit {
4763 write!(f, "limit={limit}&")?;
4764 }
4765
4766 Ok(())
4767 }
4768}
4769
4770#[derive(Debug, Clone, PartialEq, Default)]
4771pub struct TeamSearchQuery {
4772 pub q: Option<String>,
4774 pub include_desc: Option<bool>,
4776 pub page: Option<u32>,
4778 pub limit: Option<u32>,
4780}
4781
4782impl std::fmt::Display for TeamSearchQuery {
4783 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4784 if let Some(q) = &self.q {
4785 write!(f, "q={q}&")?;
4786 }
4787 if let Some(include_desc) = &self.include_desc {
4788 write!(f, "include_desc={include_desc}&")?;
4789 }
4790 if let Some(page) = &self.page {
4791 write!(f, "page={page}&")?;
4792 }
4793 if let Some(limit) = &self.limit {
4794 write!(f, "limit={limit}&")?;
4795 }
4796
4797 Ok(())
4798 }
4799}
4800#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
4801pub struct TeamSearchResponse {
4802 pub data: Option<Vec<Team>>,
4803 pub ok: Option<bool>,
4804}
4805
4806#[derive(Debug, Clone, PartialEq, Default)]
4807pub struct ListPackagesQuery {
4808 pub page: Option<u32>,
4810 pub limit: Option<u32>,
4812 pub r#type: Option<ListPackagesQueryType>,
4814 pub q: Option<String>,
4816}
4817
4818impl std::fmt::Display for ListPackagesQuery {
4819 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4820 if let Some(page) = &self.page {
4821 write!(f, "page={page}&")?;
4822 }
4823 if let Some(limit) = &self.limit {
4824 write!(f, "limit={limit}&")?;
4825 }
4826 if let Some(r#type) = &self.r#type {
4827 write!(f, "type={}&", r#type.as_str())?;
4828 }
4829 if let Some(q) = &self.q {
4830 write!(f, "q={q}&")?;
4831 }
4832
4833 Ok(())
4834 }
4835}
4836
4837#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
4838pub enum ListPackagesQueryType {
4839 #[serde(rename = "alpine")]
4840 Alpine,
4841 #[serde(rename = "cargo")]
4842 Cargo,
4843 #[serde(rename = "chef")]
4844 Chef,
4845 #[serde(rename = "composer")]
4846 Composer,
4847 #[serde(rename = "conan")]
4848 Conan,
4849 #[serde(rename = "conda")]
4850 Conda,
4851 #[serde(rename = "container")]
4852 Container,
4853 #[serde(rename = "cran")]
4854 Cran,
4855 #[serde(rename = "debian")]
4856 Debian,
4857 #[serde(rename = "generic")]
4858 Generic,
4859 #[serde(rename = "go")]
4860 Go,
4861 #[serde(rename = "helm")]
4862 Helm,
4863 #[serde(rename = "maven")]
4864 Maven,
4865 #[serde(rename = "npm")]
4866 Npm,
4867 #[serde(rename = "nuget")]
4868 Nuget,
4869 #[serde(rename = "pub")]
4870 Pub,
4871 #[serde(rename = "pypi")]
4872 Pypi,
4873 #[serde(rename = "rpm")]
4874 Rpm,
4875 #[serde(rename = "rubygems")]
4876 Rubygems,
4877 #[serde(rename = "swift")]
4878 Swift,
4879 #[serde(rename = "vagrant")]
4880 Vagrant,
4881}
4882
4883impl ListPackagesQueryType {
4884 fn as_str(&self) -> &'static str {
4885 match self {
4886 ListPackagesQueryType::Alpine => "alpine",
4887 ListPackagesQueryType::Cargo => "cargo",
4888 ListPackagesQueryType::Chef => "chef",
4889 ListPackagesQueryType::Composer => "composer",
4890 ListPackagesQueryType::Conan => "conan",
4891 ListPackagesQueryType::Conda => "conda",
4892 ListPackagesQueryType::Container => "container",
4893 ListPackagesQueryType::Cran => "cran",
4894 ListPackagesQueryType::Debian => "debian",
4895 ListPackagesQueryType::Generic => "generic",
4896 ListPackagesQueryType::Go => "go",
4897 ListPackagesQueryType::Helm => "helm",
4898 ListPackagesQueryType::Maven => "maven",
4899 ListPackagesQueryType::Npm => "npm",
4900 ListPackagesQueryType::Nuget => "nuget",
4901 ListPackagesQueryType::Pub => "pub",
4902 ListPackagesQueryType::Pypi => "pypi",
4903 ListPackagesQueryType::Rpm => "rpm",
4904 ListPackagesQueryType::Rubygems => "rubygems",
4905 ListPackagesQueryType::Swift => "swift",
4906 ListPackagesQueryType::Vagrant => "vagrant",
4907 }
4908 }
4909}
4910#[derive(Debug, Clone, PartialEq, Default)]
4911pub struct IssueSearchIssuesQuery {
4912 pub state: Option<IssueSearchIssuesQueryState>,
4914 pub labels: Option<String>,
4916 pub milestones: Option<String>,
4918 pub q: Option<String>,
4920 pub priority_repo_id: Option<u64>,
4922 pub r#type: Option<IssueSearchIssuesQueryType>,
4924 pub since: Option<time::OffsetDateTime>,
4926 pub before: Option<time::OffsetDateTime>,
4928 pub assigned: Option<bool>,
4930 pub created: Option<bool>,
4932 pub mentioned: Option<bool>,
4934 pub review_requested: Option<bool>,
4936 pub reviewed: Option<bool>,
4938 pub owner: Option<String>,
4940 pub team: Option<String>,
4942 pub page: Option<u32>,
4944 pub limit: Option<u32>,
4946}
4947
4948impl std::fmt::Display for IssueSearchIssuesQuery {
4949 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4950 if let Some(state) = &self.state {
4951 write!(f, "state={}&", state.as_str())?;
4952 }
4953 if let Some(labels) = &self.labels {
4954 write!(f, "labels={labels}&")?;
4955 }
4956 if let Some(milestones) = &self.milestones {
4957 write!(f, "milestones={milestones}&")?;
4958 }
4959 if let Some(q) = &self.q {
4960 write!(f, "q={q}&")?;
4961 }
4962 if let Some(priority_repo_id) = &self.priority_repo_id {
4963 write!(f, "priority_repo_id={priority_repo_id}&")?;
4964 }
4965 if let Some(r#type) = &self.r#type {
4966 write!(f, "type={}&", r#type.as_str())?;
4967 }
4968 if let Some(since) = &self.since {
4969 write!(
4970 f,
4971 "since={field_name}&",
4972 field_name = since
4973 .format(&time::format_description::well_known::Rfc3339)
4974 .unwrap()
4975 )?;
4976 }
4977 if let Some(before) = &self.before {
4978 write!(
4979 f,
4980 "before={field_name}&",
4981 field_name = before
4982 .format(&time::format_description::well_known::Rfc3339)
4983 .unwrap()
4984 )?;
4985 }
4986 if let Some(assigned) = &self.assigned {
4987 write!(f, "assigned={assigned}&")?;
4988 }
4989 if let Some(created) = &self.created {
4990 write!(f, "created={created}&")?;
4991 }
4992 if let Some(mentioned) = &self.mentioned {
4993 write!(f, "mentioned={mentioned}&")?;
4994 }
4995 if let Some(review_requested) = &self.review_requested {
4996 write!(f, "review_requested={review_requested}&")?;
4997 }
4998 if let Some(reviewed) = &self.reviewed {
4999 write!(f, "reviewed={reviewed}&")?;
5000 }
5001 if let Some(owner) = &self.owner {
5002 write!(f, "owner={owner}&")?;
5003 }
5004 if let Some(team) = &self.team {
5005 write!(f, "team={team}&")?;
5006 }
5007 if let Some(page) = &self.page {
5008 write!(f, "page={page}&")?;
5009 }
5010 if let Some(limit) = &self.limit {
5011 write!(f, "limit={limit}&")?;
5012 }
5013
5014 Ok(())
5015 }
5016}
5017
5018#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
5019pub enum IssueSearchIssuesQueryState {
5020 #[serde(rename = "open")]
5021 Open,
5022 #[serde(rename = "closed")]
5023 Closed,
5024 #[serde(rename = "all")]
5025 All,
5026}
5027
5028impl IssueSearchIssuesQueryState {
5029 fn as_str(&self) -> &'static str {
5030 match self {
5031 IssueSearchIssuesQueryState::Open => "open",
5032 IssueSearchIssuesQueryState::Closed => "closed",
5033 IssueSearchIssuesQueryState::All => "all",
5034 }
5035 }
5036}
5037
5038#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
5039pub enum IssueSearchIssuesQueryType {
5040 #[serde(rename = "issues")]
5041 Issues,
5042 #[serde(rename = "pulls")]
5043 Pulls,
5044}
5045
5046impl IssueSearchIssuesQueryType {
5047 fn as_str(&self) -> &'static str {
5048 match self {
5049 IssueSearchIssuesQueryType::Issues => "issues",
5050 IssueSearchIssuesQueryType::Pulls => "pulls",
5051 }
5052 }
5053}
5054#[derive(Debug, Clone, PartialEq, Default)]
5055pub struct RepoSearchQuery {
5056 pub q: Option<String>,
5058 pub topic: Option<bool>,
5060 pub include_desc: Option<bool>,
5062 pub uid: Option<u64>,
5064 pub priority_owner_id: Option<u64>,
5066 pub team_id: Option<u64>,
5068 pub starred_by: Option<u64>,
5070 pub private: Option<bool>,
5072 pub is_private: Option<bool>,
5074 pub template: Option<bool>,
5076 pub archived: Option<bool>,
5078 pub mode: Option<String>,
5080 pub exclusive: Option<bool>,
5082 pub sort: Option<String>,
5084 pub order: Option<String>,
5086 pub page: Option<u32>,
5088 pub limit: Option<u32>,
5090}
5091
5092impl std::fmt::Display for RepoSearchQuery {
5093 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5094 if let Some(q) = &self.q {
5095 write!(f, "q={q}&")?;
5096 }
5097 if let Some(topic) = &self.topic {
5098 write!(f, "topic={topic}&")?;
5099 }
5100 if let Some(include_desc) = &self.include_desc {
5101 write!(f, "includeDesc={include_desc}&")?;
5102 }
5103 if let Some(uid) = &self.uid {
5104 write!(f, "uid={uid}&")?;
5105 }
5106 if let Some(priority_owner_id) = &self.priority_owner_id {
5107 write!(f, "priority_owner_id={priority_owner_id}&")?;
5108 }
5109 if let Some(team_id) = &self.team_id {
5110 write!(f, "team_id={team_id}&")?;
5111 }
5112 if let Some(starred_by) = &self.starred_by {
5113 write!(f, "starredBy={starred_by}&")?;
5114 }
5115 if let Some(private) = &self.private {
5116 write!(f, "private={private}&")?;
5117 }
5118 if let Some(is_private) = &self.is_private {
5119 write!(f, "is_private={is_private}&")?;
5120 }
5121 if let Some(template) = &self.template {
5122 write!(f, "template={template}&")?;
5123 }
5124 if let Some(archived) = &self.archived {
5125 write!(f, "archived={archived}&")?;
5126 }
5127 if let Some(mode) = &self.mode {
5128 write!(f, "mode={mode}&")?;
5129 }
5130 if let Some(exclusive) = &self.exclusive {
5131 write!(f, "exclusive={exclusive}&")?;
5132 }
5133 if let Some(sort) = &self.sort {
5134 write!(f, "sort={sort}&")?;
5135 }
5136 if let Some(order) = &self.order {
5137 write!(f, "order={order}&")?;
5138 }
5139 if let Some(page) = &self.page {
5140 write!(f, "page={page}&")?;
5141 }
5142 if let Some(limit) = &self.limit {
5143 write!(f, "limit={limit}&")?;
5144 }
5145
5146 Ok(())
5147 }
5148}
5149
5150#[derive(Debug, Clone, PartialEq, Default)]
5151pub struct RepoListActionsSecretsQuery {
5152 pub page: Option<u32>,
5154 pub limit: Option<u32>,
5156}
5157
5158impl std::fmt::Display for RepoListActionsSecretsQuery {
5159 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5160 if let Some(page) = &self.page {
5161 write!(f, "page={page}&")?;
5162 }
5163 if let Some(limit) = &self.limit {
5164 write!(f, "limit={limit}&")?;
5165 }
5166
5167 Ok(())
5168 }
5169}
5170
5171#[derive(Debug, Clone, PartialEq, Default)]
5172pub struct ListActionTasksQuery {
5173 pub page: Option<u32>,
5175 pub limit: Option<u32>,
5177}
5178
5179impl std::fmt::Display for ListActionTasksQuery {
5180 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5181 if let Some(page) = &self.page {
5182 write!(f, "page={page}&")?;
5183 }
5184 if let Some(limit) = &self.limit {
5185 write!(f, "limit={limit}&")?;
5186 }
5187
5188 Ok(())
5189 }
5190}
5191
5192#[derive(Debug, Clone, PartialEq, Default)]
5193pub struct GetRepoVariablesListQuery {
5194 pub page: Option<u32>,
5196 pub limit: Option<u32>,
5198}
5199
5200impl std::fmt::Display for GetRepoVariablesListQuery {
5201 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5202 if let Some(page) = &self.page {
5203 write!(f, "page={page}&")?;
5204 }
5205 if let Some(limit) = &self.limit {
5206 write!(f, "limit={limit}&")?;
5207 }
5208
5209 Ok(())
5210 }
5211}
5212
5213#[derive(Debug, Clone, PartialEq, Default)]
5214pub struct RepoListActivityFeedsQuery {
5215 pub date: Option<time::Date>,
5217 pub page: Option<u32>,
5219 pub limit: Option<u32>,
5221}
5222
5223impl std::fmt::Display for RepoListActivityFeedsQuery {
5224 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5225 if let Some(date) = &self.date {
5226 write!(
5227 f,
5228 "date={field_name}&",
5229 field_name = date
5230 .format(&time::format_description::well_known::Rfc3339)
5231 .unwrap()
5232 )?;
5233 }
5234 if let Some(page) = &self.page {
5235 write!(f, "page={page}&")?;
5236 }
5237 if let Some(limit) = &self.limit {
5238 write!(f, "limit={limit}&")?;
5239 }
5240
5241 Ok(())
5242 }
5243}
5244
5245#[derive(Debug, Clone, PartialEq, Default)]
5246pub struct RepoListBranchesQuery {
5247 pub page: Option<u32>,
5249 pub limit: Option<u32>,
5251}
5252
5253impl std::fmt::Display for RepoListBranchesQuery {
5254 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5255 if let Some(page) = &self.page {
5256 write!(f, "page={page}&")?;
5257 }
5258 if let Some(limit) = &self.limit {
5259 write!(f, "limit={limit}&")?;
5260 }
5261
5262 Ok(())
5263 }
5264}
5265
5266#[derive(Debug, Clone, PartialEq, Default)]
5267pub struct RepoListCollaboratorsQuery {
5268 pub page: Option<u32>,
5270 pub limit: Option<u32>,
5272}
5273
5274impl std::fmt::Display for RepoListCollaboratorsQuery {
5275 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5276 if let Some(page) = &self.page {
5277 write!(f, "page={page}&")?;
5278 }
5279 if let Some(limit) = &self.limit {
5280 write!(f, "limit={limit}&")?;
5281 }
5282
5283 Ok(())
5284 }
5285}
5286
5287#[derive(Debug, Clone, PartialEq, Default)]
5288pub struct RepoGetAllCommitsQuery {
5289 pub sha: Option<String>,
5291 pub path: Option<String>,
5293 pub stat: Option<bool>,
5295 pub verification: Option<bool>,
5297 pub files: Option<bool>,
5299 pub page: Option<u32>,
5301 pub limit: Option<u32>,
5303 pub not: Option<String>,
5305}
5306
5307impl std::fmt::Display for RepoGetAllCommitsQuery {
5308 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5309 if let Some(sha) = &self.sha {
5310 write!(f, "sha={sha}&")?;
5311 }
5312 if let Some(path) = &self.path {
5313 write!(f, "path={path}&")?;
5314 }
5315 if let Some(stat) = &self.stat {
5316 write!(f, "stat={stat}&")?;
5317 }
5318 if let Some(verification) = &self.verification {
5319 write!(f, "verification={verification}&")?;
5320 }
5321 if let Some(files) = &self.files {
5322 write!(f, "files={files}&")?;
5323 }
5324 if let Some(page) = &self.page {
5325 write!(f, "page={page}&")?;
5326 }
5327 if let Some(limit) = &self.limit {
5328 write!(f, "limit={limit}&")?;
5329 }
5330 if let Some(not) = &self.not {
5331 write!(f, "not={not}&")?;
5332 }
5333
5334 Ok(())
5335 }
5336}
5337
5338#[derive(Debug, Clone, PartialEq, Default)]
5339pub struct RepoGetCombinedStatusByRefQuery {
5340 pub page: Option<u32>,
5342 pub limit: Option<u32>,
5344}
5345
5346impl std::fmt::Display for RepoGetCombinedStatusByRefQuery {
5347 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5348 if let Some(page) = &self.page {
5349 write!(f, "page={page}&")?;
5350 }
5351 if let Some(limit) = &self.limit {
5352 write!(f, "limit={limit}&")?;
5353 }
5354
5355 Ok(())
5356 }
5357}
5358
5359#[derive(Debug, Clone, PartialEq, Default)]
5360pub struct RepoListStatusesByRefQuery {
5361 pub sort: Option<RepoListStatusesByRefQuerySort>,
5363 pub state: Option<RepoListStatusesByRefQueryState>,
5365 pub page: Option<u32>,
5367 pub limit: Option<u32>,
5369}
5370
5371impl std::fmt::Display for RepoListStatusesByRefQuery {
5372 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5373 if let Some(sort) = &self.sort {
5374 write!(f, "sort={}&", sort.as_str())?;
5375 }
5376 if let Some(state) = &self.state {
5377 write!(f, "state={}&", state.as_str())?;
5378 }
5379 if let Some(page) = &self.page {
5380 write!(f, "page={page}&")?;
5381 }
5382 if let Some(limit) = &self.limit {
5383 write!(f, "limit={limit}&")?;
5384 }
5385
5386 Ok(())
5387 }
5388}
5389
5390#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
5391pub enum RepoListStatusesByRefQuerySort {
5392 #[serde(rename = "oldest")]
5393 Oldest,
5394 #[serde(rename = "recentupdate")]
5395 Recentupdate,
5396 #[serde(rename = "leastupdate")]
5397 Leastupdate,
5398 #[serde(rename = "leastindex")]
5399 Leastindex,
5400 #[serde(rename = "highestindex")]
5401 Highestindex,
5402}
5403
5404impl RepoListStatusesByRefQuerySort {
5405 fn as_str(&self) -> &'static str {
5406 match self {
5407 RepoListStatusesByRefQuerySort::Oldest => "oldest",
5408 RepoListStatusesByRefQuerySort::Recentupdate => "recentupdate",
5409 RepoListStatusesByRefQuerySort::Leastupdate => "leastupdate",
5410 RepoListStatusesByRefQuerySort::Leastindex => "leastindex",
5411 RepoListStatusesByRefQuerySort::Highestindex => "highestindex",
5412 }
5413 }
5414}
5415
5416#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
5417pub enum RepoListStatusesByRefQueryState {
5418 #[serde(rename = "pending")]
5419 Pending,
5420 #[serde(rename = "success")]
5421 Success,
5422 #[serde(rename = "error")]
5423 Error,
5424 #[serde(rename = "failure")]
5425 Failure,
5426 #[serde(rename = "warning")]
5427 Warning,
5428}
5429
5430impl RepoListStatusesByRefQueryState {
5431 fn as_str(&self) -> &'static str {
5432 match self {
5433 RepoListStatusesByRefQueryState::Pending => "pending",
5434 RepoListStatusesByRefQueryState::Success => "success",
5435 RepoListStatusesByRefQueryState::Error => "error",
5436 RepoListStatusesByRefQueryState::Failure => "failure",
5437 RepoListStatusesByRefQueryState::Warning => "warning",
5438 }
5439 }
5440}
5441#[derive(Debug, Clone, PartialEq, Default)]
5442pub struct RepoGetContentsListQuery {
5443 pub r#ref: Option<String>,
5445}
5446
5447impl std::fmt::Display for RepoGetContentsListQuery {
5448 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5449 if let Some(r#ref) = &self.r#ref {
5450 write!(f, "ref={ref}&")?;
5451 }
5452
5453 Ok(())
5454 }
5455}
5456
5457#[derive(Debug, Clone, PartialEq, Default)]
5458pub struct RepoGetContentsQuery {
5459 pub r#ref: Option<String>,
5461}
5462
5463impl std::fmt::Display for RepoGetContentsQuery {
5464 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5465 if let Some(r#ref) = &self.r#ref {
5466 write!(f, "ref={ref}&")?;
5467 }
5468
5469 Ok(())
5470 }
5471}
5472
5473#[derive(Debug, Clone, PartialEq, Default)]
5474pub struct RepoGetEditorConfigQuery {
5475 pub r#ref: Option<String>,
5477}
5478
5479impl std::fmt::Display for RepoGetEditorConfigQuery {
5480 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5481 if let Some(r#ref) = &self.r#ref {
5482 write!(f, "ref={ref}&")?;
5483 }
5484
5485 Ok(())
5486 }
5487}
5488
5489#[derive(Debug, Clone, PartialEq, Default)]
5490pub struct ListForksQuery {
5491 pub page: Option<u32>,
5493 pub limit: Option<u32>,
5495}
5496
5497impl std::fmt::Display for ListForksQuery {
5498 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5499 if let Some(page) = &self.page {
5500 write!(f, "page={page}&")?;
5501 }
5502 if let Some(limit) = &self.limit {
5503 write!(f, "limit={limit}&")?;
5504 }
5505
5506 Ok(())
5507 }
5508}
5509
5510#[derive(Debug, Clone, PartialEq, Default)]
5511pub struct RepoGetSingleCommitQuery {
5512 pub stat: Option<bool>,
5514 pub verification: Option<bool>,
5516 pub files: Option<bool>,
5518}
5519
5520impl std::fmt::Display for RepoGetSingleCommitQuery {
5521 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5522 if let Some(stat) = &self.stat {
5523 write!(f, "stat={stat}&")?;
5524 }
5525 if let Some(verification) = &self.verification {
5526 write!(f, "verification={verification}&")?;
5527 }
5528 if let Some(files) = &self.files {
5529 write!(f, "files={files}&")?;
5530 }
5531
5532 Ok(())
5533 }
5534}
5535
5536#[derive(Debug, Clone, PartialEq, Default)]
5537pub struct RepoGetNoteQuery {
5538 pub verification: Option<bool>,
5540 pub files: Option<bool>,
5542}
5543
5544impl std::fmt::Display for RepoGetNoteQuery {
5545 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5546 if let Some(verification) = &self.verification {
5547 write!(f, "verification={verification}&")?;
5548 }
5549 if let Some(files) = &self.files {
5550 write!(f, "files={files}&")?;
5551 }
5552
5553 Ok(())
5554 }
5555}
5556
5557#[derive(Debug, Clone, PartialEq, Default)]
5558pub struct GetTreeQuery {
5559 pub recursive: Option<bool>,
5561 pub page: Option<u32>,
5563 pub per_page: Option<u32>,
5565}
5566
5567impl std::fmt::Display for GetTreeQuery {
5568 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5569 if let Some(recursive) = &self.recursive {
5570 write!(f, "recursive={recursive}&")?;
5571 }
5572 if let Some(page) = &self.page {
5573 write!(f, "page={page}&")?;
5574 }
5575 if let Some(per_page) = &self.per_page {
5576 write!(f, "per_page={per_page}&")?;
5577 }
5578
5579 Ok(())
5580 }
5581}
5582
5583#[derive(Debug, Clone, PartialEq, Default)]
5584pub struct RepoListHooksQuery {
5585 pub page: Option<u32>,
5587 pub limit: Option<u32>,
5589}
5590
5591impl std::fmt::Display for RepoListHooksQuery {
5592 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5593 if let Some(page) = &self.page {
5594 write!(f, "page={page}&")?;
5595 }
5596 if let Some(limit) = &self.limit {
5597 write!(f, "limit={limit}&")?;
5598 }
5599
5600 Ok(())
5601 }
5602}
5603
5604#[derive(Debug, Clone, PartialEq, Default)]
5605pub struct RepoTestHookQuery {
5606 pub r#ref: Option<String>,
5608}
5609
5610impl std::fmt::Display for RepoTestHookQuery {
5611 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5612 if let Some(r#ref) = &self.r#ref {
5613 write!(f, "ref={ref}&")?;
5614 }
5615
5616 Ok(())
5617 }
5618}
5619
5620#[derive(Debug, Clone, PartialEq, Default)]
5621pub struct IssueListIssuesQuery {
5622 pub state: Option<IssueListIssuesQueryState>,
5624 pub labels: Option<String>,
5626 pub q: Option<String>,
5628 pub r#type: Option<IssueListIssuesQueryType>,
5630 pub milestones: Option<String>,
5632 pub since: Option<time::OffsetDateTime>,
5634 pub before: Option<time::OffsetDateTime>,
5636 pub created_by: Option<String>,
5638 pub assigned_by: Option<String>,
5640 pub mentioned_by: Option<String>,
5642 pub page: Option<u32>,
5644 pub limit: Option<u32>,
5646}
5647
5648impl std::fmt::Display for IssueListIssuesQuery {
5649 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5650 if let Some(state) = &self.state {
5651 write!(f, "state={}&", state.as_str())?;
5652 }
5653 if let Some(labels) = &self.labels {
5654 write!(f, "labels={labels}&")?;
5655 }
5656 if let Some(q) = &self.q {
5657 write!(f, "q={q}&")?;
5658 }
5659 if let Some(r#type) = &self.r#type {
5660 write!(f, "type={}&", r#type.as_str())?;
5661 }
5662 if let Some(milestones) = &self.milestones {
5663 write!(f, "milestones={milestones}&")?;
5664 }
5665 if let Some(since) = &self.since {
5666 write!(
5667 f,
5668 "since={field_name}&",
5669 field_name = since
5670 .format(&time::format_description::well_known::Rfc3339)
5671 .unwrap()
5672 )?;
5673 }
5674 if let Some(before) = &self.before {
5675 write!(
5676 f,
5677 "before={field_name}&",
5678 field_name = before
5679 .format(&time::format_description::well_known::Rfc3339)
5680 .unwrap()
5681 )?;
5682 }
5683 if let Some(created_by) = &self.created_by {
5684 write!(f, "created_by={created_by}&")?;
5685 }
5686 if let Some(assigned_by) = &self.assigned_by {
5687 write!(f, "assigned_by={assigned_by}&")?;
5688 }
5689 if let Some(mentioned_by) = &self.mentioned_by {
5690 write!(f, "mentioned_by={mentioned_by}&")?;
5691 }
5692 if let Some(page) = &self.page {
5693 write!(f, "page={page}&")?;
5694 }
5695 if let Some(limit) = &self.limit {
5696 write!(f, "limit={limit}&")?;
5697 }
5698
5699 Ok(())
5700 }
5701}
5702
5703#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
5704pub enum IssueListIssuesQueryState {
5705 #[serde(rename = "closed")]
5706 Closed,
5707 #[serde(rename = "open")]
5708 Open,
5709 #[serde(rename = "all")]
5710 All,
5711}
5712
5713impl IssueListIssuesQueryState {
5714 fn as_str(&self) -> &'static str {
5715 match self {
5716 IssueListIssuesQueryState::Closed => "closed",
5717 IssueListIssuesQueryState::Open => "open",
5718 IssueListIssuesQueryState::All => "all",
5719 }
5720 }
5721}
5722
5723#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
5724pub enum IssueListIssuesQueryType {
5725 #[serde(rename = "issues")]
5726 Issues,
5727 #[serde(rename = "pulls")]
5728 Pulls,
5729}
5730
5731impl IssueListIssuesQueryType {
5732 fn as_str(&self) -> &'static str {
5733 match self {
5734 IssueListIssuesQueryType::Issues => "issues",
5735 IssueListIssuesQueryType::Pulls => "pulls",
5736 }
5737 }
5738}
5739#[derive(Debug, Clone, PartialEq, Default)]
5740pub struct IssueGetRepoCommentsQuery {
5741 pub since: Option<time::OffsetDateTime>,
5743 pub before: Option<time::OffsetDateTime>,
5745 pub page: Option<u32>,
5747 pub limit: Option<u32>,
5749}
5750
5751impl std::fmt::Display for IssueGetRepoCommentsQuery {
5752 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5753 if let Some(since) = &self.since {
5754 write!(
5755 f,
5756 "since={field_name}&",
5757 field_name = since
5758 .format(&time::format_description::well_known::Rfc3339)
5759 .unwrap()
5760 )?;
5761 }
5762 if let Some(before) = &self.before {
5763 write!(
5764 f,
5765 "before={field_name}&",
5766 field_name = before
5767 .format(&time::format_description::well_known::Rfc3339)
5768 .unwrap()
5769 )?;
5770 }
5771 if let Some(page) = &self.page {
5772 write!(f, "page={page}&")?;
5773 }
5774 if let Some(limit) = &self.limit {
5775 write!(f, "limit={limit}&")?;
5776 }
5777
5778 Ok(())
5779 }
5780}
5781
5782#[derive(Debug, Clone, PartialEq, Default)]
5783pub struct IssueCreateIssueCommentAttachmentQuery {
5784 pub name: Option<String>,
5786 pub updated_at: Option<time::OffsetDateTime>,
5788}
5789
5790impl std::fmt::Display for IssueCreateIssueCommentAttachmentQuery {
5791 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5792 if let Some(name) = &self.name {
5793 write!(f, "name={name}&")?;
5794 }
5795 if let Some(updated_at) = &self.updated_at {
5796 write!(
5797 f,
5798 "updated_at={field_name}&",
5799 field_name = updated_at
5800 .format(&time::format_description::well_known::Rfc3339)
5801 .unwrap()
5802 )?;
5803 }
5804
5805 Ok(())
5806 }
5807}
5808
5809#[derive(Debug, Clone, PartialEq, Default)]
5810pub struct IssueCreateIssueAttachmentQuery {
5811 pub name: Option<String>,
5813 pub updated_at: Option<time::OffsetDateTime>,
5815}
5816
5817impl std::fmt::Display for IssueCreateIssueAttachmentQuery {
5818 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5819 if let Some(name) = &self.name {
5820 write!(f, "name={name}&")?;
5821 }
5822 if let Some(updated_at) = &self.updated_at {
5823 write!(
5824 f,
5825 "updated_at={field_name}&",
5826 field_name = updated_at
5827 .format(&time::format_description::well_known::Rfc3339)
5828 .unwrap()
5829 )?;
5830 }
5831
5832 Ok(())
5833 }
5834}
5835
5836#[derive(Debug, Clone, PartialEq, Default)]
5837pub struct IssueListBlocksQuery {
5838 pub page: Option<u32>,
5840 pub limit: Option<u32>,
5842}
5843
5844impl std::fmt::Display for IssueListBlocksQuery {
5845 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5846 if let Some(page) = &self.page {
5847 write!(f, "page={page}&")?;
5848 }
5849 if let Some(limit) = &self.limit {
5850 write!(f, "limit={limit}&")?;
5851 }
5852
5853 Ok(())
5854 }
5855}
5856
5857#[derive(Debug, Clone, PartialEq, Default)]
5858pub struct IssueGetCommentsQuery {
5859 pub since: Option<time::OffsetDateTime>,
5861 pub before: Option<time::OffsetDateTime>,
5863}
5864
5865impl std::fmt::Display for IssueGetCommentsQuery {
5866 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5867 if let Some(since) = &self.since {
5868 write!(
5869 f,
5870 "since={field_name}&",
5871 field_name = since
5872 .format(&time::format_description::well_known::Rfc3339)
5873 .unwrap()
5874 )?;
5875 }
5876 if let Some(before) = &self.before {
5877 write!(
5878 f,
5879 "before={field_name}&",
5880 field_name = before
5881 .format(&time::format_description::well_known::Rfc3339)
5882 .unwrap()
5883 )?;
5884 }
5885
5886 Ok(())
5887 }
5888}
5889
5890#[derive(Debug, Clone, PartialEq, Default)]
5891pub struct IssueListIssueDependenciesQuery {
5892 pub page: Option<u32>,
5894 pub limit: Option<u32>,
5896}
5897
5898impl std::fmt::Display for IssueListIssueDependenciesQuery {
5899 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5900 if let Some(page) = &self.page {
5901 write!(f, "page={page}&")?;
5902 }
5903 if let Some(limit) = &self.limit {
5904 write!(f, "limit={limit}&")?;
5905 }
5906
5907 Ok(())
5908 }
5909}
5910
5911#[derive(Debug, Clone, PartialEq, Default)]
5912pub struct IssueGetIssueReactionsQuery {
5913 pub page: Option<u32>,
5915 pub limit: Option<u32>,
5917}
5918
5919impl std::fmt::Display for IssueGetIssueReactionsQuery {
5920 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5921 if let Some(page) = &self.page {
5922 write!(f, "page={page}&")?;
5923 }
5924 if let Some(limit) = &self.limit {
5925 write!(f, "limit={limit}&")?;
5926 }
5927
5928 Ok(())
5929 }
5930}
5931
5932#[derive(Debug, Clone, PartialEq, Default)]
5933pub struct IssueSubscriptionsQuery {
5934 pub page: Option<u32>,
5936 pub limit: Option<u32>,
5938}
5939
5940impl std::fmt::Display for IssueSubscriptionsQuery {
5941 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5942 if let Some(page) = &self.page {
5943 write!(f, "page={page}&")?;
5944 }
5945 if let Some(limit) = &self.limit {
5946 write!(f, "limit={limit}&")?;
5947 }
5948
5949 Ok(())
5950 }
5951}
5952
5953#[derive(Debug, Clone, PartialEq, Default)]
5954pub struct IssueGetCommentsAndTimelineQuery {
5955 pub since: Option<time::OffsetDateTime>,
5957 pub page: Option<u32>,
5959 pub limit: Option<u32>,
5961 pub before: Option<time::OffsetDateTime>,
5963}
5964
5965impl std::fmt::Display for IssueGetCommentsAndTimelineQuery {
5966 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5967 if let Some(since) = &self.since {
5968 write!(
5969 f,
5970 "since={field_name}&",
5971 field_name = since
5972 .format(&time::format_description::well_known::Rfc3339)
5973 .unwrap()
5974 )?;
5975 }
5976 if let Some(page) = &self.page {
5977 write!(f, "page={page}&")?;
5978 }
5979 if let Some(limit) = &self.limit {
5980 write!(f, "limit={limit}&")?;
5981 }
5982 if let Some(before) = &self.before {
5983 write!(
5984 f,
5985 "before={field_name}&",
5986 field_name = before
5987 .format(&time::format_description::well_known::Rfc3339)
5988 .unwrap()
5989 )?;
5990 }
5991
5992 Ok(())
5993 }
5994}
5995
5996#[derive(Debug, Clone, PartialEq, Default)]
5997pub struct IssueTrackedTimesQuery {
5998 pub user: Option<String>,
6000 pub since: Option<time::OffsetDateTime>,
6002 pub before: Option<time::OffsetDateTime>,
6004 pub page: Option<u32>,
6006 pub limit: Option<u32>,
6008}
6009
6010impl std::fmt::Display for IssueTrackedTimesQuery {
6011 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6012 if let Some(user) = &self.user {
6013 write!(f, "user={user}&")?;
6014 }
6015 if let Some(since) = &self.since {
6016 write!(
6017 f,
6018 "since={field_name}&",
6019 field_name = since
6020 .format(&time::format_description::well_known::Rfc3339)
6021 .unwrap()
6022 )?;
6023 }
6024 if let Some(before) = &self.before {
6025 write!(
6026 f,
6027 "before={field_name}&",
6028 field_name = before
6029 .format(&time::format_description::well_known::Rfc3339)
6030 .unwrap()
6031 )?;
6032 }
6033 if let Some(page) = &self.page {
6034 write!(f, "page={page}&")?;
6035 }
6036 if let Some(limit) = &self.limit {
6037 write!(f, "limit={limit}&")?;
6038 }
6039
6040 Ok(())
6041 }
6042}
6043
6044#[derive(Debug, Clone, PartialEq, Default)]
6045pub struct RepoListKeysQuery {
6046 pub key_id: Option<u32>,
6048 pub fingerprint: Option<String>,
6050 pub page: Option<u32>,
6052 pub limit: Option<u32>,
6054}
6055
6056impl std::fmt::Display for RepoListKeysQuery {
6057 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6058 if let Some(key_id) = &self.key_id {
6059 write!(f, "key_id={key_id}&")?;
6060 }
6061 if let Some(fingerprint) = &self.fingerprint {
6062 write!(f, "fingerprint={fingerprint}&")?;
6063 }
6064 if let Some(page) = &self.page {
6065 write!(f, "page={page}&")?;
6066 }
6067 if let Some(limit) = &self.limit {
6068 write!(f, "limit={limit}&")?;
6069 }
6070
6071 Ok(())
6072 }
6073}
6074
6075#[derive(Debug, Clone, PartialEq, Default)]
6076pub struct IssueListLabelsQuery {
6077 pub page: Option<u32>,
6079 pub limit: Option<u32>,
6081}
6082
6083impl std::fmt::Display for IssueListLabelsQuery {
6084 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6085 if let Some(page) = &self.page {
6086 write!(f, "page={page}&")?;
6087 }
6088 if let Some(limit) = &self.limit {
6089 write!(f, "limit={limit}&")?;
6090 }
6091
6092 Ok(())
6093 }
6094}
6095
6096#[derive(Debug, Clone, PartialEq, Default)]
6097pub struct RepoGetRawFileOrLfsQuery {
6098 pub r#ref: Option<String>,
6100}
6101
6102impl std::fmt::Display for RepoGetRawFileOrLfsQuery {
6103 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6104 if let Some(r#ref) = &self.r#ref {
6105 write!(f, "ref={ref}&")?;
6106 }
6107
6108 Ok(())
6109 }
6110}
6111
6112#[derive(Debug, Clone, PartialEq, Default)]
6113pub struct IssueGetMilestonesListQuery {
6114 pub state: Option<String>,
6116 pub name: Option<String>,
6118 pub page: Option<u32>,
6120 pub limit: Option<u32>,
6122}
6123
6124impl std::fmt::Display for IssueGetMilestonesListQuery {
6125 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6126 if let Some(state) = &self.state {
6127 write!(f, "state={state}&")?;
6128 }
6129 if let Some(name) = &self.name {
6130 write!(f, "name={name}&")?;
6131 }
6132 if let Some(page) = &self.page {
6133 write!(f, "page={page}&")?;
6134 }
6135 if let Some(limit) = &self.limit {
6136 write!(f, "limit={limit}&")?;
6137 }
6138
6139 Ok(())
6140 }
6141}
6142
6143#[derive(Debug, Clone, PartialEq, Default)]
6144pub struct NotifyGetRepoListQuery {
6145 pub all: Option<bool>,
6147 pub status_types: Option<Vec<String>>,
6149 pub subject_type: Option<Vec<NotifyGetRepoListQuerySubjectType>>,
6151 pub since: Option<time::OffsetDateTime>,
6153 pub before: Option<time::OffsetDateTime>,
6155 pub page: Option<u32>,
6157 pub limit: Option<u32>,
6159}
6160
6161impl std::fmt::Display for NotifyGetRepoListQuery {
6162 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6163 if let Some(all) = &self.all {
6164 write!(f, "all={all}&")?;
6165 }
6166 if let Some(status_types) = &self.status_types {
6167 if !status_types.is_empty() {
6168 for item in status_types {
6169 write!(f, "status-types=")?;
6170 write!(f, "{item}")?;
6171 write!(f, "&")?;
6172 }
6173 }
6174 }
6175 if let Some(subject_type) = &self.subject_type {
6176 if !subject_type.is_empty() {
6177 for item in subject_type {
6178 write!(f, "subject-type=")?;
6179 write!(f, "{}", item.as_str())?;
6180 write!(f, "&")?;
6181 }
6182 }
6183 }
6184 if let Some(since) = &self.since {
6185 write!(
6186 f,
6187 "since={field_name}&",
6188 field_name = since
6189 .format(&time::format_description::well_known::Rfc3339)
6190 .unwrap()
6191 )?;
6192 }
6193 if let Some(before) = &self.before {
6194 write!(
6195 f,
6196 "before={field_name}&",
6197 field_name = before
6198 .format(&time::format_description::well_known::Rfc3339)
6199 .unwrap()
6200 )?;
6201 }
6202 if let Some(page) = &self.page {
6203 write!(f, "page={page}&")?;
6204 }
6205 if let Some(limit) = &self.limit {
6206 write!(f, "limit={limit}&")?;
6207 }
6208
6209 Ok(())
6210 }
6211}
6212
6213#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
6214pub enum NotifyGetRepoListQuerySubjectType {
6215 #[serde(rename = "issue")]
6216 Issue,
6217 #[serde(rename = "pull")]
6218 Pull,
6219 #[serde(rename = "commit")]
6220 Commit,
6221 #[serde(rename = "repository")]
6222 Repository,
6223}
6224
6225impl NotifyGetRepoListQuerySubjectType {
6226 fn as_str(&self) -> &'static str {
6227 match self {
6228 NotifyGetRepoListQuerySubjectType::Issue => "issue",
6229 NotifyGetRepoListQuerySubjectType::Pull => "pull",
6230 NotifyGetRepoListQuerySubjectType::Commit => "commit",
6231 NotifyGetRepoListQuerySubjectType::Repository => "repository",
6232 }
6233 }
6234}
6235#[derive(Debug, Clone, PartialEq, Default)]
6236pub struct NotifyReadRepoListQuery {
6237 pub all: Option<String>,
6239 pub status_types: Option<Vec<String>>,
6241 pub to_status: Option<String>,
6243 pub last_read_at: Option<time::OffsetDateTime>,
6245}
6246
6247impl std::fmt::Display for NotifyReadRepoListQuery {
6248 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6249 if let Some(all) = &self.all {
6250 write!(f, "all={all}&")?;
6251 }
6252 if let Some(status_types) = &self.status_types {
6253 if !status_types.is_empty() {
6254 for item in status_types {
6255 write!(f, "status-types=")?;
6256 write!(f, "{item}")?;
6257 write!(f, "&")?;
6258 }
6259 }
6260 }
6261 if let Some(to_status) = &self.to_status {
6262 write!(f, "to-status={to_status}&")?;
6263 }
6264 if let Some(last_read_at) = &self.last_read_at {
6265 write!(
6266 f,
6267 "last_read_at={field_name}&",
6268 field_name = last_read_at
6269 .format(&time::format_description::well_known::Rfc3339)
6270 .unwrap()
6271 )?;
6272 }
6273
6274 Ok(())
6275 }
6276}
6277
6278#[derive(Debug, Clone, PartialEq, Default)]
6279pub struct RepoListPullRequestsQuery {
6280 pub state: Option<RepoListPullRequestsQueryState>,
6282 pub sort: Option<RepoListPullRequestsQuerySort>,
6284 pub milestone: Option<u64>,
6286 pub labels: Option<Vec<u64>>,
6288 pub poster: Option<String>,
6290 pub page: Option<u32>,
6292 pub limit: Option<u32>,
6294}
6295
6296impl std::fmt::Display for RepoListPullRequestsQuery {
6297 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6298 if let Some(state) = &self.state {
6299 write!(f, "state={}&", state.as_str())?;
6300 }
6301 if let Some(sort) = &self.sort {
6302 write!(f, "sort={}&", sort.as_str())?;
6303 }
6304 if let Some(milestone) = &self.milestone {
6305 write!(f, "milestone={milestone}&")?;
6306 }
6307 if let Some(labels) = &self.labels {
6308 if !labels.is_empty() {
6309 for item in labels {
6310 write!(f, "labels=")?;
6311 write!(f, "{item}")?;
6312 write!(f, "&")?;
6313 }
6314 }
6315 }
6316 if let Some(poster) = &self.poster {
6317 write!(f, "poster={poster}&")?;
6318 }
6319 if let Some(page) = &self.page {
6320 write!(f, "page={page}&")?;
6321 }
6322 if let Some(limit) = &self.limit {
6323 write!(f, "limit={limit}&")?;
6324 }
6325
6326 Ok(())
6327 }
6328}
6329
6330#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
6331pub enum RepoListPullRequestsQueryState {
6332 #[serde(rename = "open")]
6333 Open,
6334 #[serde(rename = "closed")]
6335 Closed,
6336 #[serde(rename = "all")]
6337 All,
6338}
6339
6340impl RepoListPullRequestsQueryState {
6341 fn as_str(&self) -> &'static str {
6342 match self {
6343 RepoListPullRequestsQueryState::Open => "open",
6344 RepoListPullRequestsQueryState::Closed => "closed",
6345 RepoListPullRequestsQueryState::All => "all",
6346 }
6347 }
6348}
6349
6350#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
6351pub enum RepoListPullRequestsQuerySort {
6352 #[serde(rename = "oldest")]
6353 Oldest,
6354 #[serde(rename = "recentupdate")]
6355 Recentupdate,
6356 #[serde(rename = "leastupdate")]
6357 Leastupdate,
6358 #[serde(rename = "mostcomment")]
6359 Mostcomment,
6360 #[serde(rename = "leastcomment")]
6361 Leastcomment,
6362 #[serde(rename = "priority")]
6363 Priority,
6364}
6365
6366impl RepoListPullRequestsQuerySort {
6367 fn as_str(&self) -> &'static str {
6368 match self {
6369 RepoListPullRequestsQuerySort::Oldest => "oldest",
6370 RepoListPullRequestsQuerySort::Recentupdate => "recentupdate",
6371 RepoListPullRequestsQuerySort::Leastupdate => "leastupdate",
6372 RepoListPullRequestsQuerySort::Mostcomment => "mostcomment",
6373 RepoListPullRequestsQuerySort::Leastcomment => "leastcomment",
6374 RepoListPullRequestsQuerySort::Priority => "priority",
6375 }
6376 }
6377}
6378#[derive(Debug, Clone, PartialEq, Default)]
6379pub struct RepoDownloadPullDiffOrPatchQuery {
6380 pub binary: Option<bool>,
6382}
6383
6384impl std::fmt::Display for RepoDownloadPullDiffOrPatchQuery {
6385 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6386 if let Some(binary) = &self.binary {
6387 write!(f, "binary={binary}&")?;
6388 }
6389
6390 Ok(())
6391 }
6392}
6393
6394#[derive(Debug, Clone, PartialEq, Default)]
6395pub struct RepoGetPullRequestCommitsQuery {
6396 pub page: Option<u32>,
6398 pub limit: Option<u32>,
6400 pub verification: Option<bool>,
6402 pub files: Option<bool>,
6404}
6405
6406impl std::fmt::Display for RepoGetPullRequestCommitsQuery {
6407 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6408 if let Some(page) = &self.page {
6409 write!(f, "page={page}&")?;
6410 }
6411 if let Some(limit) = &self.limit {
6412 write!(f, "limit={limit}&")?;
6413 }
6414 if let Some(verification) = &self.verification {
6415 write!(f, "verification={verification}&")?;
6416 }
6417 if let Some(files) = &self.files {
6418 write!(f, "files={files}&")?;
6419 }
6420
6421 Ok(())
6422 }
6423}
6424
6425#[derive(Debug, Clone, PartialEq, Default)]
6426pub struct RepoGetPullRequestFilesQuery {
6427 pub skip_to: Option<String>,
6429 pub whitespace: Option<RepoGetPullRequestFilesQueryWhitespace>,
6431 pub page: Option<u32>,
6433 pub limit: Option<u32>,
6435}
6436
6437impl std::fmt::Display for RepoGetPullRequestFilesQuery {
6438 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6439 if let Some(skip_to) = &self.skip_to {
6440 write!(f, "skip-to={skip_to}&")?;
6441 }
6442 if let Some(whitespace) = &self.whitespace {
6443 write!(f, "whitespace={}&", whitespace.as_str())?;
6444 }
6445 if let Some(page) = &self.page {
6446 write!(f, "page={page}&")?;
6447 }
6448 if let Some(limit) = &self.limit {
6449 write!(f, "limit={limit}&")?;
6450 }
6451
6452 Ok(())
6453 }
6454}
6455
6456#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
6457pub enum RepoGetPullRequestFilesQueryWhitespace {
6458 #[serde(rename = "ignore-all")]
6459 IgnoreAll,
6460 #[serde(rename = "ignore-change")]
6461 IgnoreChange,
6462 #[serde(rename = "ignore-eol")]
6463 IgnoreEol,
6464 #[serde(rename = "show-all")]
6465 ShowAll,
6466}
6467
6468impl RepoGetPullRequestFilesQueryWhitespace {
6469 fn as_str(&self) -> &'static str {
6470 match self {
6471 RepoGetPullRequestFilesQueryWhitespace::IgnoreAll => "ignore-all",
6472 RepoGetPullRequestFilesQueryWhitespace::IgnoreChange => "ignore-change",
6473 RepoGetPullRequestFilesQueryWhitespace::IgnoreEol => "ignore-eol",
6474 RepoGetPullRequestFilesQueryWhitespace::ShowAll => "show-all",
6475 }
6476 }
6477}
6478#[derive(Debug, Clone, PartialEq, Default)]
6479pub struct RepoListPullReviewsQuery {
6480 pub page: Option<u32>,
6482 pub limit: Option<u32>,
6484}
6485
6486impl std::fmt::Display for RepoListPullReviewsQuery {
6487 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6488 if let Some(page) = &self.page {
6489 write!(f, "page={page}&")?;
6490 }
6491 if let Some(limit) = &self.limit {
6492 write!(f, "limit={limit}&")?;
6493 }
6494
6495 Ok(())
6496 }
6497}
6498
6499#[derive(Debug, Clone, PartialEq, Default)]
6500pub struct RepoUpdatePullRequestQuery {
6501 pub style: Option<RepoUpdatePullRequestQueryStyle>,
6503}
6504
6505impl std::fmt::Display for RepoUpdatePullRequestQuery {
6506 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6507 if let Some(style) = &self.style {
6508 write!(f, "style={}&", style.as_str())?;
6509 }
6510
6511 Ok(())
6512 }
6513}
6514
6515#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
6516pub enum RepoUpdatePullRequestQueryStyle {
6517 #[serde(rename = "merge")]
6518 Merge,
6519 #[serde(rename = "rebase")]
6520 Rebase,
6521}
6522
6523impl RepoUpdatePullRequestQueryStyle {
6524 fn as_str(&self) -> &'static str {
6525 match self {
6526 RepoUpdatePullRequestQueryStyle::Merge => "merge",
6527 RepoUpdatePullRequestQueryStyle::Rebase => "rebase",
6528 }
6529 }
6530}
6531#[derive(Debug, Clone, PartialEq, Default)]
6532pub struct RepoListPushMirrorsQuery {
6533 pub page: Option<u32>,
6535 pub limit: Option<u32>,
6537}
6538
6539impl std::fmt::Display for RepoListPushMirrorsQuery {
6540 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6541 if let Some(page) = &self.page {
6542 write!(f, "page={page}&")?;
6543 }
6544 if let Some(limit) = &self.limit {
6545 write!(f, "limit={limit}&")?;
6546 }
6547
6548 Ok(())
6549 }
6550}
6551
6552#[derive(Debug, Clone, PartialEq, Default)]
6553pub struct RepoGetRawFileQuery {
6554 pub r#ref: Option<String>,
6556}
6557
6558impl std::fmt::Display for RepoGetRawFileQuery {
6559 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6560 if let Some(r#ref) = &self.r#ref {
6561 write!(f, "ref={ref}&")?;
6562 }
6563
6564 Ok(())
6565 }
6566}
6567
6568#[derive(Debug, Clone, PartialEq, Default)]
6569pub struct RepoListReleasesQuery {
6570 pub draft: Option<bool>,
6572 pub pre_release: Option<bool>,
6574 pub q: Option<String>,
6576 pub page: Option<u32>,
6578 pub limit: Option<u32>,
6580}
6581
6582impl std::fmt::Display for RepoListReleasesQuery {
6583 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6584 if let Some(draft) = &self.draft {
6585 write!(f, "draft={draft}&")?;
6586 }
6587 if let Some(pre_release) = &self.pre_release {
6588 write!(f, "pre-release={pre_release}&")?;
6589 }
6590 if let Some(q) = &self.q {
6591 write!(f, "q={q}&")?;
6592 }
6593 if let Some(page) = &self.page {
6594 write!(f, "page={page}&")?;
6595 }
6596 if let Some(limit) = &self.limit {
6597 write!(f, "limit={limit}&")?;
6598 }
6599
6600 Ok(())
6601 }
6602}
6603
6604#[derive(Debug, Clone, PartialEq, Default)]
6605pub struct RepoCreateReleaseAttachmentQuery {
6606 pub name: Option<String>,
6608}
6609
6610impl std::fmt::Display for RepoCreateReleaseAttachmentQuery {
6611 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6612 if let Some(name) = &self.name {
6613 write!(f, "name={name}&")?;
6614 }
6615
6616 Ok(())
6617 }
6618}
6619
6620#[derive(Debug, Clone, PartialEq, Default)]
6621pub struct RepoListStargazersQuery {
6622 pub page: Option<u32>,
6624 pub limit: Option<u32>,
6626}
6627
6628impl std::fmt::Display for RepoListStargazersQuery {
6629 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6630 if let Some(page) = &self.page {
6631 write!(f, "page={page}&")?;
6632 }
6633 if let Some(limit) = &self.limit {
6634 write!(f, "limit={limit}&")?;
6635 }
6636
6637 Ok(())
6638 }
6639}
6640
6641#[derive(Debug, Clone, PartialEq, Default)]
6642pub struct RepoListStatusesQuery {
6643 pub sort: Option<RepoListStatusesQuerySort>,
6645 pub state: Option<RepoListStatusesQueryState>,
6647 pub page: Option<u32>,
6649 pub limit: Option<u32>,
6651}
6652
6653impl std::fmt::Display for RepoListStatusesQuery {
6654 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6655 if let Some(sort) = &self.sort {
6656 write!(f, "sort={}&", sort.as_str())?;
6657 }
6658 if let Some(state) = &self.state {
6659 write!(f, "state={}&", state.as_str())?;
6660 }
6661 if let Some(page) = &self.page {
6662 write!(f, "page={page}&")?;
6663 }
6664 if let Some(limit) = &self.limit {
6665 write!(f, "limit={limit}&")?;
6666 }
6667
6668 Ok(())
6669 }
6670}
6671
6672#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
6673pub enum RepoListStatusesQuerySort {
6674 #[serde(rename = "oldest")]
6675 Oldest,
6676 #[serde(rename = "recentupdate")]
6677 Recentupdate,
6678 #[serde(rename = "leastupdate")]
6679 Leastupdate,
6680 #[serde(rename = "leastindex")]
6681 Leastindex,
6682 #[serde(rename = "highestindex")]
6683 Highestindex,
6684}
6685
6686impl RepoListStatusesQuerySort {
6687 fn as_str(&self) -> &'static str {
6688 match self {
6689 RepoListStatusesQuerySort::Oldest => "oldest",
6690 RepoListStatusesQuerySort::Recentupdate => "recentupdate",
6691 RepoListStatusesQuerySort::Leastupdate => "leastupdate",
6692 RepoListStatusesQuerySort::Leastindex => "leastindex",
6693 RepoListStatusesQuerySort::Highestindex => "highestindex",
6694 }
6695 }
6696}
6697
6698#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
6699pub enum RepoListStatusesQueryState {
6700 #[serde(rename = "pending")]
6701 Pending,
6702 #[serde(rename = "success")]
6703 Success,
6704 #[serde(rename = "error")]
6705 Error,
6706 #[serde(rename = "failure")]
6707 Failure,
6708 #[serde(rename = "warning")]
6709 Warning,
6710}
6711
6712impl RepoListStatusesQueryState {
6713 fn as_str(&self) -> &'static str {
6714 match self {
6715 RepoListStatusesQueryState::Pending => "pending",
6716 RepoListStatusesQueryState::Success => "success",
6717 RepoListStatusesQueryState::Error => "error",
6718 RepoListStatusesQueryState::Failure => "failure",
6719 RepoListStatusesQueryState::Warning => "warning",
6720 }
6721 }
6722}
6723#[derive(Debug, Clone, PartialEq, Default)]
6724pub struct RepoListSubscribersQuery {
6725 pub page: Option<u32>,
6727 pub limit: Option<u32>,
6729}
6730
6731impl std::fmt::Display for RepoListSubscribersQuery {
6732 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6733 if let Some(page) = &self.page {
6734 write!(f, "page={page}&")?;
6735 }
6736 if let Some(limit) = &self.limit {
6737 write!(f, "limit={limit}&")?;
6738 }
6739
6740 Ok(())
6741 }
6742}
6743
6744#[derive(Debug, Clone, PartialEq, Default)]
6745pub struct RepoListTagsQuery {
6746 pub page: Option<u32>,
6748 pub limit: Option<u32>,
6750}
6751
6752impl std::fmt::Display for RepoListTagsQuery {
6753 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6754 if let Some(page) = &self.page {
6755 write!(f, "page={page}&")?;
6756 }
6757 if let Some(limit) = &self.limit {
6758 write!(f, "limit={limit}&")?;
6759 }
6760
6761 Ok(())
6762 }
6763}
6764
6765#[derive(Debug, Clone, PartialEq, Default)]
6766pub struct RepoTrackedTimesQuery {
6767 pub user: Option<String>,
6769 pub since: Option<time::OffsetDateTime>,
6771 pub before: Option<time::OffsetDateTime>,
6773 pub page: Option<u32>,
6775 pub limit: Option<u32>,
6777}
6778
6779impl std::fmt::Display for RepoTrackedTimesQuery {
6780 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6781 if let Some(user) = &self.user {
6782 write!(f, "user={user}&")?;
6783 }
6784 if let Some(since) = &self.since {
6785 write!(
6786 f,
6787 "since={field_name}&",
6788 field_name = since
6789 .format(&time::format_description::well_known::Rfc3339)
6790 .unwrap()
6791 )?;
6792 }
6793 if let Some(before) = &self.before {
6794 write!(
6795 f,
6796 "before={field_name}&",
6797 field_name = before
6798 .format(&time::format_description::well_known::Rfc3339)
6799 .unwrap()
6800 )?;
6801 }
6802 if let Some(page) = &self.page {
6803 write!(f, "page={page}&")?;
6804 }
6805 if let Some(limit) = &self.limit {
6806 write!(f, "limit={limit}&")?;
6807 }
6808
6809 Ok(())
6810 }
6811}
6812
6813#[derive(Debug, Clone, PartialEq, Default)]
6814pub struct RepoListTopicsQuery {
6815 pub page: Option<u32>,
6817 pub limit: Option<u32>,
6819}
6820
6821impl std::fmt::Display for RepoListTopicsQuery {
6822 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6823 if let Some(page) = &self.page {
6824 write!(f, "page={page}&")?;
6825 }
6826 if let Some(limit) = &self.limit {
6827 write!(f, "limit={limit}&")?;
6828 }
6829
6830 Ok(())
6831 }
6832}
6833
6834#[derive(Debug, Clone, PartialEq, Default)]
6835pub struct RepoGetWikiPagesQuery {
6836 pub page: Option<u32>,
6838 pub limit: Option<u32>,
6840}
6841
6842impl std::fmt::Display for RepoGetWikiPagesQuery {
6843 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6844 if let Some(page) = &self.page {
6845 write!(f, "page={page}&")?;
6846 }
6847 if let Some(limit) = &self.limit {
6848 write!(f, "limit={limit}&")?;
6849 }
6850
6851 Ok(())
6852 }
6853}
6854
6855#[derive(Debug, Clone, PartialEq, Default)]
6856pub struct RepoGetWikiPageRevisionsQuery {
6857 pub page: Option<u32>,
6859}
6860
6861impl std::fmt::Display for RepoGetWikiPageRevisionsQuery {
6862 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6863 if let Some(page) = &self.page {
6864 write!(f, "page={page}&")?;
6865 }
6866
6867 Ok(())
6868 }
6869}
6870
6871#[derive(Debug, Clone, PartialEq, Default)]
6872pub struct OrgListTeamActivityFeedsQuery {
6873 pub date: Option<time::Date>,
6875 pub page: Option<u32>,
6877 pub limit: Option<u32>,
6879}
6880
6881impl std::fmt::Display for OrgListTeamActivityFeedsQuery {
6882 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6883 if let Some(date) = &self.date {
6884 write!(
6885 f,
6886 "date={field_name}&",
6887 field_name = date
6888 .format(&time::format_description::well_known::Rfc3339)
6889 .unwrap()
6890 )?;
6891 }
6892 if let Some(page) = &self.page {
6893 write!(f, "page={page}&")?;
6894 }
6895 if let Some(limit) = &self.limit {
6896 write!(f, "limit={limit}&")?;
6897 }
6898
6899 Ok(())
6900 }
6901}
6902
6903#[derive(Debug, Clone, PartialEq, Default)]
6904pub struct OrgListTeamMembersQuery {
6905 pub page: Option<u32>,
6907 pub limit: Option<u32>,
6909}
6910
6911impl std::fmt::Display for OrgListTeamMembersQuery {
6912 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6913 if let Some(page) = &self.page {
6914 write!(f, "page={page}&")?;
6915 }
6916 if let Some(limit) = &self.limit {
6917 write!(f, "limit={limit}&")?;
6918 }
6919
6920 Ok(())
6921 }
6922}
6923
6924#[derive(Debug, Clone, PartialEq, Default)]
6925pub struct OrgListTeamReposQuery {
6926 pub page: Option<u32>,
6928 pub limit: Option<u32>,
6930}
6931
6932impl std::fmt::Display for OrgListTeamReposQuery {
6933 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6934 if let Some(page) = &self.page {
6935 write!(f, "page={page}&")?;
6936 }
6937 if let Some(limit) = &self.limit {
6938 write!(f, "limit={limit}&")?;
6939 }
6940
6941 Ok(())
6942 }
6943}
6944
6945#[derive(Debug, Clone, PartialEq)]
6946pub struct TopicSearchQuery {
6947 pub q: String,
6949 pub page: Option<u32>,
6951 pub limit: Option<u32>,
6953}
6954
6955impl std::fmt::Display for TopicSearchQuery {
6956 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6957 let q = &self.q;
6958 write!(f, "q={q}&")?;
6959 if let Some(page) = &self.page {
6960 write!(f, "page={page}&")?;
6961 }
6962 if let Some(limit) = &self.limit {
6963 write!(f, "limit={limit}&")?;
6964 }
6965
6966 Ok(())
6967 }
6968}
6969
6970#[derive(Debug, Clone, PartialEq, Default)]
6971pub struct GetUserVariablesListQuery {
6972 pub page: Option<u32>,
6974 pub limit: Option<u32>,
6976}
6977
6978impl std::fmt::Display for GetUserVariablesListQuery {
6979 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6980 if let Some(page) = &self.page {
6981 write!(f, "page={page}&")?;
6982 }
6983 if let Some(limit) = &self.limit {
6984 write!(f, "limit={limit}&")?;
6985 }
6986
6987 Ok(())
6988 }
6989}
6990
6991#[derive(Debug, Clone, PartialEq, Default)]
6992pub struct UserGetOAuth2ApplicationsQuery {
6993 pub page: Option<u32>,
6995 pub limit: Option<u32>,
6997}
6998
6999impl std::fmt::Display for UserGetOAuth2ApplicationsQuery {
7000 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7001 if let Some(page) = &self.page {
7002 write!(f, "page={page}&")?;
7003 }
7004 if let Some(limit) = &self.limit {
7005 write!(f, "limit={limit}&")?;
7006 }
7007
7008 Ok(())
7009 }
7010}
7011
7012#[derive(Debug, Clone, PartialEq, Default)]
7013pub struct UserCurrentListFollowersQuery {
7014 pub page: Option<u32>,
7016 pub limit: Option<u32>,
7018}
7019
7020impl std::fmt::Display for UserCurrentListFollowersQuery {
7021 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7022 if let Some(page) = &self.page {
7023 write!(f, "page={page}&")?;
7024 }
7025 if let Some(limit) = &self.limit {
7026 write!(f, "limit={limit}&")?;
7027 }
7028
7029 Ok(())
7030 }
7031}
7032
7033#[derive(Debug, Clone, PartialEq, Default)]
7034pub struct UserCurrentListFollowingQuery {
7035 pub page: Option<u32>,
7037 pub limit: Option<u32>,
7039}
7040
7041impl std::fmt::Display for UserCurrentListFollowingQuery {
7042 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7043 if let Some(page) = &self.page {
7044 write!(f, "page={page}&")?;
7045 }
7046 if let Some(limit) = &self.limit {
7047 write!(f, "limit={limit}&")?;
7048 }
7049
7050 Ok(())
7051 }
7052}
7053
7054#[derive(Debug, Clone, PartialEq, Default)]
7055pub struct UserCurrentListGpgKeysQuery {
7056 pub page: Option<u32>,
7058 pub limit: Option<u32>,
7060}
7061
7062impl std::fmt::Display for UserCurrentListGpgKeysQuery {
7063 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7064 if let Some(page) = &self.page {
7065 write!(f, "page={page}&")?;
7066 }
7067 if let Some(limit) = &self.limit {
7068 write!(f, "limit={limit}&")?;
7069 }
7070
7071 Ok(())
7072 }
7073}
7074
7075#[derive(Debug, Clone, PartialEq, Default)]
7076pub struct UserListHooksQuery {
7077 pub page: Option<u32>,
7079 pub limit: Option<u32>,
7081}
7082
7083impl std::fmt::Display for UserListHooksQuery {
7084 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7085 if let Some(page) = &self.page {
7086 write!(f, "page={page}&")?;
7087 }
7088 if let Some(limit) = &self.limit {
7089 write!(f, "limit={limit}&")?;
7090 }
7091
7092 Ok(())
7093 }
7094}
7095
7096#[derive(Debug, Clone, PartialEq, Default)]
7097pub struct UserCurrentListKeysQuery {
7098 pub fingerprint: Option<String>,
7100 pub page: Option<u32>,
7102 pub limit: Option<u32>,
7104}
7105
7106impl std::fmt::Display for UserCurrentListKeysQuery {
7107 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7108 if let Some(fingerprint) = &self.fingerprint {
7109 write!(f, "fingerprint={fingerprint}&")?;
7110 }
7111 if let Some(page) = &self.page {
7112 write!(f, "page={page}&")?;
7113 }
7114 if let Some(limit) = &self.limit {
7115 write!(f, "limit={limit}&")?;
7116 }
7117
7118 Ok(())
7119 }
7120}
7121
7122#[derive(Debug, Clone, PartialEq, Default)]
7123pub struct UserListBlockedUsersQuery {
7124 pub page: Option<u32>,
7126 pub limit: Option<u32>,
7128}
7129
7130impl std::fmt::Display for UserListBlockedUsersQuery {
7131 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7132 if let Some(page) = &self.page {
7133 write!(f, "page={page}&")?;
7134 }
7135 if let Some(limit) = &self.limit {
7136 write!(f, "limit={limit}&")?;
7137 }
7138
7139 Ok(())
7140 }
7141}
7142
7143#[derive(Debug, Clone, PartialEq, Default)]
7144pub struct OrgListCurrentUserOrgsQuery {
7145 pub page: Option<u32>,
7147 pub limit: Option<u32>,
7149}
7150
7151impl std::fmt::Display for OrgListCurrentUserOrgsQuery {
7152 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7153 if let Some(page) = &self.page {
7154 write!(f, "page={page}&")?;
7155 }
7156 if let Some(limit) = &self.limit {
7157 write!(f, "limit={limit}&")?;
7158 }
7159
7160 Ok(())
7161 }
7162}
7163
7164#[derive(Debug, Clone, PartialEq, Default)]
7165pub struct UserListQuotaArtifactsQuery {
7166 pub page: Option<u32>,
7168 pub limit: Option<u32>,
7170}
7171
7172impl std::fmt::Display for UserListQuotaArtifactsQuery {
7173 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7174 if let Some(page) = &self.page {
7175 write!(f, "page={page}&")?;
7176 }
7177 if let Some(limit) = &self.limit {
7178 write!(f, "limit={limit}&")?;
7179 }
7180
7181 Ok(())
7182 }
7183}
7184
7185#[derive(Debug, Clone, PartialEq, Default)]
7186pub struct UserListQuotaAttachmentsQuery {
7187 pub page: Option<u32>,
7189 pub limit: Option<u32>,
7191}
7192
7193impl std::fmt::Display for UserListQuotaAttachmentsQuery {
7194 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7195 if let Some(page) = &self.page {
7196 write!(f, "page={page}&")?;
7197 }
7198 if let Some(limit) = &self.limit {
7199 write!(f, "limit={limit}&")?;
7200 }
7201
7202 Ok(())
7203 }
7204}
7205
7206#[derive(Debug, Clone, PartialEq, Default)]
7207pub struct UserListQuotaPackagesQuery {
7208 pub page: Option<u32>,
7210 pub limit: Option<u32>,
7212}
7213
7214impl std::fmt::Display for UserListQuotaPackagesQuery {
7215 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7216 if let Some(page) = &self.page {
7217 write!(f, "page={page}&")?;
7218 }
7219 if let Some(limit) = &self.limit {
7220 write!(f, "limit={limit}&")?;
7221 }
7222
7223 Ok(())
7224 }
7225}
7226
7227#[derive(Debug, Clone, PartialEq, Default)]
7228pub struct UserCurrentListReposQuery {
7229 pub page: Option<u32>,
7231 pub limit: Option<u32>,
7233 pub order_by: Option<String>,
7235}
7236
7237impl std::fmt::Display for UserCurrentListReposQuery {
7238 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7239 if let Some(page) = &self.page {
7240 write!(f, "page={page}&")?;
7241 }
7242 if let Some(limit) = &self.limit {
7243 write!(f, "limit={limit}&")?;
7244 }
7245 if let Some(order_by) = &self.order_by {
7246 write!(f, "order_by={order_by}&")?;
7247 }
7248
7249 Ok(())
7250 }
7251}
7252
7253#[derive(Debug, Clone, PartialEq, Default)]
7254pub struct UserCurrentListStarredQuery {
7255 pub page: Option<u32>,
7257 pub limit: Option<u32>,
7259}
7260
7261impl std::fmt::Display for UserCurrentListStarredQuery {
7262 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7263 if let Some(page) = &self.page {
7264 write!(f, "page={page}&")?;
7265 }
7266 if let Some(limit) = &self.limit {
7267 write!(f, "limit={limit}&")?;
7268 }
7269
7270 Ok(())
7271 }
7272}
7273
7274#[derive(Debug, Clone, PartialEq, Default)]
7275pub struct UserGetStopWatchesQuery {
7276 pub page: Option<u32>,
7278 pub limit: Option<u32>,
7280}
7281
7282impl std::fmt::Display for UserGetStopWatchesQuery {
7283 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7284 if let Some(page) = &self.page {
7285 write!(f, "page={page}&")?;
7286 }
7287 if let Some(limit) = &self.limit {
7288 write!(f, "limit={limit}&")?;
7289 }
7290
7291 Ok(())
7292 }
7293}
7294
7295#[derive(Debug, Clone, PartialEq, Default)]
7296pub struct UserCurrentListSubscriptionsQuery {
7297 pub page: Option<u32>,
7299 pub limit: Option<u32>,
7301}
7302
7303impl std::fmt::Display for UserCurrentListSubscriptionsQuery {
7304 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7305 if let Some(page) = &self.page {
7306 write!(f, "page={page}&")?;
7307 }
7308 if let Some(limit) = &self.limit {
7309 write!(f, "limit={limit}&")?;
7310 }
7311
7312 Ok(())
7313 }
7314}
7315
7316#[derive(Debug, Clone, PartialEq, Default)]
7317pub struct UserListTeamsQuery {
7318 pub page: Option<u32>,
7320 pub limit: Option<u32>,
7322}
7323
7324impl std::fmt::Display for UserListTeamsQuery {
7325 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7326 if let Some(page) = &self.page {
7327 write!(f, "page={page}&")?;
7328 }
7329 if let Some(limit) = &self.limit {
7330 write!(f, "limit={limit}&")?;
7331 }
7332
7333 Ok(())
7334 }
7335}
7336
7337#[derive(Debug, Clone, PartialEq, Default)]
7338pub struct UserCurrentTrackedTimesQuery {
7339 pub page: Option<u32>,
7341 pub limit: Option<u32>,
7343 pub since: Option<time::OffsetDateTime>,
7345 pub before: Option<time::OffsetDateTime>,
7347}
7348
7349impl std::fmt::Display for UserCurrentTrackedTimesQuery {
7350 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7351 if let Some(page) = &self.page {
7352 write!(f, "page={page}&")?;
7353 }
7354 if let Some(limit) = &self.limit {
7355 write!(f, "limit={limit}&")?;
7356 }
7357 if let Some(since) = &self.since {
7358 write!(
7359 f,
7360 "since={field_name}&",
7361 field_name = since
7362 .format(&time::format_description::well_known::Rfc3339)
7363 .unwrap()
7364 )?;
7365 }
7366 if let Some(before) = &self.before {
7367 write!(
7368 f,
7369 "before={field_name}&",
7370 field_name = before
7371 .format(&time::format_description::well_known::Rfc3339)
7372 .unwrap()
7373 )?;
7374 }
7375
7376 Ok(())
7377 }
7378}
7379
7380#[derive(Debug, Clone, PartialEq, Default)]
7381pub struct UserSearchQuery {
7382 pub q: Option<String>,
7384 pub uid: Option<u64>,
7386 pub page: Option<u32>,
7388 pub limit: Option<u32>,
7390}
7391
7392impl std::fmt::Display for UserSearchQuery {
7393 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7394 if let Some(q) = &self.q {
7395 write!(f, "q={q}&")?;
7396 }
7397 if let Some(uid) = &self.uid {
7398 write!(f, "uid={uid}&")?;
7399 }
7400 if let Some(page) = &self.page {
7401 write!(f, "page={page}&")?;
7402 }
7403 if let Some(limit) = &self.limit {
7404 write!(f, "limit={limit}&")?;
7405 }
7406
7407 Ok(())
7408 }
7409}
7410#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
7411pub struct UserSearchResponse {
7412 pub data: Option<Vec<User>>,
7413 pub ok: Option<bool>,
7414}
7415
7416#[derive(Debug, Clone, PartialEq, Default)]
7417pub struct UserListActivityFeedsQuery {
7418 pub only_performed_by: Option<bool>,
7420 pub date: Option<time::Date>,
7422 pub page: Option<u32>,
7424 pub limit: Option<u32>,
7426}
7427
7428impl std::fmt::Display for UserListActivityFeedsQuery {
7429 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7430 if let Some(only_performed_by) = &self.only_performed_by {
7431 write!(f, "only-performed-by={only_performed_by}&")?;
7432 }
7433 if let Some(date) = &self.date {
7434 write!(
7435 f,
7436 "date={field_name}&",
7437 field_name = date
7438 .format(&time::format_description::well_known::Rfc3339)
7439 .unwrap()
7440 )?;
7441 }
7442 if let Some(page) = &self.page {
7443 write!(f, "page={page}&")?;
7444 }
7445 if let Some(limit) = &self.limit {
7446 write!(f, "limit={limit}&")?;
7447 }
7448
7449 Ok(())
7450 }
7451}
7452
7453#[derive(Debug, Clone, PartialEq, Default)]
7454pub struct UserListFollowersQuery {
7455 pub page: Option<u32>,
7457 pub limit: Option<u32>,
7459}
7460
7461impl std::fmt::Display for UserListFollowersQuery {
7462 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7463 if let Some(page) = &self.page {
7464 write!(f, "page={page}&")?;
7465 }
7466 if let Some(limit) = &self.limit {
7467 write!(f, "limit={limit}&")?;
7468 }
7469
7470 Ok(())
7471 }
7472}
7473
7474#[derive(Debug, Clone, PartialEq, Default)]
7475pub struct UserListFollowingQuery {
7476 pub page: Option<u32>,
7478 pub limit: Option<u32>,
7480}
7481
7482impl std::fmt::Display for UserListFollowingQuery {
7483 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7484 if let Some(page) = &self.page {
7485 write!(f, "page={page}&")?;
7486 }
7487 if let Some(limit) = &self.limit {
7488 write!(f, "limit={limit}&")?;
7489 }
7490
7491 Ok(())
7492 }
7493}
7494
7495#[derive(Debug, Clone, PartialEq, Default)]
7496pub struct UserListGpgKeysQuery {
7497 pub page: Option<u32>,
7499 pub limit: Option<u32>,
7501}
7502
7503impl std::fmt::Display for UserListGpgKeysQuery {
7504 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7505 if let Some(page) = &self.page {
7506 write!(f, "page={page}&")?;
7507 }
7508 if let Some(limit) = &self.limit {
7509 write!(f, "limit={limit}&")?;
7510 }
7511
7512 Ok(())
7513 }
7514}
7515
7516#[derive(Debug, Clone, PartialEq, Default)]
7517pub struct UserListKeysQuery {
7518 pub fingerprint: Option<String>,
7520 pub page: Option<u32>,
7522 pub limit: Option<u32>,
7524}
7525
7526impl std::fmt::Display for UserListKeysQuery {
7527 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7528 if let Some(fingerprint) = &self.fingerprint {
7529 write!(f, "fingerprint={fingerprint}&")?;
7530 }
7531 if let Some(page) = &self.page {
7532 write!(f, "page={page}&")?;
7533 }
7534 if let Some(limit) = &self.limit {
7535 write!(f, "limit={limit}&")?;
7536 }
7537
7538 Ok(())
7539 }
7540}
7541
7542#[derive(Debug, Clone, PartialEq, Default)]
7543pub struct OrgListUserOrgsQuery {
7544 pub page: Option<u32>,
7546 pub limit: Option<u32>,
7548}
7549
7550impl std::fmt::Display for OrgListUserOrgsQuery {
7551 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7552 if let Some(page) = &self.page {
7553 write!(f, "page={page}&")?;
7554 }
7555 if let Some(limit) = &self.limit {
7556 write!(f, "limit={limit}&")?;
7557 }
7558
7559 Ok(())
7560 }
7561}
7562
7563#[derive(Debug, Clone, PartialEq, Default)]
7564pub struct UserListReposQuery {
7565 pub page: Option<u32>,
7567 pub limit: Option<u32>,
7569}
7570
7571impl std::fmt::Display for UserListReposQuery {
7572 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7573 if let Some(page) = &self.page {
7574 write!(f, "page={page}&")?;
7575 }
7576 if let Some(limit) = &self.limit {
7577 write!(f, "limit={limit}&")?;
7578 }
7579
7580 Ok(())
7581 }
7582}
7583
7584#[derive(Debug, Clone, PartialEq, Default)]
7585pub struct UserListStarredQuery {
7586 pub page: Option<u32>,
7588 pub limit: Option<u32>,
7590}
7591
7592impl std::fmt::Display for UserListStarredQuery {
7593 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7594 if let Some(page) = &self.page {
7595 write!(f, "page={page}&")?;
7596 }
7597 if let Some(limit) = &self.limit {
7598 write!(f, "limit={limit}&")?;
7599 }
7600
7601 Ok(())
7602 }
7603}
7604
7605#[derive(Debug, Clone, PartialEq, Default)]
7606pub struct UserListSubscriptionsQuery {
7607 pub page: Option<u32>,
7609 pub limit: Option<u32>,
7611}
7612
7613impl std::fmt::Display for UserListSubscriptionsQuery {
7614 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7615 if let Some(page) = &self.page {
7616 write!(f, "page={page}&")?;
7617 }
7618 if let Some(limit) = &self.limit {
7619 write!(f, "limit={limit}&")?;
7620 }
7621
7622 Ok(())
7623 }
7624}
7625
7626#[derive(Debug, Clone, PartialEq, Default)]
7627pub struct UserGetTokensQuery {
7628 pub page: Option<u32>,
7630 pub limit: Option<u32>,
7632}
7633
7634impl std::fmt::Display for UserGetTokensQuery {
7635 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7636 if let Some(page) = &self.page {
7637 write!(f, "page={page}&")?;
7638 }
7639 if let Some(limit) = &self.limit {
7640 write!(f, "limit={limit}&")?;
7641 }
7642
7643 Ok(())
7644 }
7645}