forgejo_api/generated/
structs.rs

1use crate::StructureError;
2use std::collections::BTreeMap;
3/// APIError is an api error with a message
4#[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/// ActionTask represents a ActionTask
59#[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/// ActionTaskResponse returns a ActionTask
81#[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/// ActionVariable return value of the query API
88#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
89pub struct ActionVariable {
90    /// the value of the variable
91    pub data: Option<String>,
92    /// the name of the variable
93    pub name: Option<String>,
94    /// the owner to which the variable belongs
95    pub owner_id: Option<i64>,
96    /// the repository to which the variable belongs
97    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    /// the type of action
112    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/// the type of action
120
121#[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/// ActivityPub type
179#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
180pub struct ActivityPub {
181    #[serde(rename = "@context")]
182    pub context: Option<String>,
183}
184
185/// AddCollaboratorOption options when adding a user as a collaborator of a repository
186#[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/// AddTimeOption options for adding time to an issue
201#[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    /// time in seconds
206    pub time: i64,
207    /// User who spent the time (optional)
208    pub user_name: Option<String>,
209}
210
211/// AnnotatedTag represents an annotated tag
212#[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/// AnnotatedTagObject contains meta information of the tag object
226#[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/// Attachment a generic attachment
236#[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/// Branch represents a repository branch
266#[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/// BranchProtection represents a branch protection for a repository
280#[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    /// Deprecated: true
289    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/// ChangeFileOperation for creating, updating or deleting a file
315#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
316pub struct ChangeFileOperation {
317    /// new or updated file content, must be base64 encoded
318    pub content: Option<String>,
319    /// old path of the file to move
320    pub from_path: Option<String>,
321    /// indicates what to do with the file
322    pub operation: ChangeFileOperationOperation,
323    /// path to the existing or new file
324    pub path: String,
325    /// sha is the SHA for the file that already exists, required for update or delete
326    pub sha: Option<String>,
327}
328
329/// indicates what to do with the file
330
331#[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/// ChangeFilesOptions options for creating, updating or deleting multiple files
341///
342/// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
343#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
344pub struct ChangeFilesOptions {
345    pub author: Option<Identity>,
346    /// branch (optional) to base this file from. if not given, the default branch is used
347    pub branch: Option<String>,
348    pub committer: Option<Identity>,
349    pub dates: Option<CommitDateOptions>,
350    /// list of file operations
351    pub files: Vec<ChangeFileOperation>,
352    /// message (optional) for the commit of this file. if not supplied, a default message will be used
353    pub message: Option<String>,
354    /// new_branch (optional) will make a new branch from `branch` before creating the file
355    pub new_branch: Option<String>,
356    /// Add a Signed-off-by trailer by the committer at the end of the commit log message.
357    pub signoff: Option<bool>,
358}
359
360/// ChangedFile store information about files affected by the pull request
361#[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/// CombinedStatus holds the combined state of several statuses for a single commit
378#[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/// Comment represents a comment on a commit or issue
392#[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/// CommitAffectedFiles store information about files affected by the commit
430#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
431pub struct CommitAffectedFiles {
432    pub filename: Option<String>,
433    pub status: Option<String>,
434}
435
436/// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
437#[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/// CommitStats is statistics for a RepoCommit
455#[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/// CommitStatus holds a single status of a single Commit
463#[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/// CommitStatusState holds the state of a CommitStatus
481///
482/// It can be "pending", "success", "error" and "failure"
483#[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/// ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
500#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
501pub struct ContentsResponse {
502    #[serde(rename = "_links")]
503    pub links: Option<FileLinksResponse>,
504    /// `content` is populated when `type` is `file`, otherwise null
505    pub content: Option<String>,
506    #[serde(deserialize_with = "crate::none_if_blank_url")]
507    pub download_url: Option<url::Url>,
508    /// `encoding` is populated when `type` is `file`, otherwise null
509    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    /// `submodule_git_url` is populated when `type` is `submodule`, otherwise null
521    pub submodule_git_url: Option<url::Url>,
522    /// `target` is populated when `type` is `symlink`, otherwise null
523    pub target: Option<String>,
524    /// `type` will be `file`, `dir`, `symlink`, or `submodule`
525    #[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/// CreateAccessTokenOption options when create access token
532#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
533pub struct CreateAccessTokenOption {
534    pub name: String,
535    pub scopes: Option<Vec<String>>,
536}
537
538/// CreateBranchProtectionOption options for creating a branch protection
539#[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    /// Deprecated: true
548    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/// CreateBranchRepoOption options when creating a branch in a repository
570#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
571pub struct CreateBranchRepoOption {
572    /// Name of the branch to create
573    pub new_branch_name: String,
574    /// Deprecated: true
575    ///
576    /// Name of the old branch to create from
577    pub old_branch_name: Option<String>,
578    /// Name of the old branch/tag/commit to create from
579    pub old_ref_name: Option<String>,
580}
581
582/// CreateEmailOption options when creating email addresses
583#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
584pub struct CreateEmailOption {
585    /// email addresses to add
586    pub emails: Option<Vec<String>>,
587}
588
589/// CreateFileOptions options for creating files
590///
591/// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
592#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
593pub struct CreateFileOptions {
594    pub author: Option<Identity>,
595    /// branch (optional) to base this file from. if not given, the default branch is used
596    pub branch: Option<String>,
597    pub committer: Option<Identity>,
598    /// content must be base64 encoded
599    pub content: String,
600    pub dates: Option<CommitDateOptions>,
601    /// message (optional) for the commit of this file. if not supplied, a default message will be used
602    pub message: Option<String>,
603    /// new_branch (optional) will make a new branch from `branch` before creating the file
604    pub new_branch: Option<String>,
605    /// Add a Signed-off-by trailer by the committer at the end of the commit log message.
606    pub signoff: Option<bool>,
607}
608
609/// CreateForkOption options for creating a fork
610#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
611pub struct CreateForkOption {
612    /// name of the forked repository
613    pub name: Option<String>,
614    /// organization name, if forking into an organization
615    pub organization: Option<String>,
616}
617
618/// CreateGPGKeyOption options create user GPG key
619#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
620pub struct CreateGPGKeyOption {
621    /// An armored GPG key to add
622    pub armored_public_key: String,
623    pub armored_signature: Option<String>,
624}
625
626/// CreateHookOption options when create a hook
627#[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/// CreateHookOptionConfig has all config options in it
664///
665/// required are "content_type" and "url" Required
666#[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/// CreateIssueCommentOption options for creating a comment on an issue
675#[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/// CreateIssueOption options to create one issue
683#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
684pub struct CreateIssueOption {
685    /// deprecated
686    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    /// list of label ids
693    pub labels: Option<Vec<i64>>,
694    /// milestone id
695    pub milestone: Option<i64>,
696    #[serde(rename = "ref")]
697    pub r#ref: Option<String>,
698    pub title: String,
699}
700
701/// CreateKeyOption options when creating a key
702#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
703pub struct CreateKeyOption {
704    /// An armored SSH key to add
705    pub key: String,
706    /// Describe if the key has only read access or read/write
707    pub read_only: Option<bool>,
708    /// Title of the key to add
709    pub title: String,
710}
711
712/// CreateLabelOption options for creating a label
713#[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/// CreateMilestoneOption options for creating a milestone
723#[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/// CreateOAuth2ApplicationOptions holds options to create an oauth2 application
740#[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/// CreateOrUpdateSecretOption options when creating or updating secret
748#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
749pub struct CreateOrUpdateSecretOption {
750    /// Data of the secret to update
751    pub data: String,
752}
753
754/// CreateOrgOption options for creating an organization
755#[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    /// possible values are `public` (default), `limited` or `private`
764    pub visibility: Option<CreateOrgOptionVisibility>,
765    pub website: Option<String>,
766}
767
768/// possible values are `public` (default), `limited` or `private`
769
770#[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/// CreatePullRequestOption options when creating a pull request
780#[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/// CreatePullReviewComment represent a review comment for creation api
795#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
796pub struct CreatePullReviewComment {
797    pub body: Option<String>,
798    /// if comment to new file line or 0
799    pub new_position: Option<i64>,
800    /// if comment to old file line or 0
801    pub old_position: Option<i64>,
802    /// the tree path
803    pub path: Option<String>,
804}
805
806/// CreatePullReviewCommentOptions are options to create a pull review comment
807#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
808pub struct CreatePullReviewCommentOptions {}
809
810/// CreatePullReviewOptions are options to create a pull review
811#[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/// CreateQutaGroupOptions represents the options for creating a quota group
830#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
831pub struct CreateQuotaGroupOptions {
832    /// Name of the quota group to create
833    pub name: Option<String>,
834    /// Rules to add to the newly created group.
835    ///
836    /// If a rule does not exist, it will be created.
837    pub rules: Option<Vec<CreateQuotaRuleOptions>>,
838}
839
840/// CreateQuotaRuleOptions represents the options for creating a quota rule
841#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
842pub struct CreateQuotaRuleOptions {
843    /// The limit set by the rule
844    pub limit: Option<i64>,
845    /// Name of the rule to create
846    pub name: Option<String>,
847    /// The subjects affected by the rule
848    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/// CreateReleaseOption options when creating a release
883#[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/// CreateRepoOption options when creating repository
895#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
896pub struct CreateRepoOption {
897    /// Whether the repository should be auto-initialized?
898    pub auto_init: Option<bool>,
899    /// DefaultBranch of the repository (used when initializes and in template)
900    pub default_branch: Option<String>,
901    /// Description of the repository to create
902    pub description: Option<String>,
903    /// Gitignores to use
904    pub gitignores: Option<String>,
905    /// Label-Set to use
906    pub issue_labels: Option<String>,
907    /// License to use
908    pub license: Option<String>,
909    /// Name of the repository to create
910    pub name: String,
911    pub object_format_name: Option<ObjectFormatName>,
912    /// Whether the repository is private
913    pub private: Option<bool>,
914    /// Readme of the repository to create
915    pub readme: Option<String>,
916    /// Whether the repository is template
917    pub template: Option<bool>,
918    /// TrustModel of the repository
919    pub trust_model: Option<CreateRepoOptionTrustModel>,
920}
921
922/// TrustModel of the repository
923
924#[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/// CreateStatusOption holds the information needed to create a new CommitStatus for a Commit
936#[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/// CreateTagOption options when creating a tag
946#[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/// CreateTagProtectionOption options for creating a tag protection
954#[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/// CreateTeamOption options for creating a team
962#[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/// CreateUserOption create user options
983#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
984pub struct CreateUserOption {
985    #[serde(with = "time::serde::rfc3339::option")]
986    /// For explicitly setting the user creation timestamp. Useful when users are
987    ///
988    /// migrated from other systems. When omitted, the user's creation timestamp
989    ///
990    /// will be set to "now".
991    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/// CreateVariableOption the option when creating variable
1005#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1006pub struct CreateVariableOption {
1007    /// Value of the variable to create
1008    pub value: String,
1009}
1010
1011/// CreateWikiPageOptions form for creating wiki
1012#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1013pub struct CreateWikiPageOptions {
1014    /// content must be base64 encoded
1015    pub content_base64: Option<String>,
1016    /// optional commit message summarizing the change
1017    pub message: Option<String>,
1018    /// page title. leave empty to keep unchanged
1019    pub title: Option<String>,
1020}
1021
1022/// Cron represents a Cron task
1023#[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/// DeleteEmailOption options when deleting email addresses
1048#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1049pub struct DeleteEmailOption {
1050    /// email addresses to delete
1051    pub emails: Option<Vec<String>>,
1052}
1053
1054/// DeleteFileOptions options for deleting files (used for other File structs below)
1055///
1056/// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
1057#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1058pub struct DeleteFileOptions {
1059    pub author: Option<Identity>,
1060    /// branch (optional) to base this file from. if not given, the default branch is used
1061    pub branch: Option<String>,
1062    pub committer: Option<Identity>,
1063    pub dates: Option<CommitDateOptions>,
1064    /// message (optional) for the commit of this file. if not supplied, a default message will be used
1065    pub message: Option<String>,
1066    /// new_branch (optional) will make a new branch from `branch` before creating the file
1067    pub new_branch: Option<String>,
1068    /// sha is the SHA for the file that already exists
1069    pub sha: String,
1070    /// Add a Signed-off-by trailer by the committer at the end of the commit log message.
1071    pub signoff: Option<bool>,
1072}
1073
1074/// DeleteLabelOption options for deleting a label
1075#[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/// DeployKey a deploy key
1082#[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/// DismissPullReviewOptions are options to dismiss a pull review
1098#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1099pub struct DismissPullReviewOptions {
1100    pub message: Option<String>,
1101    pub priors: Option<bool>,
1102}
1103
1104/// DispatchWorkflowOption options when dispatching a workflow
1105#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1106pub struct DispatchWorkflowOption {
1107    /// Input keys and values configured in the workflow file.
1108    pub inputs: Option<BTreeMap<String, String>>,
1109    /// Git reference for the workflow
1110    #[serde(rename = "ref")]
1111    pub r#ref: String,
1112}
1113
1114/// EditAttachmentOptions options for editing attachments
1115#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1116pub struct EditAttachmentOptions {
1117    #[serde(deserialize_with = "crate::none_if_blank_url")]
1118    /// (Can only be set if existing attachment is of external type)
1119    pub browser_download_url: Option<url::Url>,
1120    pub name: Option<String>,
1121}
1122
1123/// EditBranchProtectionOption options for editing a branch protection
1124#[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/// EditDeadlineOption options for creating a deadline
1152#[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/// EditGitHookOption options when modifying one Git hook
1159#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1160pub struct EditGitHookOption {
1161    pub content: Option<String>,
1162}
1163
1164/// EditHookOption options when modify one hook
1165#[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/// EditIssueCommentOption options for editing a comment
1175#[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/// EditIssueOption options for editing an issue
1183#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1184pub struct EditIssueOption {
1185    /// deprecated
1186    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/// EditLabelOption options for editing a label
1202#[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/// EditMilestoneOption options for editing a milestone
1212#[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/// EditOrgOption options for editing an organization
1222#[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    /// possible values are `public`, `limited` or `private`
1230    pub visibility: Option<EditOrgOptionVisibility>,
1231    pub website: Option<String>,
1232}
1233
1234/// possible values are `public`, `limited` or `private`
1235
1236#[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/// EditPullRequestOption options when modify pull request
1246#[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/// EditQuotaRuleOptions represents the options for editing a quota rule
1263#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1264pub struct EditQuotaRuleOptions {
1265    /// The limit set by the rule
1266    pub limit: Option<i64>,
1267    /// The subjects affected by the rule
1268    pub subjects: Option<Vec<String>>,
1269}
1270
1271/// EditReactionOption contain the reaction type
1272#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1273pub struct EditReactionOption {
1274    pub content: Option<String>,
1275}
1276
1277/// EditReleaseOption options when editing a release
1278#[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/// EditRepoOption options when editing a repository's properties
1290#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1291pub struct EditRepoOption {
1292    /// either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging.
1293    pub allow_fast_forward_only_merge: Option<bool>,
1294    /// either `true` to allow mark pr as merged manually, or `false` to prevent it.
1295    pub allow_manual_merge: Option<bool>,
1296    /// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.
1297    pub allow_merge_commits: Option<bool>,
1298    /// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.
1299    pub allow_rebase: Option<bool>,
1300    /// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits.
1301    pub allow_rebase_explicit: Option<bool>,
1302    /// either `true` to allow updating pull request branch by rebase, or `false` to prevent it.
1303    pub allow_rebase_update: Option<bool>,
1304    /// either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.
1305    pub allow_squash_merge: Option<bool>,
1306    /// set to `true` to archive this repository.
1307    pub archived: Option<bool>,
1308    /// either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.
1309    pub autodetect_manual_merge: Option<bool>,
1310    /// set to `true` to allow edits from maintainers by default
1311    pub default_allow_maintainer_edit: Option<bool>,
1312    /// sets the default branch for this repository.
1313    pub default_branch: Option<String>,
1314    /// set to `true` to delete pr branch after merge by default
1315    pub default_delete_branch_after_merge: Option<bool>,
1316    pub default_merge_style: Option<DefaultMergeStyle>,
1317    /// set to a update style to be used by this repository: "rebase" or "merge"
1318    pub default_update_style: Option<String>,
1319    /// a short description of the repository.
1320    pub description: Option<String>,
1321    /// enable prune - remove obsolete remote-tracking references when mirroring
1322    pub enable_prune: Option<bool>,
1323    pub external_tracker: Option<ExternalTracker>,
1324    pub external_wiki: Option<ExternalWiki>,
1325    /// set the globally editable state of the wiki
1326    pub globally_editable_wiki: Option<bool>,
1327    /// either `true` to enable actions unit, or `false` to disable them.
1328    pub has_actions: Option<bool>,
1329    /// either `true` to enable issues for this repository or `false` to disable them.
1330    pub has_issues: Option<bool>,
1331    /// either `true` to enable packages unit, or `false` to disable them.
1332    pub has_packages: Option<bool>,
1333    /// either `true` to enable project unit, or `false` to disable them.
1334    pub has_projects: Option<bool>,
1335    /// either `true` to allow pull requests, or `false` to prevent pull request.
1336    pub has_pull_requests: Option<bool>,
1337    /// either `true` to enable releases unit, or `false` to disable them.
1338    pub has_releases: Option<bool>,
1339    /// either `true` to enable the wiki for this repository or `false` to disable it.
1340    pub has_wiki: Option<bool>,
1341    /// either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.
1342    pub ignore_whitespace_conflicts: Option<bool>,
1343    pub internal_tracker: Option<InternalTracker>,
1344    /// set to a string like `8h30m0s` to set the mirror interval time
1345    pub mirror_interval: Option<String>,
1346    /// name of the repository
1347    pub name: Option<String>,
1348    /// either `true` to make the repository private or `false` to make it public.
1349    ///
1350    /// Note: you will get a 422 error if the organization restricts changing repository visibility to organization
1351    ///
1352    /// owners and a non-owner tries to change the value of private.
1353    pub private: Option<bool>,
1354    /// either `true` to make this repository a template or `false` to make it a normal repository
1355    pub template: Option<bool>,
1356    /// a URL with more information about the repository.
1357    pub website: Option<String>,
1358    /// sets the branch used for this repository's wiki.
1359    pub wiki_branch: Option<String>,
1360}
1361
1362/// EditTagProtectionOption options for editing a tag protection
1363#[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/// EditTeamOption options for editing a team
1371#[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/// EditUserOption edit user options
1392#[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/// Email an email address belonging to a user
1416#[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/// ExternalTracker represents settings for external tracker
1426#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1427pub struct ExternalTracker {
1428    /// External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.
1429    pub external_tracker_format: Option<String>,
1430    /// External Issue Tracker issue regular expression
1431    pub external_tracker_regexp_pattern: Option<String>,
1432    /// External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp`
1433    pub external_tracker_style: Option<String>,
1434    #[serde(deserialize_with = "crate::none_if_blank_url")]
1435    /// URL of external issue tracker.
1436    pub external_tracker_url: Option<url::Url>,
1437}
1438
1439/// ExternalWiki represents setting for external wiki
1440#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1441pub struct ExternalWiki {
1442    #[serde(deserialize_with = "crate::none_if_blank_url")]
1443    /// URL of external wiki.
1444    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/// FileDeleteResponse contains information about a repo's file that was deleted
1464#[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/// FileLinksResponse contains the links for a repo's file
1472#[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/// FileResponse contains information about a repo's file
1481#[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/// FilesResponse contains information about multiple files from a repo
1489#[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/// ForgeLike activity data type
1497#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1498pub struct ForgeLike {}
1499
1500/// GPGKey a user GPG key to sign commit and tag in repository
1501#[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/// GPGKeyEmail an email attached to a GPGKey
1521#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1522pub struct GPGKeyEmail {
1523    pub email: Option<String>,
1524    pub verified: Option<bool>,
1525}
1526
1527/// GeneralAPISettings contains global api settings exposed by it
1528#[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/// GeneralAttachmentSettings contains global Attachment settings exposed by API
1537#[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/// GeneralRepoSettings contains global repository settings exposed by API
1546#[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/// GeneralUISettings contains global ui settings exposed by API
1558#[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/// GenerateRepoOption options when creating repository using a template
1566#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1567pub struct GenerateRepoOption {
1568    /// include avatar of the template repo
1569    pub avatar: Option<bool>,
1570    /// Default branch of the new repository
1571    pub default_branch: Option<String>,
1572    /// Description of the repository to create
1573    pub description: Option<String>,
1574    /// include git content of default branch in template repo
1575    pub git_content: Option<bool>,
1576    /// include git hooks in template repo
1577    pub git_hooks: Option<bool>,
1578    /// include labels in template repo
1579    pub labels: Option<bool>,
1580    /// Name of the repository to create
1581    pub name: String,
1582    /// The organization or person who will own the new repository
1583    pub owner: String,
1584    /// Whether the repository is private
1585    pub private: Option<bool>,
1586    /// include protected branches in template repo
1587    pub protected_branch: Option<bool>,
1588    /// include topics in template repo
1589    pub topics: Option<bool>,
1590    /// include webhooks in template repo
1591    pub webhooks: Option<bool>,
1592}
1593
1594/// GitBlobResponse represents a git blob
1595#[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/// GitEntry represents a git tree
1606#[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/// GitHook represents a Git repository hook
1619#[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/// GitTreeResponse returns a git tree
1636#[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/// GitignoreTemplateInfo name and text of a gitignore template
1648#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1649pub struct GitignoreTemplateInfo {
1650    pub name: Option<String>,
1651    pub source: Option<String>,
1652}
1653
1654/// Hook a hook is a web hook when one repository changed
1655#[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    /// Deprecated: use Metadata instead
1661    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/// Identity for a person's identity like an author or committer
1677#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1678pub struct Identity {
1679    pub email: Option<String>,
1680    pub name: Option<String>,
1681}
1682
1683/// InternalTracker represents settings for internal tracker
1684#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1685pub struct InternalTracker {
1686    /// Let only contributors track time (Built-in issue tracker)
1687    pub allow_only_contributors_to_track_time: Option<bool>,
1688    /// Enable dependencies for issues and pull requests (Built-in issue tracker)
1689    pub enable_issue_dependencies: Option<bool>,
1690    /// Enable time tracking (Built-in issue tracker)
1691    pub enable_time_tracker: Option<bool>,
1692}
1693
1694/// Issue represents an issue in a repository
1695#[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/// IssueDeadline represents an issue deadline
1752#[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/// IssueFormField represents a form field
1759#[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/// IssueFormFieldVisible defines issue form field visible
1773#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1774pub struct IssueFormFieldVisible {}
1775
1776/// IssueLabelsOption a collection of labels
1777#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1778pub struct IssueLabelsOption {
1779    /// Labels can be a list of integers representing label IDs
1780    ///
1781    /// or a list of strings representing label names
1782    pub labels: Option<Vec<serde_json::Value>>,
1783    #[serde(with = "time::serde::rfc3339::option")]
1784    pub updated_at: Option<time::OffsetDateTime>,
1785}
1786
1787/// IssueMeta basic issue information
1788#[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/// IssueTemplate represents an issue template for a repository
1796#[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/// Label a label to an issue or a pr
1810#[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/// LabelTemplate info of a Label template
1823#[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/// LicensesInfo contains information about a License
1832#[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/// LicensesListEntry is used for the API
1843#[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/// MarkdownOption markdown options
1852#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1853pub struct MarkdownOption {
1854    /// Context to render
1855    ///
1856    ///
1857    ///
1858    /// in: body
1859    #[serde(rename = "Context")]
1860    pub context: Option<String>,
1861    /// Mode to render (comment, gfm, markdown)
1862    ///
1863    ///
1864    ///
1865    /// in: body
1866    #[serde(rename = "Mode")]
1867    pub mode: Option<String>,
1868    /// Text markdown to render
1869    ///
1870    ///
1871    ///
1872    /// in: body
1873    #[serde(rename = "Text")]
1874    pub text: Option<String>,
1875    /// Is it a wiki page ?
1876    ///
1877    ///
1878    ///
1879    /// in: body
1880    #[serde(rename = "Wiki")]
1881    pub wiki: Option<bool>,
1882}
1883
1884/// MarkupOption markup options
1885#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
1886pub struct MarkupOption {
1887    /// The current branch path where the form gets posted
1888    ///
1889    ///
1890    ///
1891    /// in: body
1892    #[serde(rename = "BranchPath")]
1893    pub branch_path: Option<String>,
1894    /// Context to render
1895    ///
1896    ///
1897    ///
1898    /// in: body
1899    #[serde(rename = "Context")]
1900    pub context: Option<String>,
1901    /// File path for detecting extension in file mode
1902    ///
1903    ///
1904    ///
1905    /// in: body
1906    #[serde(rename = "FilePath")]
1907    pub file_path: Option<String>,
1908    /// Mode to render (comment, gfm, markdown, file)
1909    ///
1910    ///
1911    ///
1912    /// in: body
1913    #[serde(rename = "Mode")]
1914    pub mode: Option<String>,
1915    /// Text markup to render
1916    ///
1917    ///
1918    ///
1919    /// in: body
1920    #[serde(rename = "Text")]
1921    pub text: Option<String>,
1922    /// Is it a wiki page ?
1923    ///
1924    ///
1925    ///
1926    /// in: body
1927    #[serde(rename = "Wiki")]
1928    pub wiki: Option<bool>,
1929}
1930
1931/// MergePullRequestForm form for merging Pull Request
1932#[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/// MigrateRepoOptions options for migrating repository's
1964///
1965/// this is used to interact with api v1
1966#[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    /// Name of User or Organisation who will own Repo after migration
1985    pub repo_owner: Option<String>,
1986    pub service: Option<MigrateRepoOptionsService>,
1987    /// deprecated (only for backwards compatibility)
1988    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/// Milestone milestone is a collection of issues on one repository
2012#[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/// NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed
2031#[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/// NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks
2038#[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/// NodeInfoServices contains the third party sites this server can connect to via their application API
2051#[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/// NodeInfoSoftware contains Metadata about server software in use
2058#[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/// NodeInfoUsage contains usage statistics for this server
2067#[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/// NodeInfoUsageUsers contains statistics about the users of this server
2077#[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/// Note contains information related to a git note
2087#[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/// NotificationCount number of unread notifications
2099#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2100pub struct NotificationCount {
2101    pub new: Option<i64>,
2102}
2103
2104/// NotificationSubject contains the notification subject (Issue/Pull/Commit)
2105#[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/// NotificationThread expose Notification on API
2122#[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/// NotifySubjectType represent type of notification subject
2136#[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/// ObjectFormatName of the underlying git repository
2152
2153#[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/// Organization represents an organization
2161#[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    /// deprecated
2173    pub username: Option<String>,
2174    pub visibility: Option<String>,
2175    pub website: Option<String>,
2176}
2177
2178/// OrganizationPermissions list different users permissions on an organization
2179#[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/// PRBranchInfo information about a branch
2189#[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/// Package represents a package
2200#[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/// PackageFile represents a package file
2217#[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/// PayloadCommit represents a commit
2230#[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    /// sha1 hash of the commit
2236    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/// PayloadCommitVerification represents the GPG verification of a commit
2248#[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/// PayloadUser represents the author or committer of a commit
2258#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2259pub struct PayloadUser {
2260    pub email: Option<String>,
2261    /// Full name of the commit author
2262    pub name: Option<String>,
2263    pub username: Option<String>,
2264}
2265
2266/// Permission represents a set of permissions
2267#[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/// PublicKey publickey is a user key to push code to repository
2275#[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/// PullRequest represents a pull request
2291#[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    /// number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)
2333    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/// PullRequestMeta PR info if an issue is a PR
2344#[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/// PullReview represents a pull request review
2355#[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/// PullReviewComment represents a comment on a pull request review
2378#[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/// PullReviewRequestOptions are options to add or remove pull review requests
2402#[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/// PushMirror represents information of a push mirror
2409#[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/// QuotaGroup represents a quota group
2425#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2426pub struct QuotaGroup {
2427    /// Name of the group
2428    pub name: Option<String>,
2429    /// Rules associated with the group
2430    pub rules: Option<Vec<QuotaRuleInfo>>,
2431}
2432
2433/// QuotaInfo represents information about a user's quota
2434#[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/// QuotaRuleInfo contains information about a quota rule
2441#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2442pub struct QuotaRuleInfo {
2443    /// The limit set by the rule
2444    pub limit: Option<i64>,
2445    /// Name of the rule (only shown to admins)
2446    pub name: Option<String>,
2447    /// Subjects the rule affects
2448    pub subjects: Option<Vec<String>>,
2449}
2450
2451/// QuotaUsed represents the quota usage of a user
2452#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2453pub struct QuotaUsed {
2454    pub size: Option<QuotaUsedSize>,
2455}
2456
2457/// QuotaUsedArtifact represents an artifact counting towards a user's quota
2458#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2459pub struct QuotaUsedArtifact {
2460    #[serde(deserialize_with = "crate::none_if_blank_url")]
2461    /// HTML URL to the action run containing the artifact
2462    pub html_url: Option<url::Url>,
2463    /// Name of the artifact
2464    pub name: Option<String>,
2465    /// Size of the artifact (compressed)
2466    pub size: Option<i64>,
2467}
2468
2469/// QuotaUsedAttachment represents an attachment counting towards a user's quota
2470#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2471pub struct QuotaUsedAttachment {
2472    #[serde(deserialize_with = "crate::none_if_blank_url")]
2473    /// API URL for the attachment
2474    pub api_url: Option<url::Url>,
2475    /// Context for the attachment: URLs to the containing object
2476    pub contained_in: Option<QuotaUsedAttachmentContainedIn>,
2477    /// Filename of the attachment
2478    pub name: Option<String>,
2479    /// Size of the attachment (in bytes)
2480    pub size: Option<i64>,
2481}
2482
2483/// Context for the attachment: URLs to the containing object
2484#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2485pub struct QuotaUsedAttachmentContainedIn {
2486    #[serde(deserialize_with = "crate::none_if_blank_url")]
2487    /// API URL for the object that contains this attachment
2488    pub api_url: Option<url::Url>,
2489    #[serde(deserialize_with = "crate::none_if_blank_url")]
2490    /// HTML URL for the object that contains this attachment
2491    pub html_url: Option<url::Url>,
2492}
2493
2494/// QuotaUsedPackage represents a package counting towards a user's quota
2495#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2496pub struct QuotaUsedPackage {
2497    #[serde(deserialize_with = "crate::none_if_blank_url")]
2498    /// HTML URL to the package version
2499    pub html_url: Option<url::Url>,
2500    /// Name of the package
2501    pub name: Option<String>,
2502    /// Size of the package version
2503    pub size: Option<i64>,
2504    /// Type of the package
2505    #[serde(rename = "type")]
2506    pub r#type: Option<String>,
2507    /// Version of the package
2508    pub version: Option<String>,
2509}
2510
2511/// QuotaUsedSize represents the size-based quota usage of a user
2512#[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/// QuotaUsedSizeAssets represents the size-based asset usage of a user
2520#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2521pub struct QuotaUsedSizeAssets {
2522    /// Storage size used for the user's artifacts
2523    pub artifacts: Option<i64>,
2524    pub attachments: Option<QuotaUsedSizeAssetsAttachments>,
2525    pub packages: Option<QuotaUsedSizeAssetsPackages>,
2526}
2527
2528/// QuotaUsedSizeAssetsAttachments represents the size-based attachment quota usage of a user
2529#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2530pub struct QuotaUsedSizeAssetsAttachments {
2531    /// Storage size used for the user's issue & comment attachments
2532    pub issues: Option<i64>,
2533    /// Storage size used for the user's release attachments
2534    pub releases: Option<i64>,
2535}
2536
2537/// QuotaUsedSizeAssetsPackages represents the size-based package quota usage of a user
2538#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2539pub struct QuotaUsedSizeAssetsPackages {
2540    /// Storage suze used for the user's packages
2541    pub all: Option<i64>,
2542}
2543
2544/// QuotaUsedSizeGit represents the size-based git (lfs) quota usage of a user
2545#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2546pub struct QuotaUsedSizeGit {
2547    /// Storage size of the user's Git LFS objects
2548    #[serde(rename = "LFS")]
2549    pub lfs: Option<i64>,
2550}
2551
2552/// QuotaUsedSizeRepos represents the size-based repository quota usage of a user
2553#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2554pub struct QuotaUsedSizeRepos {
2555    /// Storage size of the user's private repositories
2556    pub private: Option<i64>,
2557    /// Storage size of the user's public repositories
2558    pub public: Option<i64>,
2559}
2560
2561/// Reaction contain one reaction
2562#[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/// Release represents a repository release
2580#[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/// RenameUserOption options when renaming a user
2610#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2611pub struct RenameUserOption {
2612    /// New username for this user. This name cannot be in use yet by any other user.
2613    pub new_username: String,
2614}
2615
2616/// ReplaceFlagsOption options when replacing the flags of a repository
2617#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2618pub struct ReplaceFlagsOption {
2619    pub flags: Option<Vec<String>>,
2620}
2621
2622/// RepoCollaboratorPermission to get repository permission for a collaborator
2623#[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/// RepoTopicOptions a collection of repo topic names
2642#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2643pub struct RepoTopicOptions {
2644    /// list of topic names
2645    pub topics: Option<Vec<String>>,
2646}
2647
2648/// RepoTransfer represents a pending repo transfer
2649#[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/// Repository represents a repository
2657#[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/// RepositoryMeta basic repository information
2736#[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/// ReviewStateType review state type
2745#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2746pub struct ReviewStateType {}
2747
2748/// SearchResults results of a successful search
2749#[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/// Secret represents a secret
2756#[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    /// the secret's name
2761    pub name: Option<String>,
2762}
2763
2764/// ServerVersion wraps the version of the server
2765#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2766pub struct ServerVersion {
2767    pub version: Option<String>,
2768}
2769
2770/// SetUserQuotaGroupsOptions represents the quota groups of a user
2771#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2772pub struct SetUserQuotaGroupsOptions {
2773    /// Quota groups the user shall have
2774    pub groups: Vec<String>,
2775}
2776
2777/// StateType issue state type
2778
2779#[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/// StopWatch represent a running stopwatch
2787#[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/// SubmitPullReviewOptions are options to submit a pending pull review
2800#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2801pub struct SubmitPullReviewOptions {
2802    pub body: Option<String>,
2803    pub event: Option<String>,
2804}
2805
2806/// Tag represents a repository tag
2807#[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/// TagArchiveDownloadCount counts how many times a archive was downloaded
2821#[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/// TagProtection represents a tag protection
2828#[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/// Team represents a team in an organization
2841#[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/// TimeStamp defines a timestamp
2868#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2869pub struct TimeStamp {}
2870
2871/// TimelineComment represents a timeline comment (comment of any type) on a commit or issue
2872#[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    /// commit SHA where issue/PR was referenced
2899    pub ref_commit_sha: Option<String>,
2900    pub ref_issue: Option<Issue>,
2901    /// whether the assignees were removed or added
2902    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/// TopicName a list of repo topic names
2914#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2915pub struct TopicName {
2916    pub topics: Option<Vec<String>>,
2917}
2918
2919/// TopicResponse for returning topics
2920#[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/// TrackedTime worked time for an issue / pr
2932#[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    /// deprecated (only for backwards compatibility)
2939    pub issue_id: Option<i64>,
2940    /// Time in seconds
2941    pub time: Option<i64>,
2942    /// deprecated (only for backwards compatibility)
2943    pub user_id: Option<i64>,
2944    pub user_name: Option<String>,
2945}
2946
2947/// TransferRepoOption options when transfer a repository's ownership
2948#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2949pub struct TransferRepoOption {
2950    pub new_owner: String,
2951    /// ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
2952    pub team_ids: Option<Vec<i64>>,
2953}
2954
2955/// UpdateBranchRepoOption options when updating a branch in a repository
2956#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2957pub struct UpdateBranchRepoOption {
2958    /// New branch name
2959    pub name: String,
2960}
2961
2962/// UpdateFileOptions options for updating files
2963///
2964/// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
2965#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2966pub struct UpdateFileOptions {
2967    pub author: Option<Identity>,
2968    /// branch (optional) to base this file from. if not given, the default branch is used
2969    pub branch: Option<String>,
2970    pub committer: Option<Identity>,
2971    /// content must be base64 encoded
2972    pub content: String,
2973    pub dates: Option<CommitDateOptions>,
2974    /// from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL
2975    pub from_path: Option<String>,
2976    /// message (optional) for the commit of this file. if not supplied, a default message will be used
2977    pub message: Option<String>,
2978    /// new_branch (optional) will make a new branch from `branch` before creating the file
2979    pub new_branch: Option<String>,
2980    /// sha is the SHA for the file that already exists
2981    pub sha: String,
2982    /// Add a Signed-off-by trailer by the committer at the end of the commit log message.
2983    pub signoff: Option<bool>,
2984}
2985
2986/// UpdateRepoAvatarUserOption options when updating the repo avatar
2987#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2988pub struct UpdateRepoAvatarOption {
2989    /// image must be base64 encoded
2990    pub image: Option<String>,
2991}
2992
2993/// UpdateUserAvatarUserOption options when updating the user avatar
2994#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
2995pub struct UpdateUserAvatarOption {
2996    /// image must be base64 encoded
2997    pub image: Option<String>,
2998}
2999
3000/// UpdateVariableOption the option when updating variable
3001#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3002pub struct UpdateVariableOption {
3003    /// New name for the variable. If the field is empty, the variable name won't be updated.
3004    pub name: Option<String>,
3005    /// Value of the variable to update
3006    pub value: String,
3007}
3008
3009/// User represents a user
3010#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3011pub struct User {
3012    /// Is user active
3013    pub active: Option<bool>,
3014    #[serde(deserialize_with = "crate::none_if_blank_url")]
3015    /// URL to the user's avatar
3016    pub avatar_url: Option<url::Url>,
3017    #[serde(with = "time::serde::rfc3339::option")]
3018    pub created: Option<time::OffsetDateTime>,
3019    /// the user's description
3020    pub description: Option<String>,
3021    pub email: Option<String>,
3022    /// user counts
3023    pub followers_count: Option<i64>,
3024    pub following_count: Option<i64>,
3025    /// the user's full name
3026    pub full_name: Option<String>,
3027    #[serde(deserialize_with = "crate::none_if_blank_url")]
3028    /// URL to the user's Forgejo page
3029    pub html_url: Option<url::Url>,
3030    /// the user's id
3031    pub id: Option<i64>,
3032    /// Is the user an administrator
3033    pub is_admin: Option<bool>,
3034    /// User locale
3035    pub language: Option<String>,
3036    #[serde(with = "time::serde::rfc3339::option")]
3037    pub last_login: Option<time::OffsetDateTime>,
3038    /// the user's location
3039    pub location: Option<String>,
3040    /// the user's username
3041    pub login: Option<String>,
3042    /// the user's authentication sign-in name.
3043    pub login_name: Option<String>,
3044    /// Is user login prohibited
3045    pub prohibit_login: Option<bool>,
3046    /// the user's pronouns
3047    pub pronouns: Option<String>,
3048    /// Is user restricted
3049    pub restricted: Option<bool>,
3050    /// The ID of the user's Authentication Source
3051    pub source_id: Option<i64>,
3052    pub starred_repos_count: Option<i64>,
3053    /// User visibility level option: public, limited, private
3054    pub visibility: Option<String>,
3055    /// the user's website
3056    pub website: Option<String>,
3057}
3058
3059/// UserHeatmapData represents the data needed to create a heatmap
3060#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3061pub struct UserHeatmapData {
3062    pub contributions: Option<i64>,
3063    pub timestamp: Option<i64>,
3064}
3065
3066/// UserSettings represents user settings
3067#[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    /// Privacy
3075    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/// UserSettingsOptions represents options to change user settings
3084#[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    /// Privacy
3092    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/// WatchInfo represents an API watch status of one repository
3101#[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/// WikiCommit page commit/revision
3115#[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/// WikiCommitList commit/revision list
3124#[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/// WikiPage a wiki page
3131#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3132pub struct WikiPage {
3133    pub commit_count: Option<i64>,
3134    /// Page content, base64 encoded
3135    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/// WikiPageMetaData wiki page meta information
3146#[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    /// page number of results to return (1-based)
4101    pub page: Option<u32>,
4102    /// page size of results
4103    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    /// page number of results to return (1-based)
4122    pub page: Option<u32>,
4123    /// page size of results
4124    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    /// keyword
4143    pub q: Option<String>,
4144    /// page number of results to return (1-based)
4145    pub page: Option<u32>,
4146    /// page size of results
4147    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    /// page number of results to return (1-based)
4169    pub page: Option<u32>,
4170    /// page size of results
4171    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    /// page number of results to return (1-based)
4190    pub page: Option<u32>,
4191    /// page size of results
4192    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    /// page number of results to return (1-based)
4211    pub page: Option<u32>,
4212    /// page size of results
4213    pub limit: Option<u32>,
4214    /// pattern of repositories to search for
4215    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    /// ID of the user's login source to search for
4237    pub source_id: Option<u64>,
4238    /// user's login name to search for
4239    pub login_name: Option<String>,
4240    /// sort order of results
4241    pub sort: Option<AdminSearchUsersQuerySort>,
4242    /// page number of results to return (1-based)
4243    pub page: Option<u32>,
4244    /// page size of results
4245    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    /// purge the user from the system completely
4301    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    /// If true, show notifications marked as read. Default value is false
4317    pub all: Option<bool>,
4318    /// Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned.
4319    pub status_types: Option<Vec<String>>,
4320    /// filter notifications by subject type
4321    pub subject_type: Option<Vec<NotifyGetListQuerySubjectType>>,
4322    /// Only show notifications updated after the given time. This is a timestamp in RFC 3339 format
4323    pub since: Option<time::OffsetDateTime>,
4324    /// Only show notifications updated before the given time. This is a timestamp in RFC 3339 format
4325    pub before: Option<time::OffsetDateTime>,
4326    /// page number of results to return (1-based)
4327    pub page: Option<u32>,
4328    /// page size of results
4329    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    /// Describes the last point that notifications were checked. Anything updated since this time will not be updated.
4409    pub last_read_at: Option<time::OffsetDateTime>,
4410    /// If true, mark all notifications on this repo. Default value is false
4411    pub all: Option<String>,
4412    /// Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.
4413    pub status_types: Option<Vec<String>>,
4414    /// Status to mark notifications as, Defaults to read.
4415    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    /// Status to mark notifications as
4452    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    /// page number of results to return (1-based)
4468    pub page: Option<u32>,
4469    /// page size of results
4470    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    /// page number of results to return (1-based)
4489    pub page: Option<u32>,
4490    /// page size of results
4491    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    /// page number of results to return (1-based)
4510    pub page: Option<u32>,
4511    /// page size of results
4512    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    /// the date of the activities to be found
4531    pub date: Option<time::Date>,
4532    /// page number of results to return (1-based)
4533    pub page: Option<u32>,
4534    /// page size of results
4535    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    /// page number of results to return (1-based)
4563    pub page: Option<u32>,
4564    /// page size of results
4565    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    /// page number of results to return (1-based)
4584    pub page: Option<u32>,
4585    /// page size of results
4586    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    /// page number of results to return (1-based)
4605    pub page: Option<u32>,
4606    /// page size of results
4607    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    /// page number of results to return (1-based)
4626    pub page: Option<u32>,
4627    /// page size of results
4628    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    /// page number of results to return (1-based)
4647    pub page: Option<u32>,
4648    /// page size of results
4649    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    /// page number of results to return (1-based)
4668    pub page: Option<u32>,
4669    /// page size of results
4670    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    /// page number of results to return (1-based)
4689    pub page: Option<u32>,
4690    /// page size of results
4691    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    /// page number of results to return (1-based)
4710    pub page: Option<u32>,
4711    /// page size of results
4712    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    /// page number of results to return (1-based)
4731    pub page: Option<u32>,
4732    /// page size of results
4733    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    /// page number of results to return (1-based)
4752    pub page: Option<u32>,
4753    /// page size of results
4754    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    /// keywords to search
4773    pub q: Option<String>,
4774    /// include search within team description (defaults to true)
4775    pub include_desc: Option<bool>,
4776    /// page number of results to return (1-based)
4777    pub page: Option<u32>,
4778    /// page size of results
4779    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    /// page number of results to return (1-based)
4809    pub page: Option<u32>,
4810    /// page size of results
4811    pub limit: Option<u32>,
4812    /// package type filter
4813    pub r#type: Option<ListPackagesQueryType>,
4814    /// name filter
4815    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    /// State of the issue
4913    pub state: Option<IssueSearchIssuesQueryState>,
4914    /// Comma-separated list of label names. Fetch only issues that have any of these labels. Non existent labels are discarded.
4915    pub labels: Option<String>,
4916    /// Comma-separated list of milestone names. Fetch only issues that have any of these milestones. Non existent milestones are discarded.
4917    pub milestones: Option<String>,
4918    /// Search string
4919    pub q: Option<String>,
4920    /// Repository ID to prioritize in the results
4921    pub priority_repo_id: Option<u64>,
4922    /// Filter by issue type
4923    pub r#type: Option<IssueSearchIssuesQueryType>,
4924    /// Only show issues updated after the given time (RFC 3339 format)
4925    pub since: Option<time::OffsetDateTime>,
4926    /// Only show issues updated before the given time (RFC 3339 format)
4927    pub before: Option<time::OffsetDateTime>,
4928    /// Filter issues or pulls assigned to the authenticated user
4929    pub assigned: Option<bool>,
4930    /// Filter issues or pulls created by the authenticated user
4931    pub created: Option<bool>,
4932    /// Filter issues or pulls mentioning the authenticated user
4933    pub mentioned: Option<bool>,
4934    /// Filter pull requests where the authenticated user's review was requested
4935    pub review_requested: Option<bool>,
4936    /// Filter pull requests reviewed by the authenticated user
4937    pub reviewed: Option<bool>,
4938    /// Filter by repository owner
4939    pub owner: Option<String>,
4940    /// Filter by team (requires organization owner parameter)
4941    pub team: Option<String>,
4942    /// Page number of results to return (1-based)
4943    pub page: Option<u32>,
4944    /// Number of items per page
4945    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    /// keyword
5057    pub q: Option<String>,
5058    /// Limit search to repositories with keyword as topic
5059    pub topic: Option<bool>,
5060    /// include search of keyword within repository description
5061    pub include_desc: Option<bool>,
5062    /// search only for repos that the user with the given id owns or contributes to
5063    pub uid: Option<u64>,
5064    /// repo owner to prioritize in the results
5065    pub priority_owner_id: Option<u64>,
5066    /// search only for repos that belong to the given team id
5067    pub team_id: Option<u64>,
5068    /// search only for repos that the user with the given id has starred
5069    pub starred_by: Option<u64>,
5070    /// include private repositories this user has access to (defaults to true)
5071    pub private: Option<bool>,
5072    /// show only pubic, private or all repositories (defaults to all)
5073    pub is_private: Option<bool>,
5074    /// include template repositories this user has access to (defaults to true)
5075    pub template: Option<bool>,
5076    /// show only archived, non-archived or all repositories (defaults to all)
5077    pub archived: Option<bool>,
5078    /// type of repository to search for. Supported values are "fork", "source", "mirror" and "collaborative"
5079    pub mode: Option<String>,
5080    /// if `uid` is given, search only for repos that the user owns
5081    pub exclusive: Option<bool>,
5082    /// sort repos by attribute. Supported values are "alpha", "created", "updated", "size", "git_size", "lfs_size", "stars", "forks" and "id". Default is "alpha"
5083    pub sort: Option<String>,
5084    /// sort order, either "asc" (ascending) or "desc" (descending). Default is "asc", ignored if "sort" is not specified.
5085    pub order: Option<String>,
5086    /// page number of results to return (1-based)
5087    pub page: Option<u32>,
5088    /// page size of results
5089    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    /// page number of results to return (1-based)
5153    pub page: Option<u32>,
5154    /// page size of results
5155    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    /// page number of results to return (1-based)
5174    pub page: Option<u32>,
5175    /// page size of results, default maximum page size is 50
5176    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    /// page number of results to return (1-based)
5195    pub page: Option<u32>,
5196    /// page size of results
5197    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    /// the date of the activities to be found
5216    pub date: Option<time::Date>,
5217    /// page number of results to return (1-based)
5218    pub page: Option<u32>,
5219    /// page size of results
5220    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    /// page number of results to return (1-based)
5248    pub page: Option<u32>,
5249    /// page size of results
5250    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    /// page number of results to return (1-based)
5269    pub page: Option<u32>,
5270    /// page size of results
5271    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    /// SHA or branch to start listing commits from (usually 'master')
5290    pub sha: Option<String>,
5291    /// filepath of a file/dir
5292    pub path: Option<String>,
5293    /// include diff stats for every commit (disable for speedup, default 'true')
5294    pub stat: Option<bool>,
5295    /// include verification for every commit (disable for speedup, default 'true')
5296    pub verification: Option<bool>,
5297    /// include a list of affected files for every commit (disable for speedup, default 'true')
5298    pub files: Option<bool>,
5299    /// page number of results to return (1-based)
5300    pub page: Option<u32>,
5301    /// page size of results (ignored if used with 'path')
5302    pub limit: Option<u32>,
5303    /// commits that match the given specifier will not be listed.
5304    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    /// page number of results to return (1-based)
5341    pub page: Option<u32>,
5342    /// page size of results
5343    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    /// type of sort
5362    pub sort: Option<RepoListStatusesByRefQuerySort>,
5363    /// type of state
5364    pub state: Option<RepoListStatusesByRefQueryState>,
5365    /// page number of results to return (1-based)
5366    pub page: Option<u32>,
5367    /// page size of results
5368    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    /// The name of the commit/branch/tag. Default the repository’s default branch (usually master)
5444    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    /// The name of the commit/branch/tag. Default the repository’s default branch (usually master)
5460    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    /// The name of the commit/branch/tag. Default the repository’s default branch (usually master)
5476    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    /// page number of results to return (1-based)
5492    pub page: Option<u32>,
5493    /// page size of results
5494    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    /// include diff stats for every commit (disable for speedup, default 'true')
5513    pub stat: Option<bool>,
5514    /// include verification for every commit (disable for speedup, default 'true')
5515    pub verification: Option<bool>,
5516    /// include a list of affected files for every commit (disable for speedup, default 'true')
5517    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    /// include verification for every commit (disable for speedup, default 'true')
5539    pub verification: Option<bool>,
5540    /// include a list of affected files for every commit (disable for speedup, default 'true')
5541    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    /// show all directories and files
5560    pub recursive: Option<bool>,
5561    /// page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page
5562    pub page: Option<u32>,
5563    /// number of items per page
5564    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    /// page number of results to return (1-based)
5586    pub page: Option<u32>,
5587    /// page size of results
5588    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    /// The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload.
5607    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    /// whether issue is open or closed
5623    pub state: Option<IssueListIssuesQueryState>,
5624    /// comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded
5625    pub labels: Option<String>,
5626    /// search string
5627    pub q: Option<String>,
5628    /// filter by type (issues / pulls) if set
5629    pub r#type: Option<IssueListIssuesQueryType>,
5630    /// comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded
5631    pub milestones: Option<String>,
5632    /// Only show items updated after the given time. This is a timestamp in RFC 3339 format
5633    pub since: Option<time::OffsetDateTime>,
5634    /// Only show items updated before the given time. This is a timestamp in RFC 3339 format
5635    pub before: Option<time::OffsetDateTime>,
5636    /// Only show items which were created by the given user
5637    pub created_by: Option<String>,
5638    /// Only show items for which the given user is assigned
5639    pub assigned_by: Option<String>,
5640    /// Only show items in which the given user was mentioned
5641    pub mentioned_by: Option<String>,
5642    /// page number of results to return (1-based)
5643    pub page: Option<u32>,
5644    /// page size of results
5645    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    /// if provided, only comments updated since the provided time are returned.
5742    pub since: Option<time::OffsetDateTime>,
5743    /// if provided, only comments updated before the provided time are returned.
5744    pub before: Option<time::OffsetDateTime>,
5745    /// page number of results to return (1-based)
5746    pub page: Option<u32>,
5747    /// page size of results
5748    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    /// name of the attachment
5785    pub name: Option<String>,
5786    /// time of the attachment's creation. This is a timestamp in RFC 3339 format
5787    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    /// name of the attachment
5812    pub name: Option<String>,
5813    /// time of the attachment's creation. This is a timestamp in RFC 3339 format
5814    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    /// page number of results to return (1-based)
5839    pub page: Option<u32>,
5840    /// page size of results
5841    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    /// if provided, only comments updated since the specified time are returned.
5860    pub since: Option<time::OffsetDateTime>,
5861    /// if provided, only comments updated before the provided time are returned.
5862    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    /// page number of results to return (1-based)
5893    pub page: Option<u32>,
5894    /// page size of results
5895    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    /// page number of results to return (1-based)
5914    pub page: Option<u32>,
5915    /// page size of results
5916    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    /// page number of results to return (1-based)
5935    pub page: Option<u32>,
5936    /// page size of results
5937    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    /// if provided, only comments updated since the specified time are returned.
5956    pub since: Option<time::OffsetDateTime>,
5957    /// page number of results to return (1-based)
5958    pub page: Option<u32>,
5959    /// page size of results
5960    pub limit: Option<u32>,
5961    /// if provided, only comments updated before the provided time are returned.
5962    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    /// optional filter by user (available for issue managers)
5999    pub user: Option<String>,
6000    /// Only show times updated after the given time. This is a timestamp in RFC 3339 format
6001    pub since: Option<time::OffsetDateTime>,
6002    /// Only show times updated before the given time. This is a timestamp in RFC 3339 format
6003    pub before: Option<time::OffsetDateTime>,
6004    /// page number of results to return (1-based)
6005    pub page: Option<u32>,
6006    /// page size of results
6007    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    /// the key_id to search for
6047    pub key_id: Option<u32>,
6048    /// fingerprint of the key
6049    pub fingerprint: Option<String>,
6050    /// page number of results to return (1-based)
6051    pub page: Option<u32>,
6052    /// page size of results
6053    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    /// page number of results to return (1-based)
6078    pub page: Option<u32>,
6079    /// page size of results
6080    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    /// The name of the commit/branch/tag. Default the repository’s default branch (usually master)
6099    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    /// Milestone state, Recognized values are open, closed and all. Defaults to "open"
6115    pub state: Option<String>,
6116    /// filter by milestone name
6117    pub name: Option<String>,
6118    /// page number of results to return (1-based)
6119    pub page: Option<u32>,
6120    /// page size of results
6121    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    /// If true, show notifications marked as read. Default value is false
6146    pub all: Option<bool>,
6147    /// Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned
6148    pub status_types: Option<Vec<String>>,
6149    /// filter notifications by subject type
6150    pub subject_type: Option<Vec<NotifyGetRepoListQuerySubjectType>>,
6151    /// Only show notifications updated after the given time. This is a timestamp in RFC 3339 format
6152    pub since: Option<time::OffsetDateTime>,
6153    /// Only show notifications updated before the given time. This is a timestamp in RFC 3339 format
6154    pub before: Option<time::OffsetDateTime>,
6155    /// page number of results to return (1-based)
6156    pub page: Option<u32>,
6157    /// page size of results
6158    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    /// If true, mark all notifications on this repo. Default value is false
6238    pub all: Option<String>,
6239    /// Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.
6240    pub status_types: Option<Vec<String>>,
6241    /// Status to mark notifications as. Defaults to read.
6242    pub to_status: Option<String>,
6243    /// Describes the last point that notifications were checked. Anything updated since this time will not be updated.
6244    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    /// State of pull request
6281    pub state: Option<RepoListPullRequestsQueryState>,
6282    /// Type of sort
6283    pub sort: Option<RepoListPullRequestsQuerySort>,
6284    /// ID of the milestone
6285    pub milestone: Option<u64>,
6286    /// Label IDs
6287    pub labels: Option<Vec<u64>>,
6288    /// Filter by pull request author
6289    pub poster: Option<String>,
6290    /// Page number of results to return (1-based)
6291    pub page: Option<u32>,
6292    /// Page size of results
6293    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    /// whether to include binary file changes. if true, the diff is applicable with `git apply`
6381    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    /// page number of results to return (1-based)
6397    pub page: Option<u32>,
6398    /// page size of results
6399    pub limit: Option<u32>,
6400    /// include verification for every commit (disable for speedup, default 'true')
6401    pub verification: Option<bool>,
6402    /// include a list of affected files for every commit (disable for speedup, default 'true')
6403    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    /// skip to given file
6428    pub skip_to: Option<String>,
6429    /// whitespace behavior
6430    pub whitespace: Option<RepoGetPullRequestFilesQueryWhitespace>,
6431    /// page number of results to return (1-based)
6432    pub page: Option<u32>,
6433    /// page size of results
6434    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    /// page number of results to return (1-based)
6481    pub page: Option<u32>,
6482    /// page size of results
6483    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    /// how to update pull request
6502    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    /// page number of results to return (1-based)
6534    pub page: Option<u32>,
6535    /// page size of results
6536    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    /// The name of the commit/branch/tag. Default the repository’s default branch (usually master)
6555    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    /// filter (exclude / include) drafts, if you dont have repo write access none will show
6571    pub draft: Option<bool>,
6572    /// filter (exclude / include) pre-releases
6573    pub pre_release: Option<bool>,
6574    /// Search string
6575    pub q: Option<String>,
6576    /// page number of results to return (1-based)
6577    pub page: Option<u32>,
6578    /// page size of results
6579    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    /// name of the attachment
6607    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    /// page number of results to return (1-based)
6623    pub page: Option<u32>,
6624    /// page size of results
6625    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    /// type of sort
6644    pub sort: Option<RepoListStatusesQuerySort>,
6645    /// type of state
6646    pub state: Option<RepoListStatusesQueryState>,
6647    /// page number of results to return (1-based)
6648    pub page: Option<u32>,
6649    /// page size of results
6650    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    /// page number of results to return (1-based)
6726    pub page: Option<u32>,
6727    /// page size of results
6728    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    /// page number of results to return (1-based)
6747    pub page: Option<u32>,
6748    /// page size of results, default maximum page size is 50
6749    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    /// optional filter by user (available for issue managers)
6768    pub user: Option<String>,
6769    /// Only show times updated after the given time. This is a timestamp in RFC 3339 format
6770    pub since: Option<time::OffsetDateTime>,
6771    /// Only show times updated before the given time. This is a timestamp in RFC 3339 format
6772    pub before: Option<time::OffsetDateTime>,
6773    /// page number of results to return (1-based)
6774    pub page: Option<u32>,
6775    /// page size of results
6776    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    /// page number of results to return (1-based)
6816    pub page: Option<u32>,
6817    /// page size of results
6818    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    /// page number of results to return (1-based)
6837    pub page: Option<u32>,
6838    /// page size of results
6839    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    /// page number of results to return (1-based)
6858    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    /// the date of the activities to be found
6874    pub date: Option<time::Date>,
6875    /// page number of results to return (1-based)
6876    pub page: Option<u32>,
6877    /// page size of results
6878    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    /// page number of results to return (1-based)
6906    pub page: Option<u32>,
6907    /// page size of results
6908    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    /// page number of results to return (1-based)
6927    pub page: Option<u32>,
6928    /// page size of results
6929    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    /// keywords to search
6948    pub q: String,
6949    /// page number of results to return (1-based)
6950    pub page: Option<u32>,
6951    /// page size of results
6952    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    /// page number of results to return (1-based)
6973    pub page: Option<u32>,
6974    /// page size of results
6975    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    /// page number of results to return (1-based)
6994    pub page: Option<u32>,
6995    /// page size of results
6996    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    /// page number of results to return (1-based)
7015    pub page: Option<u32>,
7016    /// page size of results
7017    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    /// page number of results to return (1-based)
7036    pub page: Option<u32>,
7037    /// page size of results
7038    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    /// page number of results to return (1-based)
7057    pub page: Option<u32>,
7058    /// page size of results
7059    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    /// page number of results to return (1-based)
7078    pub page: Option<u32>,
7079    /// page size of results
7080    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    /// fingerprint of the key
7099    pub fingerprint: Option<String>,
7100    /// page number of results to return (1-based)
7101    pub page: Option<u32>,
7102    /// page size of results
7103    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    /// page number of results to return (1-based)
7125    pub page: Option<u32>,
7126    /// page size of results
7127    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    /// page number of results to return (1-based)
7146    pub page: Option<u32>,
7147    /// page size of results
7148    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    /// page number of results to return (1-based)
7167    pub page: Option<u32>,
7168    /// page size of results
7169    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    /// page number of results to return (1-based)
7188    pub page: Option<u32>,
7189    /// page size of results
7190    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    /// page number of results to return (1-based)
7209    pub page: Option<u32>,
7210    /// page size of results
7211    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    /// page number of results to return (1-based)
7230    pub page: Option<u32>,
7231    /// page size of results
7232    pub limit: Option<u32>,
7233    /// order the repositories by name (default), id, or size
7234    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    /// page number of results to return (1-based)
7256    pub page: Option<u32>,
7257    /// page size of results
7258    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    /// page number of results to return (1-based)
7277    pub page: Option<u32>,
7278    /// page size of results
7279    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    /// page number of results to return (1-based)
7298    pub page: Option<u32>,
7299    /// page size of results
7300    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    /// page number of results to return (1-based)
7319    pub page: Option<u32>,
7320    /// page size of results
7321    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    /// page number of results to return (1-based)
7340    pub page: Option<u32>,
7341    /// page size of results
7342    pub limit: Option<u32>,
7343    /// Only show times updated after the given time. This is a timestamp in RFC 3339 format
7344    pub since: Option<time::OffsetDateTime>,
7345    /// Only show times updated before the given time. This is a timestamp in RFC 3339 format
7346    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    /// keyword
7383    pub q: Option<String>,
7384    /// ID of the user to search for
7385    pub uid: Option<u64>,
7386    /// page number of results to return (1-based)
7387    pub page: Option<u32>,
7388    /// page size of results
7389    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    /// if true, only show actions performed by the requested user
7419    pub only_performed_by: Option<bool>,
7420    /// the date of the activities to be found
7421    pub date: Option<time::Date>,
7422    /// page number of results to return (1-based)
7423    pub page: Option<u32>,
7424    /// page size of results
7425    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    /// page number of results to return (1-based)
7456    pub page: Option<u32>,
7457    /// page size of results
7458    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    /// page number of results to return (1-based)
7477    pub page: Option<u32>,
7478    /// page size of results
7479    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    /// page number of results to return (1-based)
7498    pub page: Option<u32>,
7499    /// page size of results
7500    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    /// fingerprint of the key
7519    pub fingerprint: Option<String>,
7520    /// page number of results to return (1-based)
7521    pub page: Option<u32>,
7522    /// page size of results
7523    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    /// page number of results to return (1-based)
7545    pub page: Option<u32>,
7546    /// page size of results
7547    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    /// page number of results to return (1-based)
7566    pub page: Option<u32>,
7567    /// page size of results
7568    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    /// page number of results to return (1-based)
7587    pub page: Option<u32>,
7588    /// page size of results
7589    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    /// page number of results to return (1-based)
7608    pub page: Option<u32>,
7609    /// page size of results
7610    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    /// page number of results to return (1-based)
7629    pub page: Option<u32>,
7630    /// page size of results
7631    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}